lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3847) LuceneTestCase should check for modifications on System properties
Date Mon, 05 Mar 2012 07:57:07 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-3847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222206#comment-13222206
] 

Uwe Schindler commented on LUCENE-3847:
---------------------------------------

I don't mind, I think it's fine. But I had the same problem like you when I used the Properties
class, it always feels bad and some things are not working at all.

This comment in Javadocs for public Set<String> stringPropertyNames() makes me nervous,
too:

{quote}
Returns a set of keys in this property list where the key and its corresponding value are
strings, including distinct keys in the default property list if a key of the same name has
not already been found from the main properties list. Properties whose key or value is not
of type String are omitted.
The returned set is not backed by the Properties object. Changes to this Properties are not
reflected in the set, or vice versa.
Returns:
a set of keys in this property list where the key and its corresponding value are strings,
including the keys in the default property list.
Since:
1.6
{quote}

This method is available since Java 6, so this would be the "most correct" solution. Retrieve
the set, iterate via advanced for-loop and use getProperty(). But that does not work for Lucene
3.x.
                
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message