forked from I2P_Developers/i2p.i2p
findbugs core,client,crypto,data,stat,i2np
This commit is contained in:
@ -63,7 +63,7 @@ import net.i2p.util.SecureDirectory;
|
||||
*/
|
||||
public class I2PAppContext {
|
||||
/** the context that components without explicit root are bound */
|
||||
protected static I2PAppContext _globalAppContext;
|
||||
protected static volatile I2PAppContext _globalAppContext;
|
||||
|
||||
private Properties _overrideProps;
|
||||
|
||||
@ -117,7 +117,8 @@ public class I2PAppContext {
|
||||
*
|
||||
*/
|
||||
public static I2PAppContext getGlobalContext() {
|
||||
// skip the global lock
|
||||
// skip the global lock - _gAC must be volatile
|
||||
// http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
|
||||
I2PAppContext rv = _globalAppContext;
|
||||
if (rv != null)
|
||||
return rv;
|
||||
@ -474,6 +475,9 @@ public class I2PAppContext {
|
||||
* provided during the context construction, as well as the ones included in
|
||||
* System.getProperties.
|
||||
*
|
||||
* WARNING - not overridden in RouterContext, doesn't contain router config settings,
|
||||
* use getProperties() instead.
|
||||
*
|
||||
* @return set of Strings containing the names of defined system properties
|
||||
*/
|
||||
public Set getPropertyNames() {
|
||||
|
Reference in New Issue
Block a user