- Timestamp:
- 2013-07-26T10:36:15+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/PurgeAction.java
r5905 r6083 244 244 } 245 245 }); 246 JList list = new JList(toPurgeAdditionally.toArray(new OsmPrimitive[ 0]));246 JList list = new JList(toPurgeAdditionally.toArray(new OsmPrimitive[toPurgeAdditionally.size()])); 247 247 /* force selection to be active for all entries */ 248 248 list.setCellRenderer(new OsmPrimitivRenderer() { -
trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java
r5886 r6083 78 78 if (filerename.isSelected()) { 79 79 String newname = nameText; 80 if (newname.indexOf( "/") == -1 && newname.indexOf("\\") == -1) {80 if (newname.indexOf('/') == -1 && newname.indexOf('\\') == -1) { 81 81 newname = file.getParent() + File.separator + newname; 82 82 } -
trunk/src/org/openstreetmap/josm/actions/RestartAction.java
r6069 r6083 102 102 public void run() { 103 103 try { 104 Runtime.getRuntime().exec(cmd.toArray(new String[ ]{}));104 Runtime.getRuntime().exec(cmd.toArray(new String[cmd.size()])); 105 105 } catch (IOException e) { 106 106 e.printStackTrace(); -
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r6069 r6083 245 245 } else if (key.equals("K:")) { 246 246 IgnoreKeyPair tmp = new IgnoreKeyPair(); 247 int mid = line.indexOf( "=");247 int mid = line.indexOf('='); 248 248 tmp.key = line.substring(0, mid); 249 249 tmp.value = line.substring(mid+1); … … 402 402 withErrors.put(p, "IPK"); 403 403 } 404 if (checkKeys && key.indexOf( " ") >= 0 && !withErrors.contains(p, "IPK")) {404 if (checkKeys && key.indexOf(' ') >= 0 && !withErrors.contains(p, "IPK")) { 405 405 errors.add( new TestError(this, Severity.WARNING, tr("Invalid white space in property key"), 406 406 tr(s, key), MessageFormat.format(s, key), INVALID_KEY_SPACE, p) ); -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r6070 r6083 181 181 } 182 182 183 Getopt g = new Getopt("JOSM", args, "hv", los.toArray(new LongOpt[ 0]));183 Getopt g = new Getopt("JOSM", args, "hv", los.toArray(new LongOpt[los.size()])); 184 184 185 185 Map<Option, Collection<String>> argMap = new HashMap<Option, Collection<String>>(); -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r6070 r6083 524 524 SeparatorLayerAction.INSTANCE, 525 525 new LayerListPopup.InfoAction(this)})); 526 return actions.toArray(new Action[ 0]);526 return actions.toArray(new Action[actions.size()]); 527 527 } 528 528 -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r5901 r6083 301 301 entries.add(new LayerListPopup.InfoAction(this)); 302 302 303 return entries.toArray(new Action[ 0]);303 return entries.toArray(new Action[entries.size()]); 304 304 305 305 } -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java
r6070 r6083 530 530 Color bkground = new Color(255, 255, 255, 128); 531 531 int lastPos = 0; 532 int pos = osdText.indexOf( "\n");532 int pos = osdText.indexOf('\n'); 533 533 int x = 3; 534 534 int y = 3; … … 543 543 y += (int) lineSize.getHeight(); 544 544 lastPos = pos + 1; 545 pos = osdText.indexOf( "\n", lastPos);545 pos = osdText.indexOf('\n', lastPos); 546 546 } 547 547 -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java
r6070 r6083 249 249 wayPointFromTimeStamp.time = startTime; 250 250 String name = wavFile.getName(); 251 int dot = name.lastIndexOf( ".");251 int dot = name.lastIndexOf('.'); 252 252 if (dot > 0) { 253 253 name = name.substring(0, dot); -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
r5762 r6083 252 252 components.add(SeparatorLayerAction.INSTANCE); 253 253 components.add(new LayerListPopup.InfoAction(this)); 254 return components.toArray(new Action[ 0]);254 return components.toArray(new Action[components.size()]); 255 255 } 256 256 -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r6070 r6083 165 165 { 166 166 String[] a; 167 if(fileset.indexOf( "=") >= 0) {167 if(fileset.indexOf('=') >= 0) { 168 168 a = fileset.split("=", 2); 169 169 } else { -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java
r3894 r6083 52 52 Color convertColor(String colString) 53 53 { 54 int i = colString.indexOf( "#");54 int i = colString.indexOf('#'); 55 55 Color ret; 56 56 if (i < 0) { -
trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java
r5587 r6083 92 92 // remove trailing slashes 93 93 while(url.endsWith("/")) { 94 url = url.substring(0, url.lastIndexOf( "/"));94 url = url.substring(0, url.lastIndexOf('/')); 95 95 } 96 96 return url; -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
r6070 r6083 349 349 for (File f: new File(".").listFiles()) { 350 350 String s = f.getName(); 351 int idx = s.indexOf( "_");351 int idx = s.indexOf('_'); 352 352 if (idx>=0) { 353 353 String t=s.substring(0,idx); … … 359 359 for (File f: Main.pref.getPreferencesDirFile().listFiles()) { 360 360 String s = f.getName(); 361 int idx = s.indexOf( "_");361 int idx = s.indexOf('_'); 362 362 if (idx>=0) { 363 363 String t=s.substring(0,idx); -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java
r6070 r6083 110 110 } 111 111 } 112 return projections.toArray(new String[ 0]);112 return projections.toArray(new String[projections.size()]); 113 113 } 114 114 … … 134 134 135 135 if(args != null) { 136 String[] array = args.toArray(new String[ 0]);136 String[] array = args.toArray(new String[args.size()]); 137 137 138 138 if (array.length > 1) { -
trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java
r5926 r6083 157 157 String apiUrl = url.trim(); 158 158 while(apiUrl.endsWith("/")) { 159 apiUrl = apiUrl.substring(0, apiUrl.lastIndexOf( "/"));159 apiUrl = apiUrl.substring(0, apiUrl.lastIndexOf('/')); 160 160 } 161 161 return apiUrl; -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r6070 r6083 1120 1120 for (PluginProxy p : pluginList) { 1121 1121 String baseClass = p.getPluginInformation().className; 1122 baseClass = baseClass.substring(0, baseClass.lastIndexOf( "."));1122 baseClass = baseClass.substring(0, baseClass.lastIndexOf('.')); 1123 1123 for (int elpos = 0; elpos < pos; ++elpos) { 1124 1124 if (stack[elpos].getClassName().startsWith(baseClass)) { -
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r6070 r6083 230 230 { 231 231 String v = (String)entry.getValue(); 232 int i = v.indexOf( ";");232 int i = v.indexOf(';'); 233 233 if(i > 0) 234 234 { -
trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
r6070 r6083 122 122 { 123 123 urltext = urltext.substring(0,maxlen); 124 int idx = urltext.lastIndexOf( "\n");124 int idx = urltext.lastIndexOf('\n'); 125 125 /* cut whole line when not loosing too much */ 126 126 if(maxlen-idx < 200) { -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r5874 r6083 255 255 { 256 256 int i; 257 if(ctx == null && text.startsWith("_:") && (i = text.indexOf( "\n")) >= 0)257 if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) 258 258 { 259 259 ctx = text.substring(2,i-1); … … 287 287 { 288 288 int i; 289 if(ctx == null && text.startsWith("_:") && (i = text.indexOf( "\n")) >= 0)289 if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) 290 290 { 291 291 ctx = text.substring(2,i-1);
Note:
See TracChangeset
for help on using the changeset viewer.