- Timestamp:
- 2018-05-13T09:15:15+02:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
r13733 r13741 186 186 187 187 Collection<String> wmsFormats = wms.getFormats(); 188 final JComboBox<String> formats = new JComboBox<>(wmsFormats.toArray(new String[ wmsFormats.size()]));188 final JComboBox<String> formats = new JComboBox<>(wmsFormats.toArray(new String[0])); 189 189 formats.setSelectedItem(wms.getPreferredFormat()); 190 190 formats.setToolTipText(tr("Select image format for WMS layer")); -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java
r13734 r13741 86 86 tree.updateTree(wms); 87 87 Collection<String> wmsFormats = wms.getFormats(); 88 formats.setModel(new DefaultComboBoxModel<>(wmsFormats.toArray(new String[ wmsFormats.size()])));88 formats.setModel(new DefaultComboBoxModel<>(wmsFormats.toArray(new String[0]))); 89 89 formats.setSelectedItem(wms.getPreferredFormat()); 90 90 } catch (MalformedURLException ex1) { -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanel.java
r13734 r13741 36 36 public class AddWMTSLayerPanel extends AddImageryPanel { 37 37 private final transient JPanel layerPanel = new JPanel(new GridBagLayout()); 38 private transient JTable layerTable = null;38 private transient JTable layerTable; 39 39 private final JCheckBox setDefaultLayer = new JCheckBox(tr("Set default layer?")); 40 40 private List<Entry<String, List<Layer>>> layers; … … 92 92 if (layerTable == null) { 93 93 // did not call get capabilities 94 throw new RuntimeException("TODO");94 throw new IllegalArgumentException(tr("You need to get fetch layers")); 95 95 } 96 96 int index = layerTable.getSelectedRow(); 97 97 if (index < 0) { 98 throw new RuntimeException("TODO");98 throw new IllegalArgumentException(tr("Invalid layer selected. Index: {1}", index)); 99 99 } 100 100 Layer selectedLayer = layers.get(layerTable.convertRowIndexToModel(index)).getValue().get(0); -
trunk/src/org/openstreetmap/josm/io/CachedFile.java
r13731 r13741 551 551 552 552 private static String truncatePath(String directory, String fileName) { 553 String ret = fileName;554 553 if (directory.length() + fileName.length() > 255) { 555 554 // Windows doesn't support paths longer than 260, leave 5 chars as safe buffer, 4 will be used by ".tmp" -
trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
r13733 r13741 183 183 try { 184 184 capabilitiesUrl = new File(workingAddress).toURI().toURL(); 185 } catch (MalformedURLException e1) { 185 } catch (MalformedURLException e1) { // NOPMD 186 186 // do nothing, raise original exception 187 187 }
Note: See TracChangeset
for help on using the changeset viewer.