diff options
author | Sven Gothel <[email protected]> | 2012-03-13 06:35:51 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-03-13 06:35:51 +0100 |
commit | bab77b637e7cdd327de5f66989fcbfc0298b9b88 (patch) | |
tree | 3659baafc4f0eb84013b14cbd99efa1d7154b759 /src/java/com/jogamp/gluegen | |
parent | 8d5786376337bcd40095c5a4d13e40696021e311 (diff) |
Intro.: PropertyAccess ; Added safe PropertyAccess for JNILibLoaderBase, Platform, IOUtil, ..
- Intro.: PropertyAccess
- Base class of all Debug impl, reduces redundancies.
- jnlpAlias'ed trusted property is queried within local AccessControlContext
to avoid 'JRE' implementation differences (should not be required).
- throw NPE and IllegalArgumentException for invalid property key
- Added safe PropertyAccess
- JNILibLoaderBase: sun.jnlp.applet.launcher
- Platform: jogamp.gluegen.UseTempJarCache
- IOUtil: java.io.tmpdir
Diffstat (limited to 'src/java/com/jogamp/gluegen')
-rw-r--r-- | src/java/com/jogamp/gluegen/Logging.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/java/com/jogamp/gluegen/Logging.java b/src/java/com/jogamp/gluegen/Logging.java index 9ad3bf7..556819e 100644 --- a/src/java/com/jogamp/gluegen/Logging.java +++ b/src/java/com/jogamp/gluegen/Logging.java @@ -31,12 +31,15 @@ */ package com.jogamp.gluegen; +import java.security.AccessController; import java.util.logging.ConsoleHandler; import java.util.logging.Formatter; import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.logging.Logger; +import jogamp.common.PropertyAccess; + /** * * @author Michael Bien @@ -44,9 +47,8 @@ import java.util.logging.Logger; public class Logging { static void init() { - - String pakage = Logging.class.getPackage().getName(); - String property = System.getProperty(pakage+".level"); + final String packageName = Logging.class.getPackage().getName(); + final String property = PropertyAccess.getProperty(packageName+".level", true, AccessController.getContext()); Level level; if(property != null) { level = Level.parse(property); @@ -63,7 +65,7 @@ public class Logging { handler.setFormatter(new PlainLogFormatter()); handler.setLevel(level); - Logger rootPackageLogger = Logger.getLogger(pakage); + Logger rootPackageLogger = Logger.getLogger(packageName); rootPackageLogger.setUseParentHandlers(false); rootPackageLogger.setLevel(level); rootPackageLogger.addHandler(handler); @@ -75,7 +77,7 @@ public class Logging { */ private static class PlainLogFormatter extends Formatter { - //@Override + @Override public String format(LogRecord record) { StringBuilder sb = new StringBuilder(128); sb.append("[").append(record.getLevel()).append(' ').append(record.getSourceClassName()).append("]: "); |