  The long-standing problem of whether the cosmological constant affects
directly the deflection of light caused by a gravitational lens is
reconsidered. We use a new approach based on the Hawking quasilocal mass of a
sphere grazed by light rays and on its splitting into local and cosmological
parts. Previous literature restricted to the cosmological constant is extended
to any form of dark energy accelerating the universe in which the gravitational
lens is embedded.
