aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/javax
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-04-01 16:34:41 +0200
committerSven Gothel <[email protected]>2014-04-01 16:34:41 +0200
commit6bee2a236e4ca4e1fac5d6f975e32b5942e1edf6 (patch)
tree720e8c9d525606a6b27df6b87ebc481e1cf955d9 /src/nativewindow/classes/javax
parent07d1c5a272e528d130daf37b9aa7077aac8d748e (diff)
Cleanup *GraphicsDevice: Use 'final' for ctor parameter; DefaultGraphicsDevice.getUniqueID(..) shall perform 'intern()' only once.
Diffstat (limited to 'src/nativewindow/classes/javax')
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java
index 15ff2b1ac..f733f91de 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java
@@ -49,7 +49,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice
* gathered via {@link NativeWindowFactory#getDefaultToolkitLock(String)}.
* @param type
*/
- public DefaultGraphicsDevice(String type, String connection, int unitID) {
+ public DefaultGraphicsDevice(final String type, final String connection, final int unitID) {
this(type, connection, unitID, 0, NativeWindowFactory.getDefaultToolkitLock(type));
}
@@ -59,7 +59,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice
* @param type
* @param handle
*/
- public DefaultGraphicsDevice(String type, String connection, int unitID, long handle) {
+ public DefaultGraphicsDevice(final String type, final String connection, final int unitID, final long handle) {
this(type, connection, unitID, handle, NativeWindowFactory.getDefaultToolkitLock(type, handle));
}
@@ -69,7 +69,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice
* @param handle
* @param locker if null, a non blocking <i>null</i> lock is used.
*/
- public DefaultGraphicsDevice(String type, String connection, int unitID, long handle, ToolkitLock locker) {
+ public DefaultGraphicsDevice(final String type, final String connection, final int unitID, final long handle, final ToolkitLock locker) {
this.type = type;
this.connection = connection;
this.unitID = unitID;
@@ -247,8 +247,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice
* Returns a unique String object using {@link String#intern()} for the given arguments,
* which object reference itself can be used as a key.
*/
- private static String getUniqueID(String type, String connection, int unitID) {
- final String r = (type + separator + connection + separator + unitID).intern();
- return r.intern();
+ private static String getUniqueID(final String type, final String connection, final int unitID) {
+ return (type + separator + connection + separator + unitID).intern();
}
}