diff options
author | Sven Gothel <[email protected]> | 2014-09-03 15:42:37 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-09-03 15:42:37 +0200 |
commit | ffde09410fb78c43bd45d6c5e62606789dced6eb (patch) | |
tree | 66aed6741bb713f450039edf6819d5ffab7b483b | |
parent | 9b7ab72d9b098942ee599a106b142cac8c16fd9b (diff) |
Bug 1059 _and_ version-compat breackage of commit c78ceb642d0ef5bb5bf27ff8ff1495175ee2e983
Commit c78ceb642d0ef5bb5bf27ff8ff1495175ee2e983 changed:
- public static final String GL4 = "GL4";
+ public static final String GL4 = "GL4".intern();
which is identified by semver as incompatible,
due to Bug 1059 (no more inlining of interned string references).
-rw-r--r-- | make/scripts/tests.sh | 8 | ||||
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLProfile.java | 28 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java | 15 |
3 files changed, 32 insertions, 19 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index a3a02070a..797aef3e3 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -127,7 +127,7 @@ function jrun() { #D_ARGS="-Djogl.debug.GLBufferStateTracker -Djogl.debug.GLBufferObjectTracker" #D_ARGS="-Djogl.debug.GLBufferObjectTracker" #D_ARGS="-Djogl.debug.GLBufferObjectTracker -Djogl.debug.GLArrayData -Djogl.debug.TraceGL -Djogl.debug.DebugGL" - D_ARGS="-Djogl.debug.GLSLCode" + #D_ARGS="-Djogl.debug.GLSLCode" #D_ARGS="-Djogl.debug.GLSLCode -Djogl.debug.TraceGL" #D_ARGS="-Djogl.debug.GLSLCode -Djogl.debug.DebugGL" #D_ARGS="-Djogl.debug.GLContext -Dnativewindow.debug.JAWT -Dnewt.debug.Window" @@ -167,7 +167,7 @@ function jrun() { #D_ARGS="-Djogl.debug.GLArrayData" #D_ARGS="-Dnewt.debug.Screen -Dnewt.debug.Window" #D_ARGS="-Dnewt.debug.Window" - #D_ARGS="-Dnewt.debug.Screen" + D_ARGS="-Dnewt.debug.Screen" #D_ARGS="-Dnewt.test.Screen.disableRandR13" #D_ARGS="-Dnewt.test.Screen.disableScreenMode -Dnewt.debug.Screen" #D_ARGS="-Dnewt.debug.Screen -Djogl.debug.Animator" @@ -378,7 +378,7 @@ function testawtswt() { #testawt com.jogamp.opengl.test.junit.jogl.acore.TestMainVersionGLCanvasAWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile00NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT $* -#testawt com.jogamp.opengl.test.junit.jogl.acore.TestVersionSemanticsNOUI $* +testawt com.jogamp.opengl.test.junit.jogl.acore.TestVersionSemanticsNOUI $* # # Stereo @@ -426,7 +426,7 @@ function testawtswt() { #testnoawt com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestTeapotNEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.gl3.newt.TestGeomShader01TextureGL3NEWT $* -testnoawt com.jogamp.opengl.test.junit.jogl.demos.gl4.newt.TestTessellationShader01GL4NEWT $* +#testnoawt com.jogamp.opengl.test.junit.jogl.demos.gl4.newt.TestTessellationShader01GL4NEWT $* # # av demos diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java index 674ecdabf..5836e4c81 100644 --- a/src/jogl/classes/javax/media/opengl/GLProfile.java +++ b/src/jogl/classes/javax/media/opengl/GLProfile.java @@ -513,46 +513,46 @@ public class GLProfile { /** The desktop OpenGL compatibility profile 4.x, with x >= 0, ie GL2 plus GL4.<br> <code>bc</code> stands for backward compatibility. */ - public static final String GL4bc = "GL4bc".intern(); + public static final String GL4bc = "GL4bc"; // Implicitly intern(), see Bug 1059 /** The desktop OpenGL core profile 4.x, with x >= 0 */ - public static final String GL4 = "GL4".intern(); + public static final String GL4 = "GL4"; // Implicitly intern(), see Bug 1059 /** The desktop OpenGL compatibility profile 3.x, with x >= 1, ie GL2 plus GL3.<br> <code>bc</code> stands for backward compatibility. */ - public static final String GL3bc = "GL3bc".intern(); + public static final String GL3bc = "GL3bc"; // Implicitly intern(), see Bug 1059 /** The desktop OpenGL core profile 3.x, with x >= 1 */ - public static final String GL3 = "GL3".intern(); + public static final String GL3 = "GL3"; // Implicitly intern(), see Bug 1059 /** The desktop OpenGL profile 1.x up to 3.0 */ - public static final String GL2 = "GL2".intern(); + public static final String GL2 = "GL2"; // Implicitly intern(), see Bug 1059 /** The embedded OpenGL profile ES 1.x, with x >= 0 */ - public static final String GLES1 = "GLES1".intern(); + public static final String GLES1 = "GLES1"; // Implicitly intern(), see Bug 1059 /** The embedded OpenGL profile ES 2.x, with x >= 0 */ - public static final String GLES2 = "GLES2".intern(); + public static final String GLES2 = "GLES2"; // Implicitly intern(), see Bug 1059 /** The embedded OpenGL profile ES 3.x, with x >= 0 */ - public static final String GLES3 = "GLES3".intern(); + public static final String GLES3 = "GLES3"; // Implicitly intern(), see Bug 1059 /** The intersection of the desktop GL2 and embedded ES1 profile */ - public static final String GL2ES1 = "GL2ES1".intern(); + public static final String GL2ES1 = "GL2ES1"; // Implicitly intern(), see Bug 1059 /** The intersection of the desktop GL3, GL2 and embedded ES2 profile */ - public static final String GL2ES2 = "GL2ES2".intern(); + public static final String GL2ES2 = "GL2ES2"; // Implicitly intern(), see Bug 1059 /** The intersection of the desktop GL3 and GL2 profile */ - public static final String GL2GL3 = "GL2GL3".intern(); + public static final String GL2GL3 = "GL2GL3"; // Implicitly intern(), see Bug 1059 /** The intersection of the desktop GL4 and ES3 profile, available only if either ES3 or GL4 w/ <code>GL_ARB_ES3_compatibility</code> is available. */ - public static final String GL4ES3 = "GL4ES3".intern(); + public static final String GL4ES3 = "GL4ES3"; // Implicitly intern(), see Bug 1059 /** The default profile, used for the device default profile map */ - private static final String GL_DEFAULT = "GL_DEFAULT".intern(); + private static final String GL_DEFAULT = "GL_DEFAULT"; // Implicitly intern(), see Bug 1059 /** The default profile, used for the device default profile map */ - private static final String GL_GL = "GL".intern(); + private static final String GL_GL = "GL"; // Implicitly intern(), see Bug 1059 /** * All GL Profiles in the order of default detection. diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java index 5861d4233..dfa34be34 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java @@ -30,6 +30,7 @@ package com.jogamp.opengl.test.junit.jogl.acore; import java.io.IOException; +import org.junit.Assert; import org.junit.Test; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @@ -44,7 +45,19 @@ import com.jogamp.opengl.test.junit.util.UITestCase; public class TestGLProfile00NEWT extends UITestCase { @Test - public void testInitSingleton() throws InterruptedException { + public void test01InternedString() { + final String s1 = "GL2"; + final String s2 = "GL2"; + Assert.assertEquals(s1, s2); + Assert.assertTrue("s1-ref != s2-ref", s1 == s2); + Assert.assertTrue("s1-ref != 'GL2'-ref", s1 == "GL2"); + + Assert.assertEquals("GL2", GLProfile.GL2); + Assert.assertTrue("GLProfile-ref != 'GL2'-ref", GLProfile.GL2 == "GL2"); + } + + @Test + public void test02InitSingleton() throws InterruptedException { GLProfile.initSingleton(); System.err.println("Desktop"); final GLDrawableFactory desktopFactory = GLDrawableFactory.getDesktopFactory(); |