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/common/util/IOUtil.java | |
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/common/util/IOUtil.java')
-rw-r--r-- | src/java/com/jogamp/common/util/IOUtil.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/java/com/jogamp/common/util/IOUtil.java b/src/java/com/jogamp/common/util/IOUtil.java index 0463c37..cdbeab6 100644 --- a/src/java/com/jogamp/common/util/IOUtil.java +++ b/src/java/com/jogamp/common/util/IOUtil.java @@ -44,6 +44,7 @@ import java.net.URLConnection; import java.nio.ByteBuffer; import jogamp.common.Debug; +import jogamp.common.PropertyAccess; import jogamp.common.os.android.StaticContext; import android.content.Context; @@ -510,11 +511,14 @@ public class IOUtil { * for both platforms w/o the need to handle extra permissions. * </p> * + * @throws SecurityException + * @throws RuntimeException + * * @see StaticContext#setContext(Context) * @see Context#getDir(String, int) */ public static File getTempRoot() - throws SecurityException + throws SecurityException, RuntimeException { if(AndroidVersion.isAvailable) { final Context ctx = StaticContext.getContext(); @@ -526,7 +530,7 @@ public class IOUtil { return tmpRoot; } } - final String tmpRootName = System.getProperty("java.io.tmpdir"); + final String tmpRootName = PropertyAccess.getProperty("java.io.tmpdir", false, AccessController.getContext()); final File tmpRoot = new File(tmpRootName); if(DEBUG) { System.err.println("IOUtil.getTempRoot(isAndroid: "+AndroidVersion.isAvailable+"): temp dir: "+tmpRoot.getAbsolutePath()); |