Changeset 223 in josm
- Timestamp:
- 2007-04-28T12:02:51+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
r215 r223 6 6 import java.awt.event.ActionListener; 7 7 import java.io.File; 8 import java.net.MalformedURLException; 9 import java.net.URL; 8 10 import java.util.HashMap; 9 11 import java.util.LinkedList; … … 17 19 import org.openstreetmap.josm.gui.MapView; 18 20 import org.openstreetmap.josm.tools.ImageProvider; 19 20 import com.sun.org.apache.xerces.internal.util.URI;21 21 22 22 /** … … 75 75 76 76 // Try a relative file:// url, if the link is not in an URL-compatible form 77 if (relativePath != null && link != null && ! URI.isWellFormedAddress(link))77 if (relativePath != null && link != null && !isWellFormedAddress(link)) 78 78 link = new File(relativePath, link).toURI().toString(); 79 79 … … 87 87 return WebMarker.create(ll, link); 88 88 } 89 90 private boolean isWellFormedAddress(String link) { 91 try { 92 new URL(link); 93 return true; 94 } catch (MalformedURLException x) { 95 return false; 96 } 97 } 89 98 }); 90 99 }
Note:
See TracChangeset
for help on using the changeset viewer.