Changeset 6087 in josm for trunk/src/org/openstreetmap/josm/gui/preferences
- Timestamp:
- 2013-07-26T17:28:24+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/preferences
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
r6084 r6087 441 441 public void filter() { 442 442 String expr = tfFilter.getText().trim(); 443 if (expr. equals("")) {443 if (expr.isEmpty()) { 444 444 expr = null; 445 445 } -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r6084 r6087 1083 1083 @Override 1084 1084 public int compare(String o1, String o2) { 1085 if (o1. equals("") && o2.equals(""))1085 if (o1.isEmpty() && o2.isEmpty()) 1086 1086 return 0; 1087 if (o1. equals("")) return 1;1088 if (o2. equals("")) return -1;1087 if (o1.isEmpty()) return 1; 1088 if (o2.isEmpty()) return -1; 1089 1089 return o1.compareTo(o2); 1090 1090 } … … 1241 1241 1242 1242 while ((line = reader.readLine()) != null && !canceled) { 1243 if (line.trim(). equals("")) {1243 if (line.trim().isEmpty()) { 1244 1244 continue; // skip empty lines 1245 1245 } -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
r6084 r6087 45 45 protected String formatPluginRemoteVersion(PluginInformation pi) { 46 46 StringBuilder sb = new StringBuilder(); 47 if (pi.version == null || pi.version.trim(). equals("")) {47 if (pi.version == null || pi.version.trim().isEmpty()) { 48 48 sb.append(tr("unknown")); 49 49 } else { … … 58 58 protected String formatPluginLocalVersion(PluginInformation pi) { 59 59 if (pi == null) return tr("unknown"); 60 if (pi.localversion == null || pi.localversion.trim(). equals(""))60 if (pi.localversion == null || pi.localversion.trim().isEmpty()) 61 61 return tr("unknown"); 62 62 return pi.localversion; -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java
r6084 r6087 198 198 protected void updateEnabledState() { 199 199 boolean enabled = 200 !tfOsmServerUrl.getText().trim(). equals("")200 !tfOsmServerUrl.getText().trim().isEmpty() 201 201 && !tfOsmServerUrl.getText().trim().equals(lastTestedUrl); 202 202 if (enabled) { … … 236 236 @Override 237 237 public boolean isValid() { 238 if (getComponent().getText().trim(). equals(""))238 if (getComponent().getText().trim().isEmpty()) 239 239 return false; 240 240 … … 249 249 @Override 250 250 public void validate() { 251 if (getComponent().getText().trim(). equals("")) {251 if (getComponent().getText().trim().isEmpty()) { 252 252 feedbackInvalid(tr("OSM API URL must not be empty. Please enter the OSM API URL.")); 253 253 return;
Note:
See TracChangeset
for help on using the changeset viewer.