[
https://issues.apache.org/jira/browse/LUCENE-3847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222064#comment-13222064
]
Uwe Schindler commented on LUCENE-3847:
---------------------------------------
bq. I don't know, to be honest. I didn't want to experiment because I remember
being scalded at some point in my past when I used Map interface to manipulate
system properties and in certain circumstances things didn't work as they
should. I can't remember the details now, unfortunately.
For copying you are already using the map interface (retrieving entrySet). For
read access this is not a problem, but the whole Java API implementing Map is
broken. Implementing the Map interface, which allows to put Object keys/values
is unfortunately a no-go. But doing "new
TreeMap<String,String>((Map<String,String>) properties)" is fine (with
SuppressWarnings because of the cast) - because the putAll method of TreeMap is
implemented exactly as your loop.
> LuceneTestCase should check for modifications on System properties
> ------------------------------------------------------------------
>
> Key: LUCENE-3847
> URL: https://issues.apache.org/jira/browse/LUCENE-3847
> Project: Lucene - Java
> Issue Type: Improvement
> Components: general/test
> Reporter: Dawid Weiss
> Assignee: Dawid Weiss
> Priority: Minor
> Fix For: 3.6, 4.0
>
> Attachments: LUCENE-3847.patch
>
>
> - fail the test if changes have been detected.
> - revert the state of system properties before the suite.
> - cleanup after the suite.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]