From 05024570dbf5fce08fa8ff081cb696f0fc4b7f95 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 18 Jun 2012 18:21:15 +0200 Subject: 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()}, ..
This mechanism is preferred in this case to avoid synchronization and locking and allow better performance accessing the mentioned fields/methods. --- src/java/com/jogamp/common/util/IOUtil.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/java/com/jogamp/common/util/IOUtil.java') 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 Free-Desktop - XDG Base Directory Specification */ private static boolean getOSHasFreeDesktopXDG() { - switch(Platform.OS_TYPE) { + switch(PlatformPropsImpl.OS_TYPE) { case ANDROID: case MACOS: case WINDOWS: -- cgit v1.2.3