Changeset 8510 in josm for trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSName.java
- Timestamp:
- 2015-06-20T23:42:21+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSName.java
r8444 r8510 80 80 //startIndex is the index of the first character of a component 81 81 //endIndex is the index of the last character of a component plus 1 82 for (int endIndex, startIndex=0; startIndex < name.length(); startIndex = endIndex+1) {82 for (int endIndex, startIndex = 0; startIndex < name.length(); startIndex = endIndex+1) { 83 83 endIndex = name.indexOf('.', startIndex); 84 84 if (endIndex < 0) { … … 89 89 90 90 //nonStartIndex: index for characters in the component beyond the first one 91 for (int nonStartIndex =startIndex+1; nonStartIndex < endIndex; nonStartIndex++) {91 for (int nonStartIndex = startIndex+1; nonStartIndex < endIndex; nonStartIndex++) { 92 92 char x = name.charAt(nonStartIndex); 93 93 if ((alphaDigitsAndHyphen).indexOf(x) < 0) … … 147 147 return false; 148 148 149 DNSName other = (DNSName) obj;149 DNSName other = (DNSName) obj; 150 150 151 151 // RFC2459 mandates that these names are … … 203 203 else { 204 204 String inName = 205 (((DNSName) inputName).getName()).toLowerCase(Locale.ENGLISH);205 (((DNSName) inputName).getName()).toLowerCase(Locale.ENGLISH); 206 206 String thisName = name.toLowerCase(Locale.ENGLISH); 207 207 if (inName.equals(thisName)) … … 236 236 @Override 237 237 public int subtreeDepth() { 238 String subtree =name;239 int i =1;238 String subtree = name; 239 int i = 1; 240 240 241 241 /* count dots */ 242 242 for (; subtree.lastIndexOf('.') >= 0; i++) { 243 subtree =subtree.substring(0,subtree.lastIndexOf('.'));243 subtree = subtree.substring(0, subtree.lastIndexOf('.')); 244 244 } 245 245
Note:
See TracChangeset
for help on using the changeset viewer.