[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] [Created] (XMLBEANS-491) SystemProperties cannot handle default values
From:       "Thorsten Meinl (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2012-10-11 15:05:04
Message-ID: 1108282218.26667.1349967904566.JavaMail.jiratomcat () arcas
[Download RAW message or body]

Thorsten Meinl created XMLBEANS-491:
---------------------------------------

             Summary: SystemProperties cannot handle default values
                 Key: XMLBEANS-491
                 URL: https://issues.apache.org/jira/browse/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: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic