Changeset 11553 in josm for trunk/src/org/openstreetmap/josm/plugins
- Timestamp:
- 2017-02-12T16:32:18+01:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r10627 r11553 18 18 import java.util.Locale; 19 19 import java.util.Map; 20 import java.util.Optional; 20 21 import java.util.TreeMap; 21 22 import java.util.jar.Attributes; … … 199 200 Attributes attr = manifest.getMainAttributes(); 200 201 className = attr.getValue("Plugin-Class"); 201 String s = attr.getValue(lang+"Plugin-Link"); 202 if (s == null) { 203 s = attr.getValue("Plugin-Link"); 204 } 202 String s = Optional.ofNullable(attr.getValue(lang+"Plugin-Link")).orElseGet(() -> attr.getValue("Plugin-Link")); 205 203 if (s != null && !Utils.isValidUrl(s)) { 206 204 Main.info(tr("Invalid URL ''{0}'' in plugin {1}", s, name)); -
trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
r10952 r11553 22 22 import java.util.LinkedList; 23 23 import java.util.List; 24 import java.util.Optional; 24 25 import java.util.Set; 25 26 … … 54 55 55 56 protected final void init(Collection<String> sites, boolean displayErrMsg) { 56 this.sites = sites; 57 if (sites == null) { 58 this.sites = Collections.emptySet(); 59 } 57 this.sites = Optional.ofNullable(sites).orElseGet(Collections::emptySet); 60 58 this.availablePlugins = new LinkedList<>(); 61 59 this.displayErrMsg = displayErrMsg;
Note:
See TracChangeset
for help on using the changeset viewer.