diff options
author | Sven Gothel <[email protected]> | 2012-06-18 18:21:15 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-06-18 18:21:15 +0200 |
commit | 05024570dbf5fce08fa8ff081cb696f0fc4b7f95 (patch) | |
tree | 2d5ac237803252a7490805c35e211daebe07381b /src/java/com/jogamp/common/util | |
parent | 1468286bf569a493e4fdb887d5f3732f88c8cec3 (diff) |
Fix Platform static initialization interdependencies w/ GlueGen native library loading
Some Platform field declarations and it's static initialization has been delegated
to it's new abstract super class PlatformPropsImpl to solve
static initialization interdependencies w/ the GlueGen native library loading
and it's derived information {@link #getMachineDescription()}, {@link #is32Bit()}, ..<br>
This mechanism is preferred in this case to avoid synchronization and locking
and allow better performance accessing the mentioned fields/methods.
Diffstat (limited to 'src/java/com/jogamp/common/util')
-rw-r--r-- | src/java/com/jogamp/common/util/IOUtil.java | 7 | ||||
-rw-r--r-- | src/java/com/jogamp/common/util/VersionUtil.java | 2 | ||||
-rw-r--r-- | src/java/com/jogamp/common/util/cache/TempFileCache.java | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/java/com/jogamp/common/util/IOUtil.java b/src/java/com/jogamp/common/util/IOUtil.java index 535c346..19ae683 100644 --- a/src/java/com/jogamp/common/util/IOUtil.java +++ b/src/java/com/jogamp/common/util/IOUtil.java @@ -47,6 +47,7 @@ import java.nio.ByteBuffer; import jogamp.common.Debug; import jogamp.common.os.AndroidUtils; +import jogamp.common.os.PlatformPropsImpl; import com.jogamp.common.net.AssetURLContext; import com.jogamp.common.nio.Buffers; @@ -605,7 +606,7 @@ public class IOUtil { } private static String getShellSuffix() { - switch(Platform.OS_TYPE) { + switch(PlatformPropsImpl.OS_TYPE) { case WINDOWS: return ".bat"; default: @@ -614,7 +615,7 @@ public class IOUtil { } private static boolean getOSHasNoexecFS() { - switch(Platform.OS_TYPE) { + switch(PlatformPropsImpl.OS_TYPE) { case WINDOWS: case OPENKODE: return false; @@ -628,7 +629,7 @@ public class IOUtil { * @see <a href="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">Free-Desktop - XDG Base Directory Specification</a> */ private static boolean getOSHasFreeDesktopXDG() { - switch(Platform.OS_TYPE) { + switch(PlatformPropsImpl.OS_TYPE) { case ANDROID: case MACOS: case WINDOWS: diff --git a/src/java/com/jogamp/common/util/VersionUtil.java b/src/java/com/jogamp/common/util/VersionUtil.java index 820035c..e5491c7 100644 --- a/src/java/com/jogamp/common/util/VersionUtil.java +++ b/src/java/com/jogamp/common/util/VersionUtil.java @@ -56,7 +56,7 @@ public class VersionUtil { // environment sb.append("Platform: ").append(Platform.getOSType()).append(" / ").append(Platform.getOSName()).append(' ').append(Platform.getOSVersion()).append(" (os), "); - sb.append(Platform.getArchName()).append(" (arch), ").append(Platform.ABI_TYPE).append(", "); + sb.append(Platform.getArchName()).append(" (arch), ").append(Platform.getABIType()).append(", "); sb.append(Runtime.getRuntime().availableProcessors()).append(" cores"); sb.append(Platform.getNewline()); if( AndroidVersion.isAvailable) { diff --git a/src/java/com/jogamp/common/util/cache/TempFileCache.java b/src/java/com/jogamp/common/util/cache/TempFileCache.java index cbc8ca5..7eebbd0 100644 --- a/src/java/com/jogamp/common/util/cache/TempFileCache.java +++ b/src/java/com/jogamp/common/util/cache/TempFileCache.java @@ -416,7 +416,7 @@ public class TempFileCache { } } if (DEBUG) { - System.err.println("tempDir: "+individualTmpDir+" (ok: "+(!initError)+")"); + System.err.println("TempFileCache: tempDir "+individualTmpDir+" (ok: "+(!initError)+")"); System.err.println("----------------------------------------------------------"); } } |