Ticket #8655: unnecessary-toString.diff
File unnecessary-toString.diff, 3.7 KB (added by , 11 years ago) |
---|
-
src/org/openstreetmap/josm/gui/help/HelpBrowser.java
385 385 "<html>Failed to open help page for url {0}.<br>" 386 386 + "This is most likely due to a network problem, please check<br>" 387 387 + "your internet connection</html>", 388 url .toString()388 url 389 389 ), 390 390 tr("Failed to open URL"), 391 391 JOptionPane.ERROR_MESSAGE, -
src/org/openstreetmap/josm/gui/help/HelpBrowserHistory.java
51 51 public void setCurrentUrl(String url) { 52 52 boolean add=true; 53 53 54 if (historyPos >= 0 && historyPos < history.size() && history.get(historyPos). toString().equals(url.toString())) {54 if (historyPos >= 0 && historyPos < history.size() && history.get(historyPos).equals(url.toString())) { 55 55 add = false; 56 56 } else if (historyPos == history.size() -1) { 57 57 // do nothing just append … … 64 64 } 65 65 if(add) 66 66 { 67 history.add(url);68 historyPos = history.size()-1;67 history.add(url); 68 historyPos = history.size()-1; 69 69 } 70 70 setChanged(); 71 71 notifyObservers(); -
src/org/openstreetmap/josm/plugins/PluginListParser.java
37 37 new ByteArrayInputStream(manifest.getBytes("utf-8")), 38 38 name.substring(0, name.length() - 4), 39 39 url 40 );40 ); 41 41 } catch(UnsupportedEncodingException e) { 42 42 throw new PluginListParseException(tr("Failed to create plugin information from manifest for plugin ''{0}''", name), e); 43 43 } catch (PluginException e) { … … 72 72 C; 73 73 } 74 74 B; 75 */75 */ 76 76 for (String line = r.readLine(); line != null; line = r.readLine()) { 77 77 if (line.startsWith("\t")) { 78 78 line = line.substring(1); … … 86 86 addPluginInformation(ret, name, url, manifest.toString()); 87 87 String x[] = line.split(";"); 88 88 if(x.length != 2) 89 throw new IOException(tr("Illegal entry in plugin list."));89 throw new IOException(tr("Illegal entry in plugin list.")); 90 90 name = x[0]; 91 91 url = x[1]; 92 92 manifest = new StringBuilder(); … … 102 102 private static void addPluginInformation(List<PluginInformation> ret, String name, String url, String manifest) { 103 103 try { 104 104 if (name != null) { 105 PluginInformation info = createInfo(name, url, manifest .toString());105 PluginInformation info = createInfo(name, url, manifest); 106 106 if (info != null) { 107 107 for (PluginProxy plugin : PluginHandler.pluginList) { 108 108 if (plugin.getPluginInformation().name.equals(info.getName())) {