From df9ff7f340a5ab4e07efc613f5f264eeae63d4c7 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 3 Jul 2014 16:06:47 +0200 Subject: Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines --- .../jogamp/common/util/TestValueConversion.java | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/junit/com/jogamp/common/util/TestValueConversion.java') diff --git a/src/junit/com/jogamp/common/util/TestValueConversion.java b/src/junit/com/jogamp/common/util/TestValueConversion.java index 13cd0cd..6c86803 100644 --- a/src/junit/com/jogamp/common/util/TestValueConversion.java +++ b/src/junit/com/jogamp/common/util/TestValueConversion.java @@ -99,15 +99,15 @@ public class TestValueConversion { @Test public void testConversion() { - byte sb0 = 127; - byte sb1 = -128; + final byte sb0 = 127; + final byte sb1 = -128; - float sf0 = byte_to_float(sb0, true); - float sf1 = byte_to_float(sb1, true); - short ss0 = byte_to_short(sb0, true, true); - short ss1 = byte_to_short(sb1, true, true); - int si0 = byte_to_int(sb0, true, true); - int si1 = byte_to_int(sb1, true, true); + final float sf0 = byte_to_float(sb0, true); + final float sf1 = byte_to_float(sb1, true); + final short ss0 = byte_to_short(sb0, true, true); + final short ss1 = byte_to_short(sb1, true, true); + final int si0 = byte_to_int(sb0, true, true); + final int si1 = byte_to_int(sb1, true, true); Assert.assertEquals(1.0f, sf0, 0.0); Assert.assertEquals(-1.0f, sf1, 0.0); @@ -121,10 +121,10 @@ public class TestValueConversion { Assert.assertEquals(sb0, int_to_byte(si0, true, true)); Assert.assertEquals(sb1, int_to_byte(si1, true, true)); - byte ub0 = (byte) 0xff; - float uf0 = byte_to_float(ub0, false); - short us0 = byte_to_short(ub0, false, false); - int ui0 = byte_to_int(ub0, false, false); + final byte ub0 = (byte) 0xff; + final float uf0 = byte_to_float(ub0, false); + final short us0 = byte_to_short(ub0, false, false); + final int ui0 = byte_to_int(ub0, false, false); Assert.assertEquals(1.0f, uf0, 0.0); Assert.assertEquals((short)0xffff, us0); @@ -134,7 +134,7 @@ public class TestValueConversion { Assert.assertEquals(us0, int_to_short(ui0, false, false)); } - public static void main(String args[]) { + public static void main(final String args[]) { org.junit.runner.JUnitCore.main(TestValueConversion.class.getName()); } -- cgit v1.2.3