From 580b097cb031ee97180849736f66b1c60fe515e1 Mon Sep 17 00:00:00 2001 From: renanse Date: Wed, 19 Dec 2012 17:30:05 -0600 Subject: Various audit cleanup suggestions. --- .../src/main/java/com/ardor3d/example/ExampleRunner.java | 5 +++-- .../com/ardor3d/example/pipeline/ScenegraphTree.java | 16 ++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'ardor3d-examples/src') diff --git a/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleRunner.java b/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleRunner.java index d60f204..32f638a 100644 --- a/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleRunner.java +++ b/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleRunner.java @@ -642,7 +642,8 @@ public class ExampleRunner extends JFrame { * @see FileFilter */ public boolean accept(final File pathname) { - return (pathname.isDirectory() && !pathname.getName().startsWith(".")) + return (pathname.isDirectory() && (pathname.getName().length() == 0 || pathname.getName() + .charAt(0) != '.')) || (pathname.getName().endsWith(".class") && pathname.getName().indexOf('$') < 0); } }; @@ -661,7 +662,7 @@ public class ExampleRunner extends JFrame { if (name.endsWith(".class") && name.indexOf('$') < 0) { String classname = name.substring(0, name.length() - ".class".length()); - if (classname.startsWith("/")) { + if (classname.length() > 0 && classname.charAt(0) == '/') { classname = classname.substring(1); } classname = classname.replace('/', '.'); diff --git a/ardor3d-examples/src/main/java/com/ardor3d/example/pipeline/ScenegraphTree.java b/ardor3d-examples/src/main/java/com/ardor3d/example/pipeline/ScenegraphTree.java index b1d78aa..38612f2 100644 --- a/ardor3d-examples/src/main/java/com/ardor3d/example/pipeline/ScenegraphTree.java +++ b/ardor3d-examples/src/main/java/com/ardor3d/example/pipeline/ScenegraphTree.java @@ -70,27 +70,27 @@ public class ScenegraphTree { str.append(spatial.getName()); str.append(" - "); - str.append(spatial.getClass().getName()).append("\n"); + str.append(spatial.getClass().getName()).append('\n'); if (spatial instanceof Mesh) { final Mesh mesh = (Mesh) spatial; str.append("Primitives: "); - str.append(mesh.getMeshData().getTotalPrimitiveCount()).append("\n"); + str.append(mesh.getMeshData().getTotalPrimitiveCount()).append('\n'); str.append("Index mode: "); - str.append(mesh.getMeshData().getIndexMode(0)).append("\n"); + str.append(mesh.getMeshData().getIndexMode(0)).append('\n'); } - str.append(spatial.getTransform()).append("\n"); + str.append(spatial.getTransform()).append('\n'); if (spatial.getWorldBound() != null) { - str.append(spatial.getWorldBound()).append("\n"); + str.append(spatial.getWorldBound()).append('\n'); } - str.append("\n"); + str.append('\n'); final SceneHints sceneHints = spatial.getSceneHints(); str.append("Cull hint: "); - str.append(sceneHints.getCullHint()).append("\n"); + str.append(sceneHints.getCullHint()).append('\n'); str.append("Bucket: "); - str.append(sceneHints.getRenderBucketType()).append("\n"); + str.append(sceneHints.getRenderBucketType()).append('\n'); textArea.setText(str.toString()); } -- cgit v1.2.3