changeset 7640:133837ac9acc

[SCENEBUILDER] FindBugs: killed IIO_INEFFICIENT_INDEX_OF and IIO_INEFFICIENT_LAST_INDEX_OF
author yjoan
date Fri, 08 Aug 2014 11:51:03 +0200
parents ad91cef63a6f
children 88da7c8a488d
files apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/skeleton/SkeletonBuffer.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/UsePredefinedSizeJob.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StyleEditor.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/library/LibraryListCell.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/glossary/ControllerClass.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/metadata/util/DesignHierarchyMask.java
diffstat 6 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/skeleton/SkeletonBuffer.java	Fri Aug 08 11:40:03 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/skeleton/SkeletonBuffer.java	Fri Aug 08 11:51:03 2014 +0200
@@ -104,7 +104,7 @@
             if (controller != null && !controller.isEmpty()
                     && controller.contains(".") && !controller.contains("$")) { //NOI18N
                 packageLine.append("package "); //NOI18N
-                packageLine.append(controller.substring(0, controller.indexOf("."))); //NOI18N
+                packageLine.append(controller.substring(0, controller.indexOf('.'))); //NOI18N
                 packageLine.append(";\n\n"); //NOI18N
             }
         }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/UsePredefinedSizeJob.java	Fri Aug 08 11:40:03 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/UsePredefinedSizeJob.java	Fri Aug 08 11:51:03 2014 +0200
@@ -216,7 +216,7 @@
         }
 
         String sizeString = size.toString();
-        return Double.parseDouble(sizeString.substring(5, sizeString.indexOf("x"))); //NOI18N
+        return Double.parseDouble(sizeString.substring(5, sizeString.indexOf('x'))); //NOI18N
     }
     
     private double getHeightFromSize(Size size) {
@@ -227,6 +227,6 @@
         }
         
         String sizeString = size.toString();
-        return Double.parseDouble(sizeString.substring(sizeString.indexOf("x") + 1, sizeString.length())); //NOI18N
+        return Double.parseDouble(sizeString.substring(sizeString.indexOf('x') + 1, sizeString.length())); //NOI18N
     }
 }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StyleEditor.java	Fri Aug 08 11:40:03 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StyleEditor.java	Fri Aug 08 11:51:03 2014 +0200
@@ -355,7 +355,7 @@
                 style = style.substring(0, style.length() - 1);
             }
             // split in property and value
-            int dotIndex = style.indexOf(":");
+            int dotIndex = style.indexOf(':');
             String propertyStr;
             String valueStr = ""; //NOI18N
             if (dotIndex != -1) {
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/library/LibraryListCell.java	Fri Aug 08 11:40:03 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/library/LibraryListCell.java	Fri Aug 08 11:51:03 2014 +0200
@@ -266,7 +266,7 @@
         if (!input.contains(" ")) { //NOI18N
             return input;
         } else {
-            return input.substring(0, input.lastIndexOf(" ")); //NOI18N
+            return input.substring(0, input.lastIndexOf(' ')); //NOI18N
         }
     }
     
@@ -274,7 +274,7 @@
         if (!input.contains(" ")) { //NOI18N
             return ""; //NOI18N
         } else {
-            return input.substring(input.indexOf(" "), input.length()); //NOI18N
+            return input.substring(input.indexOf(' '), input.length()); //NOI18N
         }
     }
 }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/glossary/ControllerClass.java	Fri Aug 08 11:40:03 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/glossary/ControllerClass.java	Fri Aug 08 11:51:03 2014 +0200
@@ -180,7 +180,7 @@
 
     private static String getNoExtensionName(File file) {
         String name = file.getName();
-        int index = name.lastIndexOf(".");//NOI18N
+        int index = name.lastIndexOf('.');//NOI18N
         if (index == -1) {
             index = name.length();
         }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/metadata/util/DesignHierarchyMask.java	Fri Aug 08 11:40:03 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/metadata/util/DesignHierarchyMask.java	Fri Aug 08 11:51:03 2014 +0200
@@ -282,7 +282,7 @@
     public String getSingleLineDescription() {
         String result = getDescription();
         if (result != null && containsLineFeed(result)) {
-            result = result.substring(0, result.indexOf("\n")) + "..."; //NOI18N
+            result = result.substring(0, result.indexOf('\n')) + "..."; //NOI18N
         }
         return result;
     }