Changeset 10308 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2016-06-01T23:17:40+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
r10216 r10308 302 302 if (audioInputStream != null) { 303 303 Utils.close(audioInputStream); 304 audioInputStream = null;305 304 } 306 305 playingUrl = command.url(); 307 306 audioInputStream = AudioSystem.getAudioInputStream(playingUrl); 308 307 audioFormat = audioInputStream.getFormat(); 309 long nBytesRead = 0;308 long nBytesRead; 310 309 position = 0.0; 311 310 offset -= leadIn; -
trunk/src/org/openstreetmap/josm/tools/Diff.java
r10246 r10308 116 116 private final FileData[] filevec; 117 117 private int cost; 118 /** Snakes bigger than this are considered "big". */119 private static final int SNAKE_LIMIT = 20;120 118 121 119 /** … … 168 166 for (int c = 1;; ++c) { 169 167 int d; /* Active diagonal. */ 170 boolean bigSnake = false;171 168 172 169 /* Extend the top-down search by an edit step in each diagonal. */ … … 182 179 } 183 180 for (d = fmax; d >= fmin; d -= 2) { 184 int x, y, oldx,tlo = fd[fdiagoff + d - 1], thi = fd[fdiagoff + d + 1];181 int x, y, tlo = fd[fdiagoff + d - 1], thi = fd[fdiagoff + d + 1]; 185 182 186 183 if (tlo >= thi) { … … 189 186 x = thi; 190 187 } 191 oldx = x;192 188 y = x - d; 193 189 while (x < xlim && y < ylim && xv[x] == yv[y]) { 194 190 ++x; ++y; 195 }196 if (x - oldx > SNAKE_LIMIT) {197 bigSnake = true;198 191 } 199 192 fd[fdiagoff + d] = x; … … 216 209 } 217 210 for (d = bmax; d >= bmin; d -= 2) { 218 int x, y, oldx,tlo = bd[bdiagoff + d - 1], thi = bd[bdiagoff + d + 1];211 int x, y, tlo = bd[bdiagoff + d - 1], thi = bd[bdiagoff + d + 1]; 219 212 220 213 if (tlo < thi) { … … 223 216 x = thi - 1; 224 217 } 225 oldx = x;226 218 y = x - d; 227 219 while (x > xoff && y > yoff && xv[x - 1] == yv[y - 1]) { 228 220 --x; --y; 229 }230 if (oldx - x > SNAKE_LIMIT) {231 bigSnake = true;232 221 } 233 222 bd[bdiagoff + d] = x; -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r10300 r10308 874 874 if ("image/svg+xml".equals(mediatype)) { 875 875 String s = new String(bytes, StandardCharsets.UTF_8); 876 SVGDiagram svg = null;876 SVGDiagram svg; 877 877 synchronized (getSvgUniverse()) { 878 878 URI uri = getSvgUniverse().loadSVG(new StringReader(s), Utils.encodeUrl(s)); … … 1003 1003 switch (type) { 1004 1004 case SVG: 1005 SVGDiagram svg = null;1005 SVGDiagram svg; 1006 1006 synchronized (getSvgUniverse()) { 1007 1007 URI uri = getSvgUniverse().loadSVG(path); … … 1049 1049 1050 1050 private static URL getImageUrl(String imageName, Collection<String> dirs, Collection<ClassLoader> additionalClassLoaders) { 1051 URL u = null;1051 URL u; 1052 1052 1053 1053 // Try passed directories first … … 1225 1225 } 1226 1226 1227 ImageResource imageResource = null;1227 ImageResource imageResource; 1228 1228 1229 1229 synchronized (ROTATE_CACHE) { -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r10173 r10308 237 237 if (dpkg || rpm || eque) { 238 238 for (String packageName : packageNames) { 239 String[] args = null;239 String[] args; 240 240 if (dpkg) { 241 241 args = new String[] {"dpkg-query", "--show", "--showformat", "${Architecture}-${Version}", packageName}; -
trunk/src/org/openstreetmap/josm/tools/TextTagParser.java
r9078 r10308 175 175 Pattern p = Pattern.compile(tagRegex); 176 176 Map<String, String> tags = new HashMap<>(); 177 String k = null, v = null; 177 String k; 178 String v; 178 179 for (String line: lines) { 179 180 if (line.trim().isEmpty()) continue; // skip empty lines
Note:
See TracChangeset
for help on using the changeset viewer.