Index: trunk/src/org/openstreetmap/josm/actions/PurgeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/PurgeAction.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/actions/PurgeAction.java	(revision 6083)
@@ -244,5 +244,5 @@
                 }
             });
-            JList list = new JList(toPurgeAdditionally.toArray(new OsmPrimitive[0]));
+            JList list = new JList(toPurgeAdditionally.toArray(new OsmPrimitive[toPurgeAdditionally.size()]));
             /* force selection to be active for all entries */
             list.setCellRenderer(new OsmPrimitivRenderer() {
Index: trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java	(revision 6083)
@@ -78,5 +78,5 @@
             if (filerename.isSelected()) {
                 String newname = nameText;
-                if (newname.indexOf("/") == -1 && newname.indexOf("\\") == -1) {
+                if (newname.indexOf('/') == -1 && newname.indexOf('\\') == -1) {
                     newname = file.getParent() + File.separator + newname;
                 }
Index: trunk/src/org/openstreetmap/josm/actions/RestartAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/RestartAction.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/actions/RestartAction.java	(revision 6083)
@@ -102,5 +102,5 @@
                 public void run() {
                     try {
-                        Runtime.getRuntime().exec(cmd.toArray(new String[]{}));
+                        Runtime.getRuntime().exec(cmd.toArray(new String[cmd.size()]));
                     } catch (IOException e) {
                         e.printStackTrace();
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 6083)
@@ -245,5 +245,5 @@
                         } else if (key.equals("K:")) {
                             IgnoreKeyPair tmp = new IgnoreKeyPair();
-                            int mid = line.indexOf("=");
+                            int mid = line.indexOf('=');
                             tmp.key = line.substring(0, mid);
                             tmp.value = line.substring(mid+1);
@@ -402,5 +402,5 @@
                 withErrors.put(p, "IPK");
             }
-            if (checkKeys && key.indexOf(" ") >= 0 && !withErrors.contains(p, "IPK")) {
+            if (checkKeys && key.indexOf(' ') >= 0 && !withErrors.contains(p, "IPK")) {
                 errors.add( new TestError(this, Severity.WARNING, tr("Invalid white space in property key"),
                         tr(s, key), MessageFormat.format(s, key), INVALID_KEY_SPACE, p) );
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 6083)
@@ -181,5 +181,5 @@
         }
 
-        Getopt g = new Getopt("JOSM", args, "hv", los.toArray(new LongOpt[0]));
+        Getopt g = new Getopt("JOSM", args, "hv", los.toArray(new LongOpt[los.size()]));
 
         Map<Option, Collection<String>> argMap = new HashMap<Option, Collection<String>>();
Index: trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 6083)
@@ -524,5 +524,5 @@
                 SeparatorLayerAction.INSTANCE,
                 new LayerListPopup.InfoAction(this)}));
-        return actions.toArray(new Action[0]);
+        return actions.toArray(new Action[actions.size()]);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 6083)
@@ -301,5 +301,5 @@
         entries.add(new LayerListPopup.InfoAction(this));
 
-        return entries.toArray(new Action[0]);
+        return entries.toArray(new Action[entries.size()]);
 
     }
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java	(revision 6083)
@@ -530,5 +530,5 @@
                 Color bkground = new Color(255, 255, 255, 128);
                 int lastPos = 0;
-                int pos = osdText.indexOf("\n");
+                int pos = osdText.indexOf('\n');
                 int x = 3;
                 int y = 3;
@@ -543,5 +543,5 @@
                     y += (int) lineSize.getHeight();
                     lastPos = pos + 1;
-                    pos = osdText.indexOf("\n", lastPos);
+                    pos = osdText.indexOf('\n', lastPos);
                 }
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 6083)
@@ -249,5 +249,5 @@
                 wayPointFromTimeStamp.time = startTime;
                 String name = wavFile.getName();
