diff options
author | John Ross | 2012-11-15 13:12:05 +0000 |
---|---|---|
committer | Thomas Watson | 2012-11-15 16:48:46 +0000 |
commit | aa71c24487baece4e5fe04af8e1fada1ebb672e5 (patch) | |
tree | c17813a2ee576a6e66c7d0adb1a00ee78ab027a2 | |
parent | 62253d37bb8c8e142385f863c8af4c54409c9c55 (diff) | |
download | rt.equinox.framework-aa71c24487baece4e5fe04af8e1fada1ebb672e5.tar.gz rt.equinox.framework-aa71c24487baece4e5fe04af8e1fada1ebb672e5.tar.xz rt.equinox.framework-aa71c24487baece4e5fe04af8e1fada1ebb672e5.zip |
Bug 394339 - NLS needs to use a privileged action when initializing the ignoreWarnings field.v20121115-164846
-rw-r--r-- | bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java index c7776d2ff..dbe8f0e66 100644 --- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java +++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -57,7 +57,11 @@ public abstract class NLS { private static String[] nlSuffixes; private static final String PROP_WARNINGS = "osgi.nls.warnings"; //$NON-NLS-1$ private static final String IGNORE = "ignore"; //$NON-NLS-1$ - private static final boolean ignoreWarnings = IGNORE.equals(FrameworkProperties.getProperty(PROP_WARNINGS)); + private static final boolean ignoreWarnings = AccessController.doPrivileged(new PrivilegedAction<Boolean>() { + public Boolean run() { + return IGNORE.equals(FrameworkProperties.getProperty(PROP_WARNINGS)); + } + }); /* * NOTE do not change the name of this field; it is set by the Framework using reflection |