-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java b/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java
|
a
|
b
|
|
| 86 | 86 | return MainApplication.worker.submit(downloadTask); |
| 87 | 87 | |
| 88 | 88 | } else if (GpxUrlPattern.TRACKPOINTS_BBOX.matches(url)) { |
| 89 | | String[] table = url.split("\\?|=|&", -1); |
| | 89 | String[] table = url.split("[?=&]", -1); |
| 90 | 90 | for (int i = 0; i < table.length; i++) { |
| 91 | 91 | if ("bbox".equals(table[i]) && i < table.length-1) |
| 92 | 92 | return download(settings, new Bounds(table[i+1], ",", ParseMethod.LEFT_BOTTOM_RIGHT_TOP), progressMonitor); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/actions/downloadtasks/DownloadSessionTask.java b/src/org/openstreetmap/josm/actions/downloadtasks/DownloadSessionTask.java
|
a
|
b
|
|
| 22 | 22 | */ |
| 23 | 23 | public class DownloadSessionTask extends AbstractDownloadTask<Object> { |
| 24 | 24 | |
| 25 | | private static final String PATTERN_SESSION = "https?://.*/.*\\.jo(s|z)"; |
| | 25 | private static final String PATTERN_SESSION = "https?://.*/.*\\.jo([sz])"; |
| 26 | 26 | |
| 27 | 27 | private Loader loader; |
| 28 | 28 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/actions/AutoScaleAction.java b/src/org/openstreetmap/josm/actions/AutoScaleAction.java
|
a
|
b
|
|
| 96 | 96 | * Returns {@code AutoScaleMode} for a given English label |
| 97 | 97 | * @param englishLabel English label |
| 98 | 98 | * @return {@code AutoScaleMode} for given English label |
| 99 | | * @throws IllegalArgumentException if Engligh label is unknown |
| | 99 | * @throws IllegalArgumentException if English label is unknown |
| 100 | 100 | */ |
| 101 | 101 | public static AutoScaleMode of(String englishLabel) { |
| 102 | 102 | for (AutoScaleMode v : values()) { |
| … |
… |
|
| 115 | 115 | |
| 116 | 116 | /** Time of last zoom to bounds action */ |
| 117 | 117 | protected long lastZoomTime = -1; |
| 118 | | /** Last zommed bounds */ |
| | 118 | /** Last zoomed bounds */ |
| 119 | 119 | protected int lastZoomArea = -1; |
| 120 | 120 | |
| 121 | 121 | /** |
| 122 | 122 | * Zooms the current map view to the currently selected primitives. |
| 123 | 123 | * Does nothing if there either isn't a current map view or if there isn't a current data layer. |
| 124 | | * |
| 125 | 124 | */ |
| 126 | 125 | public static void zoomToSelection() { |
| 127 | 126 | OsmData<?, ?, ?, ?> dataSet = MainApplication.getLayerManager().getActiveData(); |
| … |
… |
|
| 164 | 163 | private static int getModeShortcut(String mode) { |
| 165 | 164 | int shortcut = -1; |
| 166 | 165 | |
| 167 | | // TODO: convert this to switch/case and make sure the parsing still works |
| 168 | | // CHECKSTYLE.OFF: LeftCurly |
| 169 | | // CHECKSTYLE.OFF: RightCurly |
| 170 | 166 | /* leave as single line for shortcut overview parsing! */ |
| 171 | | if (mode.equals("data")) { shortcut = KeyEvent.VK_1; } |
| 172 | | else if (mode.equals("layer")) { shortcut = KeyEvent.VK_2; } |
| 173 | | else if (mode.equals("selection")) { shortcut = KeyEvent.VK_3; } |
| 174 | | else if (mode.equals("conflict")) { shortcut = KeyEvent.VK_4; } |
| 175 | | else if (mode.equals("download")) { shortcut = KeyEvent.VK_5; } |
| 176 | | else if (mode.equals("problem")) { shortcut = KeyEvent.VK_6; } |
| 177 | | else if (mode.equals("previous")) { shortcut = KeyEvent.VK_8; } |
| 178 | | else if (mode.equals("next")) { shortcut = KeyEvent.VK_9; } |
| 179 | | // CHECKSTYLE.ON: LeftCurly |
| 180 | | // CHECKSTYLE.ON: RightCurly |
| | 167 | switch (mode) { |
| | 168 | case "data": |
| | 169 | shortcut = KeyEvent.VK_1; break; |
| | 170 | case "layer": |
| | 171 | shortcut = KeyEvent.VK_2; break; |
| | 172 | case "selection": |
| | 173 | shortcut = KeyEvent.VK_3; break; |
| | 174 | case "conflict": |
| | 175 | shortcut = KeyEvent.VK_4; break; |
| | 176 | case "download": |
| | 177 | shortcut = KeyEvent.VK_5; break; |
| | 178 | case "problem": |
| | 179 | shortcut = KeyEvent.VK_6; break; |
| | 180 | case "previous": |
| | 181 | shortcut = KeyEvent.VK_8; break; |
| | 182 | case "next": |
| | 183 | shortcut = KeyEvent.VK_9; break; |
| | 184 | } |
| 181 | 185 | |
| 182 | 186 | return shortcut; |
| 183 | 187 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/data/coor/conversion/LatLonParser.java b/src/org/openstreetmap/josm/data/coor/conversion/LatLonParser.java
|
a
|
b
|
|
| 42 | 42 | + "("+DEG+"|o|deg)|" // (3) |
| 43 | 43 | + "('|"+MIN+"|min)|" // (4) |
| 44 | 44 | + "(\"|"+SEC+"|sec)|" // (5) |
| 45 | | + "(,|;)|" // (6) |
| | 45 | + "([,;])|" // (6) |
| 46 | 46 | + "([NSEW"+N_TR+S_TR+E_TR+W_TR+"])|"// (7) |
| 47 | 47 | + "\\s+|" |
| 48 | 48 | + "(.+)", Pattern.CASE_INSENSITIVE); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java b/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
|
a
|
b
|
|
| 323 | 323 | } catch (PatternSyntaxException e) { |
| 324 | 324 | throw new SearchParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()), e); |
| 325 | 325 | } catch (IllegalArgumentException | StringIndexOutOfBoundsException e) { |
| 326 | | // StringIndexOutOfBoundsException catched because of https://bugs.openjdk.java.net/browse/JI-9044959 |
| | 326 | // StringIndexOutOfBoundsException caught because of https://bugs.openjdk.java.net/browse/JI-9044959 |
| 327 | 327 | // See #13870: To remove after we switch to a version of Java which resolves this bug |
| 328 | 328 | throw new SearchParseError(tr(rxErrorMsgNoPos, regex, e.getMessage()), e); |
| 329 | 329 | } |
| … |
… |
|
| 746 | 746 | if (mv != null) { |
| 747 | 747 | String v1 = Normalizer.normalize(caseSensitive ? mv : mv.toLowerCase(Locale.ENGLISH), Normalizer.Form.NFC); |
| 748 | 748 | String v2 = Normalizer.normalize(caseSensitive ? value : value.toLowerCase(Locale.ENGLISH), Normalizer.Form.NFC); |
| 749 | | return v1.indexOf(v2) != -1; |
| | 749 | return v1.contains(v2); |
| 750 | 750 | } |
| 751 | 751 | } |
| 752 | 752 | return false; |
| … |
… |
|
| 813 | 813 | if (referenceValue != null) { |
| 814 | 814 | v = Double.valueOf(referenceValue); |
| 815 | 815 | } |
| 816 | | } catch (NumberFormatException ignore) { |
| 817 | | Logging.trace(ignore); |
| | 816 | } catch (NumberFormatException e) { |
| | 817 | Logging.trace(e); |
| 818 | 818 | } |
| 819 | 819 | this.referenceNumber = v; |
| 820 | 820 | this.compareMode = compareMode; |
| … |
… |
|
| 1086 | 1086 | |
| 1087 | 1087 | value = Normalizer.normalize(value, Normalizer.Form.NFC); |
| 1088 | 1088 | |
| 1089 | | if (key.indexOf(search) != -1 || value.indexOf(search) != -1) |
| | 1089 | if (key.contains(search) || value.contains(search)) |
| 1090 | 1090 | return true; |
| 1091 | 1091 | } |
| 1092 | 1092 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/data/osm/Storage.java b/src/org/openstreetmap/josm/data/osm/Storage.java
|
a
|
b
|
|
| 231 | 231 | copyArray(); |
| 232 | 232 | modCount++; |
| 233 | 233 | size = 0; |
| 234 | | for (int i = 0; i < data.length; i++) { |
| 235 | | data[i] = null; |
| 236 | | } |
| | 234 | Arrays.fill(data, null); |
| 237 | 235 | } |
| 238 | 236 | |
| 239 | 237 | @Override |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/data/validation/tests/Addresses.java b/src/org/openstreetmap/josm/data/validation/tests/Addresses.java
|
a
|
b
|
|
| 268 | 268 | * @return A list of addr:housenumber equivalents |
| 269 | 269 | */ |
| 270 | 270 | static List<String> expandHouseNumber(String houseNumber) { |
| 271 | | return Arrays.asList(houseNumber.split(",|;", -1)); |
| | 271 | return Arrays.asList(houseNumber.split("[,;]", -1)); |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | @Override |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java b/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java
|
a
|
b
|
|
| 40 | 40 | private static final Collection<String> KEYS_TO_CHECK = Arrays.asList("opening_hours", "collection_times", "service_times"); |
| 41 | 41 | private static final BooleanProperty PREF_STRICT_MODE = |
| 42 | 42 | new BooleanProperty(ValidatorPrefHelper.PREFIX + "." + OpeningHourTest.class.getSimpleName() + "." + "strict", false); |
| 43 | | private final JCheckBox checkboxStrictMode = new JCheckBox(tr("Enable strict mode.")); |
| | 43 | private final JCheckBox checkboxStrictMode = new JCheckBox(tr("Enable strict mode")); |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Constructs a new {@code OpeningHourTest}. |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java b/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java
|
a
|
b
|
|
| 47 | 47 | /** Bag of all way segments */ |
| 48 | 48 | private MultiMap<Pair<Node, Node>, WaySegment> nodePairs; |
| 49 | 49 | |
| 50 | | private boolean onlyKnwonLinear; |
| | 50 | private boolean onlyKnownLinear; |
| 51 | 51 | private boolean includeOther; |
| 52 | 52 | private boolean ignoreLayer; |
| 53 | 53 | |
| … |
… |
|
| 83 | 83 | super.startTest(monitor); |
| 84 | 84 | nodePairs = new MultiMap<>(1000); |
| 85 | 85 | includeOther = isBeforeUpload ? ValidatorPrefHelper.PREF_OTHER_UPLOAD.get() : ValidatorPrefHelper.PREF_OTHER.get(); |
| 86 | | onlyKnwonLinear = Config.getPref().getBoolean("overlapping-ways.only-known-linear", true); |
| | 86 | onlyKnownLinear = Config.getPref().getBoolean("overlapping-ways.only-known-linear", true); |
| 87 | 87 | ignoreLayer = Config.getPref().getBoolean("overlapping-ways.ignore-layer", false); |
| 88 | 88 | } |
| 89 | 89 | |
| … |
… |
|
| 192 | 192 | errortype = tr("Waterway shares segment with linear way"); |
| 193 | 193 | type = OVERLAPPING_WATERWAY_LINEAR_WAY; |
| 194 | 194 | severity = Severity.WARNING; |
| 195 | | } else if (!includeOther || onlyKnwonLinear) { |
| | 195 | } else if (!includeOther || onlyKnownLinear) { |
| 196 | 196 | return; |
| 197 | 197 | } else if (countHighway > 0) { |
| 198 | 198 | errortype = tr("Highway shares segment with other way"); |
| … |
… |
|
| 269 | 269 | if (IGNORED.test(w)) |
| 270 | 270 | return; |
| 271 | 271 | |
| 272 | | if (onlyKnwonLinear && (w.concernsArea() || w.getInterestingTags().isEmpty())) |
| | 272 | if (onlyKnownLinear && (w.concernsArea() || w.getInterestingTags().isEmpty())) |
| 273 | 273 | return; |
| 274 | 274 | |
| 275 | 275 | Node lastN = null; |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/data/validation/OsmValidator.java b/src/org/openstreetmap/josm/data/validation/OsmValidator.java
|
a
|
b
|
|
| 363 | 363 | */ |
| 364 | 364 | public static JTree buildJTreeList() { |
| 365 | 365 | DefaultMutableTreeNode root = new DefaultMutableTreeNode(tr("Ignore list")); |
| 366 | | final Pattern elemId1Pattern = Pattern.compile(":(r|w|n)_"); |
| | 366 | final Pattern elemId1Pattern = Pattern.compile(":([rwn])_"); |
| 367 | 367 | final Pattern elemId2Pattern = Pattern.compile("^[0-9]+$"); |
| 368 | 368 | for (Entry<String, String> e: ignoredErrors.entrySet()) { |
| 369 | 369 | String key = e.getKey(); |
| … |
… |
|
| 463 | 463 | |
| 464 | 464 | String item = child.getUserObject().toString(); |
| 465 | 465 | String entry = null; |
| 466 | | if (item.matches("^\\[(r|w|n)_.*")) { |
| | 466 | if (item.matches("^\\[([rwn])_.*")) { |
| 467 | 467 | // list of elements (produced with list.toString() method) |
| 468 | 468 | entry = key + ":" + item.substring(1, item.lastIndexOf(']')).replace(", ", ":"); |
| 469 | | } else if (item.matches("^(r|w|n)_.*")) { |
| | 469 | } else if (item.matches("^([rwn])_.*")) { |
| 470 | 470 | // single element |
| 471 | 471 | entry = key + ":" + item; |
| 472 | 472 | } else if (item.matches("^[0-9]+(_.*|)$")) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/data/Preferences.java b/src/org/openstreetmap/josm/data/Preferences.java
|
a
|
b
|
|
| 441 | 441 | } |
| 442 | 442 | |
| 443 | 443 | try (PreferencesWriter writer = new PreferencesWriter( |
| 444 | | new PrintWriter(new File(prefFile + "_tmp"), StandardCharsets.UTF_8.name()), false, defaults)) { |
| | 444 | new PrintWriter(prefFile + "_tmp", StandardCharsets.UTF_8.name()), false, defaults)) { |
| 445 | 445 | writer.write(settings); |
| 446 | 446 | } catch (SecurityException e) { |
| 447 | 447 | throw new IOException(e); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java b/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
|
a
|
b
|
|
| 253 | 253 | |
| 254 | 254 | /** |
| 255 | 255 | * Get projections this imagery layer supports natively. |
| 256 | | * |
| 257 | | * For example projection of tiles that are downloaded from a server. Layer |
| 258 | | * may support even more projections (by reprojecting the tiles), but with a |
| 259 | | * certain loss in image quality and performance. |
| | 256 | * <p/> |
| | 257 | * For example projection of tiles that are downloaded from a server. Layer may support even more |
| | 258 | * projections (by reprojecting the tiles), but with a certain loss in image quality and performance. |
| 260 | 259 | * @return projections this imagery layer supports natively; null if layer is projection agnostic. |
| 261 | 260 | */ |
| 262 | 261 | public abstract Collection<String> getNativeProjections(); |
| … |
… |
|
| 643 | 642 | */ |
| 644 | 643 | int maxYtiles = (int) Math.ceil((double) height / tileSize + 1); |
| 645 | 644 | int maxXtiles = (int) Math.ceil((double) width / tileSize + 1); |
| 646 | | int visibileTiles = maxXtiles * maxYtiles; |
| | 645 | int visibleTiles = maxXtiles * maxYtiles; |
| 647 | 646 | /** |
| 648 | 647 | * Take into account ZOOM_OFFSET to calculate real number of tiles and multiply by 7, to cover all tiles, that might be |
| 649 | 648 | * accessed when looking for tiles outside current zoom level. |
| … |
… |
|
| 658 | 657 | * @see #drawInViewArea((Graphics2D, MapView, ProjectionBounds) |
| 659 | 658 | * |
| 660 | 659 | * Add +2 to maxYtiles / maxXtiles to add space in cache for extra tiles in current zoom level that are |
| 661 | | * download by overloadTiles(). This is not added in computation of visibileTiles as this unnecessarily grow the cache size |
| | 660 | * download by overloadTiles(). This is not added in computation of visibleTiles as this unnecessarily grow the cache size |
| 662 | 661 | * @see #overloadTiles() |
| 663 | 662 | */ |
| 664 | 663 | int ret = (int) Math.ceil( |
| 665 | 664 | Math.pow(2d, ZOOM_OFFSET.get()) * // use offset to decide, how many tiles are visible |
| 666 | | visibileTiles * 7 + // 7 to cover tiles from other zooms as described above |
| | 665 | visibleTiles * 7 + // 7 to cover tiles from other zooms as described above |
| 667 | 666 | ((maxYtiles + 2) * (maxXtiles +2))); // to add as many tiles as they will be accessed on current zoom level |
| 668 | | Logging.info("AbstractTileSourceLayer: estimated visibile tiles: {0}, estimated cache size: {1}", visibileTiles, ret); |
| | 667 | Logging.info("AbstractTileSourceLayer: estimated visible tiles: {0}, estimated cache size: {1}", visibleTiles, ret); |
| 669 | 668 | return ret; |
| 670 | 669 | } |
| 671 | 670 | |
| … |
… |
|
| 867 | 866 | /** |
| 868 | 867 | * Zoom out from map. |
| 869 | 868 | * |
| 870 | | * @return true, if zoom increasing was successful, false othervise |
| | 869 | * @return true, if zoom increasing was successful, false otherwise |
| 871 | 870 | */ |
| 872 | 871 | public boolean decreaseZoomLevel() { |
| 873 | 872 | if (zoomDecreaseAllowed()) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/OnLineStrategy.java b/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/OnLineStrategy.java
|
a
|
b
|
|
| 6 | 6 | import java.awt.geom.Point2D; |
| 7 | 7 | import java.awt.geom.Rectangle2D; |
| 8 | 8 | import java.util.ArrayList; |
| 9 | | import java.util.Collections; |
| 10 | 9 | import java.util.Comparator; |
| 11 | 10 | import java.util.Iterator; |
| 12 | 11 | import java.util.List; |
| … |
… |
|
| 88 | 87 | List<OffsetGlyph> offsetGlyphs = computeOffsetGlyphs(gvs, |
| 89 | 88 | middleOffset + (doRotateText ? 1 : -1) * nb.getWidth() / 2, doRotateText); |
| 90 | 89 | |
| 91 | | // Order the glyphs along the line to ensure that they are drawn corretly. |
| 92 | | Collections.sort(offsetGlyphs, Comparator.comparing(OffsetGlyph::getOffset)); |
| | 90 | // Order the glyphs along the line to ensure that they are drawn correctly. |
| | 91 | offsetGlyphs.sort(Comparator.comparing(OffsetGlyph::getOffset)); |
| 93 | 92 | |
| 94 | 93 | // Now translate all glyphs. This will modify the glyphs stored in gvs. |
| 95 | 94 | path.visitLine(new GlyphRotatingVisitor(offsetGlyphs, isDoubleTranslationBug)); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/preferences/imagery/HeadersTable.java b/src/org/openstreetmap/josm/gui/preferences/imagery/HeadersTable.java
|
a
|
b
|
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | private static List<String[]> getHeadersAsVector(Map<String, String> headers) { |
| 109 | | return headers.entrySet().stream().sorted(Comparator.comparing(Map.Entry::getKey)) |
| | 109 | return headers.entrySet().stream().sorted(Map.Entry.comparingByKey()) |
| 110 | 110 | .map(e -> new String[] {e.getKey(), e.getValue()}).collect(Collectors.toList()); |
| 111 | 111 | } |
| 112 | 112 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java b/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java
|
a
|
b
|
|
| 108 | 108 | } |
| 109 | 109 | } |
| 110 | 110 | } |
| 111 | | KeyboardUtils.getExtendedKeyCodes(InputContext.getInstance().getLocale()).entrySet() |
| 112 | | .forEach(e -> list.put(e.getKey(), e.getValue().toString())); |
| | 111 | KeyboardUtils.getExtendedKeyCodes(InputContext.getInstance().getLocale()) |
| | 112 | .forEach((key, value) -> list.put(key, value.toString())); |
| 113 | 113 | list.put(Integer.valueOf(-1), ""); |
| 114 | 114 | return list; |
| 115 | 115 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItem.java b/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItem.java
|
a
|
b
|
|
| 88 | 88 | if (TYPE_CACHE.containsKey(types)) |
| 89 | 89 | return TYPE_CACHE.get(types); |
| 90 | 90 | Set<TaggingPresetType> result = EnumSet.noneOf(TaggingPresetType.class); |
| 91 | | for (String type : Arrays.asList(types.split(",", -1))) { |
| | 91 | for (String type : types.split(",", -1)) { |
| 92 | 92 | try { |
| 93 | 93 | TaggingPresetType presetType = TaggingPresetType.fromString(type); |
| 94 | 94 | if (presetType != null) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/MainApplication.java b/src/org/openstreetmap/josm/gui/MainApplication.java
|
a
|
b
|
|
| 1257 | 1257 | } |
| 1258 | 1258 | Utils.updateSystemProperty("java.net.preferIPv6Addresses", "true"); |
| 1259 | 1259 | if (!wasv6) { |
| 1260 | | Logging.info(tr("Detected useable IPv6 network, preferring IPv6 over IPv4 after next restart.")); |
| | 1260 | Logging.info(tr("Detected usable IPv6 network, preferring IPv6 over IPv4 after next restart.")); |
| 1261 | 1261 | } else { |
| 1262 | | Logging.info(tr("Detected useable IPv6 network, preferring IPv6 over IPv4.")); |
| | 1262 | Logging.info(tr("Detected usable IPv6 network, preferring IPv6 over IPv4.")); |
| 1263 | 1263 | } |
| 1264 | 1264 | } |
| 1265 | 1265 | break; /* we're done */ |
| … |
… |
|
| 1271 | 1271 | Logging.trace(e); |
| 1272 | 1272 | } |
| 1273 | 1273 | if (wasv6 && !hasv6) { |
| 1274 | | Logging.info(tr("Detected no useable IPv6 network, preferring IPv4 over IPv6 after next restart.")); |
| | 1274 | Logging.info(tr("Detected no usable IPv6 network, preferring IPv4 over IPv6 after next restart.")); |
| 1275 | 1275 | Config.getPref().putBoolean("validated.ipv6", hasv6); // be sure it is stored before the restart! |
| 1276 | 1276 | RestartAction.restartJOSM(); |
| 1277 | 1277 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/io/rtklib/RtkLibPosReader.java b/src/org/openstreetmap/josm/io/rtklib/RtkLibPosReader.java
|
a
|
b
|
|
| 77 | 77 | Collection<Collection<WayPoint>> currentTrack = new ArrayList<>(); |
| 78 | 78 | Collection<WayPoint> waypoints = new ArrayList<>(); |
| 79 | 79 | try (BufferedReader rd = new BufferedReader(new InputStreamReader(source, StandardCharsets.UTF_8))) { |
| 80 | | String line = null; |
| | 80 | String line; |
| 81 | 81 | do { |
| 82 | 82 | line = rd.readLine(); |
| 83 | 83 | if (line != null) { |
| … |
… |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | /** |
| 127 | | * Returns the number of coordinates that have been successfuly read. |
| 128 | | * @return the number of coordinates that have been successfuly read |
| | 127 | * Returns the number of coordinates that have been successfully read. |
| | 128 | * @return the number of coordinates that have been successfully read |
| 129 | 129 | */ |
| 130 | 130 | public int getNumberOfCoordinates() { |
| 131 | 131 | return success; |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/io/CachedFile.java b/src/org/openstreetmap/josm/io/CachedFile.java
|
a
|
b
|
|
| 352 | 352 | while (entries.hasMoreElements()) { |
| 353 | 353 | ZipEntry entry = entries.nextElement(); |
| 354 | 354 | // choose any file with correct extension. When more than one file, prefer the one which matches namepart |
| 355 | | if (entry.getName().endsWith('.' + extension) && (resentry == null || entry.getName().indexOf(namepart) >= 0)) { |
| | 355 | if (entry.getName().endsWith('.' + extension) && (resentry == null || entry.getName().contains(namepart))) { |
| 356 | 356 | resentry = entry; |
| 357 | 357 | } |
| 358 | 358 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/io/GpxWriter.java b/src/org/openstreetmap/josm/io/GpxWriter.java
|
a
|
b
|
|
| 97 | 97 | GpxExtensionCollection layerExts = data.getExtensions().add("josm", "layerPreferences").getExtensions(); |
| 98 | 98 | data.getLayerPrefs().entrySet() |
| 99 | 99 | .stream() |
| 100 | | .sorted(Comparator.comparing(Map.Entry::getKey)) |
| | 100 | .sorted(Map.Entry.comparingByKey()) |
| 101 | 101 | .forEach(entry -> { |
| 102 | 102 | GpxExtension e = layerExts.add("josm", "entry"); |
| 103 | 103 | e.put("key", entry.getKey()); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/io/InvalidXmlCharacterFilter.java b/src/org/openstreetmap/josm/io/InvalidXmlCharacterFilter.java
|
a
|
b
|
|
| 3 | 3 | |
| 4 | 4 | import java.io.IOException; |
| 5 | 5 | import java.io.Reader; |
| | 6 | import java.util.Arrays; |
| 6 | 7 | |
| 7 | 8 | import org.openstreetmap.josm.tools.Logging; |
| 8 | 9 | |
| … |
… |
|
| 27 | 28 | |
| 28 | 29 | static { |
| 29 | 30 | INVALID_CHARS = new boolean[0x20]; |
| 30 | | for (int i = 0; i < INVALID_CHARS.length; ++i) { |
| 31 | | INVALID_CHARS[i] = true; |
| 32 | | } |
| | 31 | Arrays.fill(INVALID_CHARS, true); |
| 33 | 32 | INVALID_CHARS[0x9] = false; // tab |
| 34 | 33 | INVALID_CHARS[0xA] = false; // LF |
| 35 | 34 | INVALID_CHARS[0xD] = false; // CR |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/io/OsmWriter.java b/src/org/openstreetmap/josm/io/OsmWriter.java
|
a
|
b
|
|
| 319 | 319 | addTags(cs, "changeset", false); // also writes closing </changeset> |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | | protected static final Comparator<Entry<String, String>> byKeyComparator = Comparator.comparing(Entry::getKey); |
| | 322 | protected static final Comparator<Entry<String, String>> byKeyComparator = Entry.comparingByKey(); |
| 323 | 323 | |
| 324 | 324 | protected void addTags(Tagged osm, String tagname, boolean tagOpen) { |
| 325 | 325 | if (osm.hasKeys()) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/io/OverpassDownloadReader.java b/src/org/openstreetmap/josm/io/OverpassDownloadReader.java
|
a
|
b
|
|
| 270 | 270 | p = Period.parse(javaDur ? duration.substring(0, idx) : duration); |
| 271 | 271 | } |
| 272 | 272 | if (javaDur) { |
| 273 | | d = Duration.parse(javaPer ? 'P' + duration.substring(idx, duration.length()) : duration); |
| | 273 | d = Duration.parse(javaPer ? 'P' + duration.substring(idx) : duration); |
| 274 | 274 | } else if (!javaPer) { |
| 275 | 275 | d = Duration.parse(duration); |
| 276 | 276 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/tools/LanguageInfo.java b/src/org/openstreetmap/josm/tools/LanguageInfo.java
|
a
|
b
|
|
| 65 | 65 | return ""; |
| 66 | 66 | } |
| 67 | 67 | } |
| 68 | | if ("nb".equals(code)) { /* OSM-Wiki has "no", but no "nb" */ |
| 69 | | return "No:"; |
| 70 | | } else if ("sr@latin".equals(code)) { /* OSM-Wiki has "Sr-latn" and not Sr-latin */ |
| 71 | | return "Sr-latn:"; |
| 72 | | } else if ("de".equals(code) || "es".equals(code) || "fr".equals(code) |
| 73 | | || "it".equals(code) || "nl".equals(code) || "ru".equals(code) |
| 74 | | || "ja".equals(code)) { |
| 75 | | return code.toUpperCase(Locale.ENGLISH) + ":"; |
| 76 | | } else { |
| 77 | | return code.substring(0, 1).toUpperCase(Locale.ENGLISH) + code.substring(1) + ":"; |
| | 68 | switch (code) { |
| | 69 | case "nb": /* OSM-Wiki has "no", but no "nb" */ |
| | 70 | return "No:"; |
| | 71 | case "sr@latin": /* OSM-Wiki has "Sr-latn" and not Sr-latin */ |
| | 72 | return "Sr-latn:"; |
| | 73 | case "de": |
| | 74 | case "es": |
| | 75 | case "fr": |
| | 76 | case "it": |
| | 77 | case "nl": |
| | 78 | case "ru": |
| | 79 | case "ja": |
| | 80 | return code.toUpperCase(Locale.ENGLISH) + ":"; |
| | 81 | default: |
| | 82 | return code.substring(0, 1).toUpperCase(Locale.ENGLISH) + code.substring(1) + ":"; |
| 78 | 83 | } |
| 79 | 84 | } |
| 80 | 85 | |
| … |
… |
|
| 159 | 164 | */ |
| 160 | 165 | public static String getJavaLocaleCode(String localeName) { |
| 161 | 166 | if (localeName == null) return "en"; |
| 162 | | if ("ca@valencia".equals(localeName)) { |
| 163 | | localeName = "ca__valencia"; |
| 164 | | } else if ("sr@latin".equals(localeName)) { |
| 165 | | localeName = "sr__latin"; |
| 166 | | } else if ("he".equals(localeName)) { |
| 167 | | localeName = "iw_IL"; |
| 168 | | } else if ("id".equals(localeName)) { |
| 169 | | localeName = "in"; |
| | 167 | switch (localeName) { |
| | 168 | case "ca@valencia": |
| | 169 | localeName = "ca__valencia"; break; |
| | 170 | case "sr@latin": |
| | 171 | localeName = "sr__latin"; break; |
| | 172 | case "he": |
| | 173 | localeName = "iw_IL"; break; |
| | 174 | case "id": |
| | 175 | localeName = "in"; break; |
| 170 | 176 | } |
| 171 | 177 | return localeName; |
| 172 | 178 | } |