aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2013-10-18 07:55:37 -0700
committerHarvey Harrison <[email protected]>2013-10-20 12:02:37 -0700
commit946e0b59847de43d3dd51080abe7b9703d431e5f (patch)
tree5c2ef304cf144f3e28f498504151b1df0209ff0a /src/jogl
parent0ba264e878993d8f24254257d39a189b4ebf3937 (diff)
jogl: replce more unneeded String() construction
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/OMXGLMediaPlayer.java9
2 files changed, 5 insertions, 6 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java
index 4903e6acd..44fbf1c6d 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java
@@ -137,7 +137,7 @@ public abstract class CompileShader {
}
String dirname;
if (lastSlash < 0) {
- dirname = new String();
+ dirname = "";
} else {
dirname = path.substring(0, lastSlash + 1);
}
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/OMXGLMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/impl/OMXGLMediaPlayer.java
index 24198703a..05a94def8 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/OMXGLMediaPlayer.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/OMXGLMediaPlayer.java
@@ -183,16 +183,15 @@ public class OMXGLMediaPlayer extends EGLMediaPlayerImpl {
}
private String replaceAll(String orig, String search, String repl) {
- String dest=null;
+ StringBuilder dest = new StringBuilder();
// In case replaceAll / java.util.regex.* is not supported (-> CVM)
int i=0,j;
- dest = new String();
while((j=orig.indexOf(search, i))>=0) {
- dest=dest.concat(orig.substring(i, j));
- dest=dest.concat(repl);
+ dest.append(orig.substring(i, j));
+ dest.append(repl);
i=j+1;
}
- return dest.concat(orig.substring(i, orig.length()));
+ return dest.append(orig.substring(i, orig.length())).toString();
}
private void errorCheckEGL(String s) {