Joerg Hoh created SLING-12062:
---------------------------------
Summary: add LazyBindings.putOnly
Key: SLING-12062
URL: https://issues.apache.org/jira/browse/SLING-12062
Project: Sling
Issue Type: Task
Components: API
Affects Versions: API 2.27.2
Reporter: Joerg Hoh
The LazyBindings support the lazy evaluation of values to avoid the potential
costly resolution of values at provisioning time (the values are only resolved
when requested via {{get}}).
But if for some reasons the same key is put twice into a LazyBinding, the
second call to {{put(key, value)}} resolves the already provided value and
returns it, but this return value of {{put}} is often ignored.
So the LazyBindings should have a {{putOnly(key,value)}} method, which behaves
the same way as the existing {{put}}, but does not return the (resolved)
previous value.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)