summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-12-12 17:35:35 +0100
committerSven Gothel <[email protected]>2014-12-12 17:35:35 +0100
commitf26fcc971dc95ffb7033ac9e539a3c0ebb43025a (patch)
tree5105eae0cf7efb853329ed088dc0161462b7c3f6 /src
parent235a64d1f2354fa15805d1759ff0b46c71338b4f (diff)
TempFileCache/TempJarCache: Fix NPE in DEBUG mode
Diffstat (limited to 'src')
-rw-r--r--src/java/com/jogamp/common/util/cache/TempFileCache.java5
-rw-r--r--src/java/com/jogamp/common/util/cache/TempJarCache.java4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/java/com/jogamp/common/util/cache/TempFileCache.java b/src/java/com/jogamp/common/util/cache/TempFileCache.java
index b58ea28..24f0237 100644
--- a/src/java/com/jogamp/common/util/cache/TempFileCache.java
+++ b/src/java/com/jogamp/common/util/cache/TempFileCache.java
@@ -87,8 +87,11 @@ public class TempFileCache {
tmpBaseDir = _tmpBaseDir;
if (DEBUG) {
+ final String tmpBaseDirAbsPath = null != tmpBaseDir ? tmpBaseDir.getAbsolutePath() : null;
System.err.println("TempFileCache: Static Initialization ---------------------------------------------- OK: "+(!staticInitError));
- System.err.println("TempFileCache: Thread: "+Thread.currentThread().getName()+", CL 0x"+Integer.toHexString(TempFileCache.class.getClassLoader().hashCode())+", tempBaseDir "+tmpBaseDir.getAbsolutePath());
+ System.err.println("TempFileCache: Thread: "+Thread.currentThread().getName()+
+ ", CL 0x"+Integer.toHexString(TempFileCache.class.getClassLoader().hashCode())+
+ ", tempBaseDir "+tmpBaseDirAbsPath);
}
if(!staticInitError) {
diff --git a/src/java/com/jogamp/common/util/cache/TempJarCache.java b/src/java/com/jogamp/common/util/cache/TempJarCache.java
index 05d92e1..ed69ddc 100644
--- a/src/java/com/jogamp/common/util/cache/TempJarCache.java
+++ b/src/java/com/jogamp/common/util/cache/TempJarCache.java
@@ -100,7 +100,9 @@ public class TempJarCache {
resourceFileJars = new HashMap<Uri, LoadState>();
}
if(DEBUG) {
- System.err.println("TempJarCache.initSingleton(): ok "+(false==staticInitError)+", "+ tmpFileCache.getTempDir());
+ final File tempDir = null != tmpFileCache ? tmpFileCache.getTempDir() : null;
+ final String tempDirAbsPath = null != tempDir ? tempDir.getAbsolutePath() : null;
+ System.err.println("TempJarCache.initSingleton(): ok "+(false==staticInitError)+", "+ tempDirAbsPath);
}
isInit = true;
}