Thorsten Meinl created XMLBEANS-491:

             Summary: SystemProperties cannot handle default values
                 Key: XMLBEANS-491
             Project: XMLBeans
          Issue Type: Bug
          Components: Tools
    Affects Versions: Version 2.5
            Reporter: Thorsten Meinl

The SystemProperties class seems to be a wrapper around System.getProperties. 
However, System.getProperties() returns a Properties object that has preferred 
methods of querying properties, e.g. getProperty() instead of simply get() 
inherited from Hashtable. getProperty() also queries (recursively) the defaults 
stored in the Properties objects, which get() doesn't. The SystemProperties 
wrapper incorrectly calls only get which ignores the default values. 
Suppose some class changes the system properties by wrapping them into a new 
Properties object (passing the old values as defaults in the constructor) and 
setting it via System.setProperties. Everyone using getProperty() still sees 
the old values, whereas calling only get only the new values are shown. This 
means that all standard java properties (e.g. "user.dir" used in the 
SchemaCompiler) are lost when they are queried via SystemProperties, 
essentially leading to strange NullPointerExceptions when the ant task is used.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to