-                int dot = name.lastIndexOf(".");
+                int dot = name.lastIndexOf('.');
                 if (dot > 0) {
                     name = name.substring(0, dot);
Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 6083)
@@ -252,5 +252,5 @@
         components.add(SeparatorLayerAction.INSTANCE);
         components.add(new LayerListPopup.InfoAction(this));
-        return components.toArray(new Action[0]);
+        return components.toArray(new Action[components.size()]);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 6083)
@@ -165,5 +165,5 @@
         {
             String[] a;
-            if(fileset.indexOf("=") >= 0) {
+            if(fileset.indexOf('=') >= 0) {
                 a = fileset.split("=", 2);
             } else {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java	(revision 6083)
@@ -52,5 +52,5 @@
     Color convertColor(String colString)
     {
-        int i = colString.indexOf("#");
+        int i = colString.indexOf('#');
         Color ret;
         if (i < 0) {
Index: trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java	(revision 6083)
@@ -92,5 +92,5 @@
         // remove trailing slashes
         while(url.endsWith("/")) {
-            url = url.substring(0, url.lastIndexOf("/"));
+            url = url.substring(0, url.lastIndexOf('/'));
         }
         return url;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 6083)
@@ -349,5 +349,5 @@
                 for (File f: new File(".").listFiles()) {
                    String s = f.getName();
-                   int idx = s.indexOf("_");
+                   int idx = s.indexOf('_');
                    if (idx>=0) {
                         String t=s.substring(0,idx);
@@ -359,5 +359,5 @@
                 for (File f: Main.pref.getPreferencesDirFile().listFiles()) {
                    String s = f.getName();
-                   int idx = s.indexOf("_");
+                   int idx = s.indexOf('_');
                    if (idx>=0) {
                         String t=s.substring(0,idx);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java	(revision 6083)
@@ -110,5 +110,5 @@
             }
         }
-        return projections.toArray(new String[0]);
+        return projections.toArray(new String[projections.size()]);
     }
 
@@ -134,5 +134,5 @@
 
         if(args != null) {
-            String[] array = args.toArray(new String[0]);
+            String[] array = args.toArray(new String[args.size()]);
 
             if (array.length > 1) {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java	(revision 6083)
@@ -157,5 +157,5 @@
         String apiUrl = url.trim();
         while(apiUrl.endsWith("/")) {
-            apiUrl = apiUrl.substring(0, apiUrl.lastIndexOf("/"));
+            apiUrl = apiUrl.substring(0, apiUrl.lastIndexOf('/'));
         }
         return apiUrl;
Index: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 6083)
@@ -1120,5 +1120,5 @@
         for (PluginProxy p : pluginList) {
             String baseClass = p.getPluginInformation().className;
-            baseClass = baseClass.substring(0, baseClass.lastIndexOf("."));
+            baseClass = baseClass.substring(0, baseClass.lastIndexOf('.'));
             for (int elpos = 0; elpos < pos; ++elpos) {
                 if (stack[elpos].getClassName().startsWith(baseClass)) {
Index: trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 6083)
@@ -230,5 +230,5 @@
                         {
                             String v = (String)entry.getValue();
-                            int i = v.indexOf(";");
+                            int i = v.indexOf(';');
                             if(i > 0)
                             {
Index: trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 6083)
@@ -122,5 +122,5 @@
                             {
                                 urltext = urltext.substring(0,maxlen);
-                                int idx = urltext.lastIndexOf("\n");
+                                int idx = urltext.lastIndexOf('\n');
                                 /* cut whole line when not loosing too much */
                                 if(maxlen-idx < 200) {
Index: trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 6082)
+++ trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 6083)
@@ -255,5 +255,5 @@
     {
         int i;
-        if(ctx == null && text.startsWith("_:") && (i = text.indexOf("\n")) >= 0)
+        if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0)
         {
             ctx = text.substring(2,i-1);
@@ -287,5 +287,5 @@
     {
         int i;
-        if(ctx == null && text.startsWith("_:") && (i = text.indexOf("\n")) >= 0)
+        if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0)
         {
             ctx = text.substring(2,i-1);
