aboutsummaryrefslogtreecommitdiffstats
path: root/test/junit/com/jogamp/gluegen/StructAccessorTest.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-03 16:06:47 +0200
committerSven Gothel <[email protected]>2014-07-03 16:06:47 +0200
commitdf9ff7f340a5ab4e07efc613f5f264eeae63d4c7 (patch)
tree239ae276b82024b140428e6c0fe5d739fdd686a4 /test/junit/com/jogamp/gluegen/StructAccessorTest.java
parenteb47aaba63e3b1bf55f274a0f338f1010a017ae4 (diff)
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
Diffstat (limited to 'test/junit/com/jogamp/gluegen/StructAccessorTest.java')
-rw-r--r--test/junit/com/jogamp/gluegen/StructAccessorTest.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/junit/com/jogamp/gluegen/StructAccessorTest.java b/test/junit/com/jogamp/gluegen/StructAccessorTest.java
index 6c8d0e8..46191f1 100644
--- a/test/junit/com/jogamp/gluegen/StructAccessorTest.java
+++ b/test/junit/com/jogamp/gluegen/StructAccessorTest.java
@@ -76,30 +76,30 @@ public class StructAccessorTest {
public void validateGeneratedStructs() throws IOException, NoSuchMethodException, ClassNotFoundException, IllegalAccessException, InvocationTargetException {
// compile testcase
- String source = gluegenRoot + "/test/junit/com/jogamp/gluegen/StructValidator.java";
+ final String source = gluegenRoot + "/test/junit/com/jogamp/gluegen/StructValidator.java";
compile(new File(source), testOutput + "/build/classes");
// invoke test
- Class<?> test = Class.forName("com.jogamp.gluegen.StructValidator");
+ final Class<?> test = Class.forName("com.jogamp.gluegen.StructValidator");
test.getDeclaredMethod("validate").invoke(null);
}
- private void compile(File file, String dest) throws IOException {
+ private void compile(final File file, final String dest) throws IOException {
compile(new File[] {file}, dest);
}
// yeah, java 6 has even a compiler api...
- private void compile(File[] files, String destination) throws IOException {
+ private void compile(final File[] files, final String destination) throws IOException {
out.println("compiling files:\n " + Arrays.asList(files));
- JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
- DiagnosticCollector<JavaFileObject> collector = new DiagnosticCollector<JavaFileObject>();
- StandardJavaFileManager fileManager = compiler.getStandardFileManager(collector, null, null);
+ final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+ final DiagnosticCollector<JavaFileObject> collector = new DiagnosticCollector<JavaFileObject>();
+ final StandardJavaFileManager fileManager = compiler.getStandardFileManager(collector, null, null);
- Iterable<? extends JavaFileObject> fileObj = fileManager.getJavaFileObjects(files);
+ final Iterable<? extends JavaFileObject> fileObj = fileManager.getJavaFileObjects(files);
- boolean success = compiler.getTask( new OutputStreamWriter(out),
+ final boolean success = compiler.getTask( new OutputStreamWriter(out),
fileManager,
collector,
Arrays.asList("-d", destination/*, "-verbose"*/),
@@ -108,9 +108,9 @@ public class StructAccessorTest {
fileManager.close();
- List<Diagnostic<? extends JavaFileObject>> list = collector.getDiagnostics();
+ final List<Diagnostic<? extends JavaFileObject>> list = collector.getDiagnostics();
if(!list.isEmpty() || !success) {
- for (Diagnostic<? extends JavaFileObject> d : list) {
+ for (final Diagnostic<? extends JavaFileObject> d : list) {
out.println("Error on line "+ d.getLineNumber());
out.println("Compiler Message:\n"+d.getMessage(Locale.ENGLISH));
}