-
Subject: [PATCH] Typo/documentation fixes
---
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/actions/upload/UploadHook.java b/src/org/openstreetmap/josm/actions/upload/UploadHook.java
a
|
b
|
|
6 | 6 | import org.openstreetmap.josm.data.APIDataSet; |
7 | 7 | |
8 | 8 | /** |
9 | | * Change, or block, the upload. |
| 9 | * Change or block the upload. |
10 | 10 | * |
11 | 11 | * The UploadHook may modify the uploaded data silently, it may display a |
12 | 12 | * warning message to the user or prevent the upload altogether. |
… |
… |
|
16 | 16 | public interface UploadHook { |
17 | 17 | |
18 | 18 | /** |
19 | | * Check, and/or change, the data to be uploaded. |
| 19 | * Check and/or change the data to be uploaded. |
20 | 20 | * Default implementation is to approve the upload. |
21 | 21 | * @param apiDataSet the data to upload, modify this to change the data. |
22 | 22 | * @return {@code true} if upload is possible, {@code false} to block the upload. |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/actions/UploadAction.java b/src/org/openstreetmap/josm/actions/UploadAction.java
a
|
b
|
|
56 | 56 | * when the user wants to upload data. Plugins can insert their own hooks here |
57 | 57 | * if they want to be able to veto an upload. |
58 | 58 | * |
59 | | * Be default, the standard upload dialog is the only element in the list. |
| 59 | * By default, the standard upload dialog is the only element in the list. |
60 | 60 | * Plugins should normally insert their code before that, so that the upload |
61 | 61 | * dialog is the last thing shown before upload really starts; on occasion |
62 | 62 | * however, a plugin might also want to insert something after that. |
… |
… |
|
214 | 214 | return false; |
215 | 215 | } |
216 | 216 | } |
| 217 | |
217 | 218 | // Call all upload hooks in sequence. |
218 | 219 | // FIXME: this should become an asynchronous task |
219 | | // |
220 | 220 | if (apiData != null) { |
221 | 221 | return UPLOAD_HOOKS.stream().allMatch(hook -> hook.checkUpload(apiData)); |
222 | 222 | } |
… |
… |
|
283 | 283 | Optional<AsynchronousUploadPrimitivesTask> asyncUploadTask = AsynchronousUploadPrimitivesTask.createAsynchronousUploadTask( |
284 | 284 | uploadStrategySpecification, layer, apiData, cs); |
285 | 285 | |
286 | | if (asyncUploadTask.isPresent()) { |
287 | | MainApplication.worker.execute(asyncUploadTask.get()); |
288 | | } |
| 286 | asyncUploadTask.ifPresent(MainApplication.worker::execute); |
289 | 287 | } else { |
290 | 288 | MainApplication.worker.execute(new UploadPrimitivesTask(uploadStrategySpecification, layer, apiData, cs)); |
291 | 289 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/data/osm/IPrimitive.java b/src/org/openstreetmap/josm/data/osm/IPrimitive.java
a
|
b
|
|
287 | 287 | * used to check against edit conflicts. |
288 | 288 | * |
289 | 289 | * @return date of last modification |
290 | | * @see #getInstant |
| 290 | * @see #setInstant |
291 | 291 | */ |
292 | 292 | Instant getInstant(); |
293 | 293 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/data/osm/OsmUtils.java b/src/org/openstreetmap/josm/data/osm/OsmUtils.java
a
|
b
|
|
118 | 118 | /** |
119 | 119 | * Check if a tag value represents a boolean false value |
120 | 120 | * @param value The value to check |
121 | | * @return true if it is a true value. |
| 121 | * @return true if it is a false value. |
122 | 122 | */ |
123 | 123 | public static boolean isFalse(String value) { |
124 | 124 | if (value == null) { |
… |
… |
|
137 | 137 | |
138 | 138 | /** |
139 | 139 | * Creates a new OSM primitive around (0,0) according to the given assertion. Originally written for unit tests, |
140 | | * this can also be used in another places like validation of local MapCSS validator rules. |
| 140 | * this can also be used in other places like validation of local MapCSS validator rules. |
141 | 141 | * Ways and relations created using this method are empty. |
142 | 142 | * @param assertion The assertion describing OSM primitive (ex: "way name=Foo railway=rail") |
143 | 143 | * @return a new OSM primitive according to the given assertion |
… |
… |
|
150 | 150 | |
151 | 151 | /** |
152 | 152 | * Creates a new OSM primitive according to the given assertion. Originally written for unit tests, |
153 | | * this can also be used in another places like validation of local MapCSS validator rules. |
| 153 | * this can also be used in other places like validation of local MapCSS validator rules. |
154 | 154 | * @param assertion The assertion describing OSM primitive (ex: "way name=Foo railway=rail") |
155 | 155 | * @param around the coordinate at which the primitive will be located |
156 | 156 | * @param enforceLocation if {@code true}, ways and relations will not be empty to force a physical location |
-
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
|
|
14 | 14 | import org.openstreetmap.josm.tools.Utils; |
15 | 15 | |
16 | 16 | /** |
17 | | * A Set-like class that allows looking up equivalent preexising instance. |
| 17 | * A Set-like class that allows looking up equivalent preexisting instance. |
18 | 18 | * It is useful wherever one would use self-mapping construct like |
19 | 19 | * <code>Map<T,T>.put(t,t)</code>, that is, for caches, uniqueness filters or similar. |
20 | 20 | * |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/data/projection/Ellipsoid.java b/src/org/openstreetmap/josm/data/projection/Ellipsoid.java
a
|
b
|
|
356 | 356 | public double latitude(double latIso, double e, double epsilon) { |
357 | 357 | double lat0 = 2*Math.atan(Math.exp(latIso))-Math.PI/2; |
358 | 358 | double lati = lat0; |
359 | | double lati1 = 1.0; // random value to start the iterative processus |
| 359 | double lati1 = 1.0; // random value to start the iterative processes |
360 | 360 | while (Math.abs(lati1-lati) >= epsilon) { |
361 | 361 | lati = lati1; |
362 | 362 | double v1 = 1+e*Math.sin(lati); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/data/validation/routines/EmailValidator.java b/src/org/openstreetmap/josm/data/validation/routines/EmailValidator.java
a
|
b
|
|
29 | 29 | * </p> |
30 | 30 | * <p> |
31 | 31 | * This implementation is not guaranteed to catch all possible errors in an email address. |
32 | | * </p>. |
33 | 32 | * |
34 | 33 | * @version $Revision: 1741724 $ |
35 | 34 | * @since Validator 1.4 |
… |
… |
|
125 | 124 | } |
126 | 125 | |
127 | 126 | /** |
128 | | * <p>Checks if a field has a valid e-mail address.</p> |
| 127 | * Checks if a field has a valid e-mail address. |
129 | 128 | * |
130 | | * @param email The value validation is being performed on. A <code>null</code> |
| 129 | * @param email The value validation is being performed on. A <code>null</code> |
131 | 130 | * value is considered invalid. |
132 | 131 | * @return true if the email address is valid. |
133 | 132 | */ |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/conflict/pair/AbstractListMergeModel.java b/src/org/openstreetmap/josm/gui/conflict/pair/AbstractListMergeModel.java
a
|
b
|
|
634 | 634 | * replies true if the {@link ListRole} of this {@link EntriesTableModel} |
635 | 635 | * participates in the current {@link ComparePairType} |
636 | 636 | * |
637 | | * @return true, if the if the {@link ListRole} of this {@link EntriesTableModel} |
| 637 | * @return true, if the {@link ListRole} of this {@link EntriesTableModel} |
638 | 638 | * participates in the current {@link ComparePairType} |
639 | 639 | * |
640 | 640 | * @see AbstractListMergeModel.ComparePairListModel#getSelectedComparePair() |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/conflict/pair/AbstractListMerger.java b/src/org/openstreetmap/josm/gui/conflict/pair/AbstractListMerger.java
a
|
b
|
|
774 | 774 | } |
775 | 775 | |
776 | 776 | /** |
777 | | * Java 1.5 doesn't known Action.SELECT_KEY. Wires a toggle button to this action |
| 777 | * Java 1.5 doesn't know Action.SELECT_KEY. Wires a toggle button to this action |
778 | 778 | * such that the action gets notified about item state changes and the button gets |
779 | 779 | * notified about selection state changes of the action. |
780 | 780 | * |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java b/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
a
|
b
|
|
135 | 135 | * |
136 | 136 | * If no object is selected, the dialog list is empty. |
137 | 137 | * If only one is selected, all tags of this object are selected. |
138 | | * If more than one object are selected, the sum of all tags are displayed. If the |
| 138 | * If more than one object is selected, the sum of all tags is displayed. If the |
139 | 139 | * different objects share the same tag, the shared value is displayed. If they have |
140 | 140 | * different values, all of them are put in a combo box and the string "<different>" |
141 | 141 | * is displayed in italic. |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/layer/MainLayerManager.java b/src/org/openstreetmap/josm/gui/layer/MainLayerManager.java
a
|
b
|
|
26 | 26 | * <p> |
27 | 27 | * The active layer is the layer the user is currently working on. |
28 | 28 | * <p> |
29 | | * The edit layer is an data layer that we currently work with. |
| 29 | * The edit layer is a data layer that we currently work with. |
30 | 30 | * @author Michael Zangl |
31 | 31 | * @since 10279 |
32 | 32 | */ |
… |
… |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | /** |
213 | | * Adds a active/edit layer change listener. Fire a fake active-layer-changed-event right after adding |
| 213 | * Adds an active/edit layer change listener. Fire a fake active-layer-changed-event right after adding |
214 | 214 | * the listener. The previous layers will be null. The listener is notified in the current thread. |
215 | 215 | * @param listener the listener. |
216 | 216 | */ |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/progress/swing/PleaseWaitProgressMonitor.java b/src/org/openstreetmap/josm/gui/progress/swing/PleaseWaitProgressMonitor.java
a
|
b
|
|
106 | 106 | } |
107 | 107 | |
108 | 108 | private void doInEDT(Runnable runnable) { |
109 | | // This must be invoke later even if current thread is EDT because inside there is dialog.setVisible |
| 109 | // This must be invoked later even if current thread is EDT because inside there is dialog.setVisible |
110 | 110 | // which freeze current code flow until modal dialog is closed |
111 | 111 | SwingUtilities.invokeLater(() -> { |
112 | 112 | try { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/progress/ProgressMonitor.java b/src/org/openstreetmap/josm/gui/progress/ProgressMonitor.java
a
|
b
|
|
75 | 75 | void finishTask(); |
76 | 76 | |
77 | 77 | /** |
78 | | * Can be used if method receive ProgressMonitor but it's not interested progress monitoring. |
| 78 | * Can be used if method receives ProgressMonitor, but it's not interested progress monitoring. |
79 | 79 | * Basically replaces {@link #beginTask(String)} and {@link #finishTask()} |
80 | 80 | * |
81 | | * This method can be also used in finally section if method expects that some exception |
| 81 | * This method can be also used in finally section if method expects that some exceptions |
82 | 82 | * might prevent it from passing progressMonitor away. If {@link #beginTask(String)} was |
83 | 83 | * already called then this method does nothing. |
84 | 84 | */ |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/widgets/AbstractFileChooser.java b/src/org/openstreetmap/josm/gui/widgets/AbstractFileChooser.java
a
|
b
|
|
97 | 97 | * as an available choice in the choosable filter list. |
98 | 98 | * If false, the <code>AcceptAll</code> file filter is removed from |
99 | 99 | * the list of available file filters. |
100 | | * If true, the <code>AcceptAll</code> file filter will become the |
| 100 | * If true, the <code>AcceptAll</code> file filter will become |
101 | 101 | * the actively used file filter. |
102 | 102 | * @param b whether the <code>AcceptAll FileFilter</code> is used |
103 | 103 | * as an available choice in the choosable filter list |
-
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
|
|
683 | 683 | "\t--version "+tr("Displays the JOSM version and exits")+"\n\n"+ |
684 | 684 | "\t--status-report "+ShowStatusReportAction.ACTION_DESCRIPTION+"\n\n"+ |
685 | 685 | "\t--debug "+tr("Print debugging messages to console")+"\n\n"+ |
| 686 | "\t--trace "+tr("Print detailed debugging messages to console")+"\n\n"+ |
686 | 687 | "\t--skip-plugins "+tr("Skip loading plugins")+"\n\n"+ |
687 | 688 | "\t--offline=" + Arrays.stream(OnlineResource.values()).map(OnlineResource::name).collect( |
688 | 689 | Collectors.joining("|", "<", ">")) + "\n" + |
… |
… |
|
992 | 993 | ChangesetUpdater.start(); |
993 | 994 | |
994 | 995 | if (Config.getPref().getBoolean("debug.edt-checker.enable", Version.getInstance().isLocalBuild())) { |
995 | | // Repaint manager is registered so late for a reason - there is lots of violation during startup process |
| 996 | // Repaint manager is registered so late for a reason - there are lots of violations during startup process |
996 | 997 | // but they don't seem to break anything and are difficult to fix |
997 | 998 | Logging.info("Enabled EDT checker, wrongful access to gui from non EDT thread will be printed to console"); |
998 | 999 | RepaintManager.setCurrentManager(new CheckThreadViolationRepaintManager()); |
… |
… |
|
1180 | 1181 | UIManager.put("OptionPane.yesIcon", UIManager.get("OptionPane.okIcon")); |
1181 | 1182 | UIManager.put("OptionPane.cancelIcon", ImageProvider.getIfAvailable("cancel")); |
1182 | 1183 | UIManager.put("OptionPane.noIcon", UIManager.get("OptionPane.cancelIcon")); |
1183 | | // Ensures caret color is the same than text foreground color, see #12257 |
| 1184 | // Ensures caret color is the same as text foreground color, see #12257 |
1184 | 1185 | // See https://docs.oracle.com/javase/8/docs/api/javax/swing/plaf/synth/doc-files/componentProperties.html |
1185 | 1186 | for (String p : Arrays.asList( |
1186 | 1187 | "EditorPane", "FormattedTextField", "PasswordField", "TextArea", "TextField", "TextPane")) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/tools/Geometry.java b/src/org/openstreetmap/josm/tools/Geometry.java
a
|
b
|
|
350 | 350 | } |
351 | 351 | |
352 | 352 | /** |
353 | | * Get the segment segment intersection of two line segments |
| 353 | * Get the segment-segment intersection of two line segments |
354 | 354 | * @param x1 The x coordinate of the first point (first segment) |
355 | 355 | * @param y1 The y coordinate of the first point (first segment) |
356 | 356 | * @param x2 The x coordinate of the second point (first segment) |
… |
… |
|
921 | 921 | } |
922 | 922 | |
923 | 923 | /** |
924 | | * Get angles in radians and return it's value in range [0, 180]. |
| 924 | * Get angles in radians and return its value in range [0, 180]. |
925 | 925 | * |
926 | 926 | * @param angle the angle in radians |
927 | 927 | * @return normalized angle in degrees |
… |
… |
|
992 | 992 | } |
993 | 993 | |
994 | 994 | /** |
995 | | * Compute center of the circle closest to different nodes. |
| 995 | * Compute the center of the circle closest to different nodes. |
996 | 996 | * |
997 | 997 | * Ensure exact center computation in case nodes are already aligned in circle. |
998 | 998 | * This is done by least square method. |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/tools/GuiSizesHelper.java b/src/org/openstreetmap/josm/tools/GuiSizesHelper.java
a
|
b
|
|
10 | 10 | /** |
11 | 11 | * Support class to handle size information of Gui elements |
12 | 12 | * This is needed, because display resolution may vary a lot and a common set |
13 | | * of sizes wont work for all users alike. |
| 13 | * of sizes won't work for all users alike. |
14 | 14 | * @since 12682 (moved from {@code gui.util} package) |
15 | 15 | * @since 10358 |
16 | 16 | */ |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/tools/HttpClient.java b/src/org/openstreetmap/josm/tools/HttpClient.java
a
|
b
|
|
35 | 35 | import org.openstreetmap.josm.spi.preferences.Config; |
36 | 36 | |
37 | 37 | /** |
38 | | * Provides a uniform access for a HTTP/HTTPS server. This class should be used in favour of {@link HttpURLConnection}. |
| 38 | * Provides uniform access for a HTTP/HTTPS server. This class should be used in favour of {@link HttpURLConnection}. |
39 | 39 | * @since 9168 |
40 | 40 | */ |
41 | 41 | public abstract class HttpClient { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/test/unit/org/openstreetmap/josm/data/validation/tests/DirectionNodesTest.java b/test/unit/org/openstreetmap/josm/data/validation/tests/DirectionNodesTest.java
a
|
b
|
|
9 | 9 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; |
10 | 10 | |
11 | 11 | /** |
12 | | * JUnit Test of Multipolygon validation test. |
| 12 | * JUnit Test of {@link DirectionNodes} validation test. |
13 | 13 | */ |
14 | 14 | class DirectionNodesTest { |
15 | 15 | |
16 | | |
17 | 16 | /** |
18 | 17 | * Setup test. |
19 | 18 | */ |
… |
… |
|
26 | 25 | * @throws Exception in case of error |
27 | 26 | */ |
28 | 27 | @Test |
29 | | void testDirectionsNodesTestFile() throws Exception { |
| 28 | void testDirectionNodesTestFile() throws Exception { |
30 | 29 | final DirectionNodes test = new DirectionNodes(); |
31 | 30 | ValidatorTestUtils.testSampleFile("nodist/data/direction-nodes.osm", DataSet::getNodes, null, test); |
32 | 31 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/test/unit/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWayTest.java b/test/unit/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWayTest.java
a
|
b
|
|
22 | 22 | import org.openstreetmap.josm.data.osm.Way; |
23 | 23 | |
24 | 24 | /** |
25 | | * JUnit Test of Multipolygon validation test. |
| 25 | * JUnit Test of SelfIntersectingWay validation test. |
26 | 26 | */ |
27 | 27 | class SelfIntersectingWayTest { |
28 | 28 | |