Changeset 36362 in osm for applications/editors/josm/plugins/utilsplugin2/src/org
- Timestamp:
- 2025-01-02T14:16:53+01:00 (12 months ago)
- Location:
- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2
- Files:
-
- 9 edited
-
customurl/OpenPageAction.java (modified) (2 diffs)
-
customurl/UtilsPluginPreferences.java (modified) (1 diff)
-
latlon/LatLonDialog.java (modified) (1 diff)
-
search/ConnectedMatch.java (modified) (1 diff)
-
search/InsideMatch.java (modified) (1 diff)
-
search/IntersectingMatch.java (modified) (1 diff)
-
search/RangeMatch.java (modified) (1 diff)
-
selection/NodeWayUtils.java (modified) (1 diff)
-
selection/SelectHighwayAction.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/OpenPageAction.java
r35579 r36362 7 7 import java.awt.event.ActionEvent; 8 8 import java.awt.event.KeyEvent; 9 import java.io.IOException; 9 10 import java.io.UnsupportedEncodingException; 10 11 import java.net.URLEncoder; 12 import java.net.HttpURLConnection; 13 import java.net.URL; 11 14 import java.util.Collection; 12 15 import java.util.regex.Matcher; … … 98 101 addr = addr.replace(keys[j], vals[j]); 99 102 } 103 104 // Opened on the local system instead of the browser: local:http://127.0.0.1:<port>/script 105 Pattern pat_direct = Pattern.compile("local:(http.*)$"); 106 Matcher m_direct = pat_direct.matcher(addr); 107 100 108 try { 109 if (m_direct.find()) { 110 addr = m_direct.group(1); // replace addr so possible error uses it 111 Logging.info("Opening on the local system: " + addr); 112 URL url = new URL(addr); 113 HttpURLConnection urlConn = (HttpURLConnection) url.openConnection(); 114 urlConn.setRequestMethod("GET"); 115 if (urlConn.getResponseCode() != HttpURLConnection.HTTP_OK) { 116 throw new IOException(". GET response:" + urlConn.getResponseCode()); 117 } 118 101 119 // See #12836 - do not load invalid history 102 if (!addr.endsWith("/0/history")) { 120 } else if (!addr.endsWith("/0/history")) { 103 121 OpenBrowser.displayUrl(addr); 104 122 } -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/UtilsPluginPreferences.java
r34454 r36362 137 137 138 138 private List<String> readItemsFromTable() { 139 TableModel model = (table.getModel());139 TableModel model = table.getModel(); 140 140 String v; 141 141 ArrayList<String> lst = new ArrayList<>(); -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonDialog.java
r35476 r36362 347 347 } else if (m.group(7) != null) { 348 348 sb.append("x"); // cardinal direction 349 String c = m.group(7).toUpperCase(); 349 String c = m.group(7).toUpperCase(Locale.ROOT); 350 350 if ("N".equals(c) || "S".equals(c) || "E".equals(c) || "W".equals(c)) { 351 351 list.add(c); -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/ConnectedMatch.java
r35476 r36362 80 80 if (this == obj) 81 81 return true; 82 if (!super.equals(obj) || getClass() != obj.getClass())82 if (!super.equals(obj) || !(obj instanceof ConnectedMatch)) 83 83 return false; 84 84 ConnectedMatch other = (ConnectedMatch) obj; -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/InsideMatch.java
r35476 r36362 62 62 if (this == obj) 63 63 return true; 64 if (!super.equals(obj) || getClass() != obj.getClass())64 if (!super.equals(obj) || !(obj instanceof InsideMatch)) 65 65 return false; 66 66 InsideMatch other = (InsideMatch) obj; -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/IntersectingMatch.java
r35476 r36362 70 70 if (this == obj) 71 71 return true; 72 if (!super.equals(obj) || getClass() != obj.getClass())72 if (!super.equals(obj) || !(obj instanceof IntersectingMatch)) 73 73 return false; 74 74 IntersectingMatch other = (IntersectingMatch) obj; -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/RangeMatch.java
r35970 r36362 53 53 if (this == obj) 54 54 return true; 55 if ( obj == null || getClass() != obj.getClass())55 if (!(obj instanceof RangeMatch)) 56 56 return false; 57 57 RangeMatch other = (RangeMatch) obj; -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/NodeWayUtils.java
r35613 r36362 433 433 434 434 /** 435 * Get Count of Ray intersections 435 436 * @param point - point to start an OX-parallel ray 436 437 * @param polygonPoints - poits forming bundary, use null to split unconnected segmants -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectHighwayAction.java
r35674 r36362 194 194 public List<Way> getPath(Way to) { 195 195 if (to == null) 196 return Collections.singletonList(tree.get(0)); 196 return Collections.unmodifiableList(Collections.singletonList(tree.get(0))); 197 197 int pos = tree.indexOf(to); 198 198 if (pos < 0)
Note:
See TracChangeset
for help on using the changeset viewer.
