summaryrefslogtreecommitdiffstats
path: root/test/com/jogamp/opencl/CLExceptionTest.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-03 16:35:47 +0200
committerSven Gothel <[email protected]>2014-07-03 16:35:47 +0200
commita90ee128ce0550cd05f969d0283312c2f42b8254 (patch)
treedade644101970d8f69ea3845db310499f2b66a76 /test/com/jogamp/opencl/CLExceptionTest.java
parenta0e0c8a39d0ef41ff6b64d9b40d058f21b786e81 (diff)
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
Diffstat (limited to 'test/com/jogamp/opencl/CLExceptionTest.java')
-rw-r--r--test/com/jogamp/opencl/CLExceptionTest.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/com/jogamp/opencl/CLExceptionTest.java b/test/com/jogamp/opencl/CLExceptionTest.java
index 5a1ce89b..8a61fd0f 100644
--- a/test/com/jogamp/opencl/CLExceptionTest.java
+++ b/test/com/jogamp/opencl/CLExceptionTest.java
@@ -47,20 +47,20 @@ public class CLExceptionTest extends UITestCase {
@Test
public void testCLExceptions() throws InstantiationException, IllegalAccessException, NoSuchMethodException, IllegalArgumentException, InvocationTargetException {
- Class<?>[] subTypes = CLException.class.getDeclaredClasses();
+ final Class<?>[] subTypes = CLException.class.getDeclaredClasses();
- for (Class<?> type : subTypes) {
+ for (final Class<?> type : subTypes) {
if(type.getName().startsWith(CLException.class.getName()+"$CL")) {
- CLException exception = (CLException) type.getConstructor(String.class).newInstance("foo");
+ final CLException exception = (CLException) type.getConstructor(String.class).newInstance("foo");
assertNotNull("can not resolve "+exception, CLException.resolveErrorCode(exception.errorcode));
try{
CLException.checkForError(exception.errorcode, "foo");
fail("expected exception for: "+exception.getClass().getName()+" code: "+exception.errorcode);
- }catch(CLException ex) {
+ }catch(final CLException ex) {
assertTrue("wrong instance; expected "+exception.getClass()+" but got "+ex.getClass(),
exception.getClass().equals(ex.getClass()));
}
@@ -68,8 +68,8 @@ public class CLExceptionTest extends UITestCase {
}
}
- public static void main(String[] args) throws IOException {
- String tstname = CLExceptionTest.class.getName();
+ public static void main(final String[] args) throws IOException {
+ final String tstname = CLExceptionTest.class.getName();
org.junit.runner.JUnitCore.main(tstname);
}
}