You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Oliver Heger (JIRA)" <ji...@apache.org> on 2015/06/04 21:34:38 UTC

[jira] [Updated] (LANG-1141) StrLookup.systemPropertiesLookup() no longer reacts on changes on system properties

     [ https://issues.apache.org/jira/browse/LANG-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Heger updated LANG-1141:
-------------------------------
    Attachment: lang-1141.patch

Proposed patch to solve both LANG-1055 and LANG-1141. This patch implements the lookup for system properties in a very straight-forward way. It ensures live access to system properties in all cases in a consistent way.

> StrLookup.systemPropertiesLookup() no longer reacts on changes on system properties
> -----------------------------------------------------------------------------------
>
>                 Key: LANG-1141
>                 URL: https://issues.apache.org/jira/browse/LANG-1141
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.text.*
>    Affects Versions: 3.4
>            Reporter: Oliver Heger
>         Attachments: lang-1141.patch
>
>
> In versions of Commons Lang before 3.4 a {{Lookup}} object created from the {{systemPropertiesLookup()}} method offered a live view of system properties. So if a system property was changed after the creation of the lookup object, the new value was visible. In version 3.4 this is no longer the case.
> The change seems to be related to LANG-1055. Here a fix was implemented which initializes a lookup object for system properties with a snapshot copy of the current properties. Changes made later on system properties are no longer reflected. I do not understand the background for this change because this is not really related to the original bug report.
> I would propose an implementation which fixes the reported problem in LANG-1055 and allows a live view on system properties. Maybe the snapshot use case could still be supported by an overloaded method.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)