aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-11-18 02:44:19 +0100
committerMichael Bien <[email protected]>2010-11-18 02:44:19 +0100
commit448d9ca99a38f4f107c86ca3475129568cd74cf7 (patch)
treef3adbd9278dec8af95ef549c19c65187431071ee
parent7c159772fad5445d296ad0f06f07272a59325003 (diff)
modifications due to changes in GlueGen's VersionUtil.getManifest().
made references created in double checked locks volatile.
-rw-r--r--src/jogl/classes/com/jogamp/opengl/JoglVersion.java12
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowVersion.java5
-rw-r--r--src/newt/classes/com/jogamp/newt/NewtVersion.java5
3 files changed, 9 insertions, 13 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java
index ee9d36147..bafe7ceaa 100644
--- a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java
+++ b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java
@@ -33,11 +33,10 @@ import com.jogamp.common.os.Platform;
import com.jogamp.common.util.VersionUtil;
import com.jogamp.common.util.JogampVersion;
import java.util.jar.Manifest;
-import javax.media.nativewindow.AbstractGraphicsDevice;
public class JoglVersion extends JogampVersion {
- protected static JoglVersion jogampCommonVersionInfo;
+ protected static volatile JoglVersion jogampCommonVersionInfo;
protected JoglVersion(String packageName, Manifest mf) {
super(packageName, mf);
@@ -48,8 +47,7 @@ public class JoglVersion extends JogampVersion {
synchronized(JoglVersion.class) {
if( null == jogampCommonVersionInfo ) {
final String packageName = "javax.media.opengl";
- final String fullClazzName = "javax.media.opengl.GL";
- final Manifest mf = VersionUtil.getManifest(JoglVersion.class.getClassLoader(), fullClazzName);
+ final Manifest mf = VersionUtil.getManifest(JoglVersion.class.getClassLoader(), packageName);
jogampCommonVersionInfo = new JoglVersion(packageName, mf);
}
}
@@ -57,8 +55,8 @@ public class JoglVersion extends JogampVersion {
return jogampCommonVersionInfo;
}
- public StringBuffer toStringBuffer(GL gl, StringBuffer sb) {
- sb = super.toStringBuffer(sb);
+ public StringBuffer toString(GL gl, StringBuffer sb) {
+ sb = super.toString(sb);
getGLInfo(gl, sb);
sb.append("-----------------------------------------------------------------------------------------------------");
@@ -68,7 +66,7 @@ public class JoglVersion extends JogampVersion {
}
public String toString(GL gl) {
- return toStringBuffer(gl, null).toString();
+ return toString(gl, null).toString();
}
public static StringBuffer getGLInfo(GL gl, StringBuffer sb) {
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowVersion.java b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowVersion.java
index 55757fc42..6f9666039 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowVersion.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowVersion.java
@@ -34,7 +34,7 @@ import java.util.jar.Manifest;
public class NativeWindowVersion extends JogampVersion {
- protected static NativeWindowVersion jogampCommonVersionInfo;
+ protected static volatile NativeWindowVersion jogampCommonVersionInfo;
protected NativeWindowVersion(String packageName, Manifest mf) {
super(packageName, mf);
@@ -45,8 +45,7 @@ public class NativeWindowVersion extends JogampVersion {
synchronized(NativeWindowVersion.class) {
if( null == jogampCommonVersionInfo ) {
final String packageName = "javax.media.nativewindow";
- final String fullClazzName = NativeWindowVersion.class.getName();
- final Manifest mf = VersionUtil.getManifest(NativeWindowVersion.class.getClassLoader(), fullClazzName);
+ final Manifest mf = VersionUtil.getManifest(NativeWindowVersion.class.getClassLoader(), packageName);
jogampCommonVersionInfo = new NativeWindowVersion(packageName, mf);
}
}
diff --git a/src/newt/classes/com/jogamp/newt/NewtVersion.java b/src/newt/classes/com/jogamp/newt/NewtVersion.java
index 2493787d7..a11621370 100644
--- a/src/newt/classes/com/jogamp/newt/NewtVersion.java
+++ b/src/newt/classes/com/jogamp/newt/NewtVersion.java
@@ -34,7 +34,7 @@ import java.util.jar.Manifest;
public class NewtVersion extends JogampVersion {
- protected static NewtVersion jogampCommonVersionInfo;
+ protected static volatile NewtVersion jogampCommonVersionInfo;
protected NewtVersion(String packageName, Manifest mf) {
super(packageName, mf);
@@ -45,8 +45,7 @@ public class NewtVersion extends JogampVersion {
synchronized(NewtVersion.class) {
if( null == jogampCommonVersionInfo ) {
final String packageName = "com.jogamp.newt";
- final String fullClazzName = NewtVersion.class.getName();
- final Manifest mf = VersionUtil.getManifest(NewtVersion.class.getClassLoader(), fullClazzName);
+ final Manifest mf = VersionUtil.getManifest(NewtVersion.class.getClassLoader(), packageName);
jogampCommonVersionInfo = new NewtVersion(packageName, mf);
}
}