diff options
author | Sven Gothel <[email protected]> | 2014-07-03 16:06:47 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-03 16:06:47 +0200 |
commit | df9ff7f340a5ab4e07efc613f5f264eeae63d4c7 (patch) | |
tree | 239ae276b82024b140428e6c0fe5d739fdd686a4 /test/junit/com/jogamp/gluegen/BuildUtil.java | |
parent | eb47aaba63e3b1bf55f274a0f338f1010a017ae4 (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/BuildUtil.java')
-rw-r--r-- | test/junit/com/jogamp/gluegen/BuildUtil.java | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/test/junit/com/jogamp/gluegen/BuildUtil.java b/test/junit/com/jogamp/gluegen/BuildUtil.java index ce88ba2..5f6fd8b 100644 --- a/test/junit/com/jogamp/gluegen/BuildUtil.java +++ b/test/junit/com/jogamp/gluegen/BuildUtil.java @@ -3,14 +3,14 @@ * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR @@ -20,12 +20,12 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of JogAmp Community. */ - + package com.jogamp.gluegen; import com.jogamp.gluegen.JavaEmitter; @@ -44,12 +44,12 @@ import static java.lang.System.*; public final class BuildUtil { private static final Project project; - + public static final String gluegenRoot; public static final String path; public static final String testOutput; public static final String rootrel_build; - + static { out.println(" - - - System info - - - "); @@ -65,11 +65,11 @@ public final class BuildUtil { // setup paths try { - File executionRoot = new File(BuildUtil.class.getProtectionDomain().getCodeSource().getLocation().toURI()); + final File executionRoot = new File(BuildUtil.class.getProtectionDomain().getCodeSource().getLocation().toURI()); out.println("execution root: " + executionRoot); gluegenRoot = executionRoot.getParentFile().getParentFile().getParentFile().getParentFile().toString(); out.println("gluegen project root: " + gluegenRoot); - } catch (URISyntaxException ex) { + } catch (final URISyntaxException ex) { throw new RuntimeException("can not determine gluegen root", ex); } @@ -88,7 +88,7 @@ public final class BuildUtil { passSystemProperty(project, "gluegen-cpptasks.file"); passSystemProperty(project, "os.arch"); - DefaultLogger logger = new DefaultLogger(); + final DefaultLogger logger = new DefaultLogger(); logger.setErrorPrintStream(out); logger.setOutputPrintStream(out); logger.setMessageOutputLevel(Project.MSG_WARN); @@ -96,7 +96,7 @@ public final class BuildUtil { project.init(); - File buildFile = new File(path, "build.xml"); + final File buildFile = new File(path, "build.xml"); if(!buildFile.exists()) { throw new RuntimeException("buildfile "+buildFile+" does not exist"); } @@ -104,8 +104,8 @@ public final class BuildUtil { ProjectHelper.configureProject(project, buildFile); } - public static Project passSystemProperty(Project p, String name) { - String tmp = System.getProperty(name); + public static Project passSystemProperty(final Project p, final String name) { + final String tmp = System.getProperty(name); if(null!=tmp && tmp.length()>0) { p.setProperty(name, tmp); } @@ -138,15 +138,15 @@ public final class BuildUtil { out.println("done"); } - public static void generate(String bindingName) { + public static void generate(final String bindingName) { generate(bindingName, JavaEmitter.class.getName()); // generate(bindingName, DebugEmitter.class.getName()); } - public static void generate(String bindingName, String emitter) { + public static void generate(final String bindingName, final String emitter) { generate(bindingName, bindingName, emitter); } - public static void generate(String bindingName, String header, String emitter) { + public static void generate(final String bindingName, final String header, final String emitter) { out.println("generate binding to '" + bindingName+"' using '"+emitter+"'"); @@ -159,10 +159,10 @@ public final class BuildUtil { out.println("done"); } - public static void deleteDirectory(File path) { + public static void deleteDirectory(final File path) { if(path.exists()) { - File[] files = path.listFiles(); + final File[] files = path.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { deleteDirectory(files[i]); @@ -170,7 +170,7 @@ public final class BuildUtil { files[i].delete(); } } - + path.delete(); } } |