[
https://issues.apache.org/jira/browse/LANG-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14596313#comment-14596313
]
Benedikt Ritter commented on LANG-1141:
---------------------------------------
Hello Oliver,
patch looks good to me. I'm not sure but I think that os.name is set to
HAL-9000 on the ASF build servers. So maybe it would be better to set the
{{differentOsName}} like this:
{code:java}
final String differentOsName = originalOsName + "-TEST";
System.setProperty(osName, differentOsName);
{code}
> 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)