Ticket #22832: josm_22832_typo_documentation_fixes.patch

File josm_22832_typo_documentation_fixes.patch, 24.0 KB (added by gaben, 2 years ago)
  • src/org/openstreetmap/josm/actions/upload/UploadHook.java

    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  
    66import org.openstreetmap.josm.data.APIDataSet;
    77
    88/**
    9  * Change, or block, the upload.
     9 * Change or block the upload.
    1010 *
    1111 * The UploadHook may modify the uploaded data silently, it may display a
    1212 * warning message to the user or prevent the upload altogether.
     
    1616public interface UploadHook {
    1717
    1818    /**
    19      * Check, and/or change, the data to be uploaded.
     19     * Check and/or change the data to be uploaded.
    2020     * Default implementation is to approve the upload.
    2121     * @param apiDataSet the data to upload, modify this to change the data.
    2222     * @return {@code true} if upload is possible, {@code false} to block the upload.
  • src/org/openstreetmap/josm/actions/UploadAction.java

    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  
    5656     * when the user wants to upload data. Plugins can insert their own hooks here
    5757     * if they want to be able to veto an upload.
    5858     *
    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.
    6060     * Plugins should normally insert their code before that, so that the upload
    6161     * dialog is the last thing shown before upload really starts; on occasion
    6262     * however, a plugin might also want to insert something after that.
     
    214214                return false;
    215215            }
    216216        }
     217
    217218        // Call all upload hooks in sequence.
    218219        // FIXME: this should become an asynchronous task
    219         //
    220220        if (apiData != null) {
    221221            return UPLOAD_HOOKS.stream().allMatch(hook -> hook.checkUpload(apiData));
    222222        }
     
    283283            Optional<AsynchronousUploadPrimitivesTask> asyncUploadTask = AsynchronousUploadPrimitivesTask.createAsynchronousUploadTask(
    284284                    uploadStrategySpecification, layer, apiData, cs);
    285285
    286             if (asyncUploadTask.isPresent()) {
    287                 MainApplication.worker.execute(asyncUploadTask.get());
    288             }
     286            asyncUploadTask.ifPresent(MainApplication.worker::execute);
    289287        } else {
    290288            MainApplication.worker.execute(new UploadPrimitivesTask(uploadStrategySpecification, layer, apiData, cs));
    291289        }
  • src/org/openstreetmap/josm/data/osm/IPrimitive.java

    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  
    287287     * used to check against edit conflicts.
    288288     *
    289289     * @return date of last modification
    290      * @see #getInstant
     290     * @see #setInstant
    291291     */
    292292    Instant getInstant();
    293293
  • src/org/openstreetmap/josm/data/osm/OsmUtils.java

    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  
    118118    /**
    119119     * Check if a tag value represents a boolean false value
    120120     * @param value The value to check
    121      * @return true if it is a true value.
     121     * @return true if it is a false value.
    122122     */
    123123    public static boolean isFalse(String value) {
    124124        if (value == null) {
     
    137137
    138138    /**
    139139     * 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.
    141141     * Ways and relations created using this method are empty.
    142142     * @param assertion The assertion describing OSM primitive (ex: "way name=Foo railway=rail")
    143143     * @return a new OSM primitive according to the given assertion
     
    150150
    151151    /**
    152152     * 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.
    154154     * @param assertion The assertion describing OSM primitive (ex: "way name=Foo railway=rail")
    155155     * @param around the coordinate at which the primitive will be located
    156156     * @param enforceLocation if {@code true}, ways and relations will not be empty to force a physical location
  • src/org/openstreetmap/josm/data/osm/Storage.java

    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  
    1414import org.openstreetmap.josm.tools.Utils;
    1515
    1616/**
    17  * A Set-like class that allows looking up equivalent preexising instance.
     17 * A Set-like class that allows looking up equivalent preexisting instance.
    1818 * It is useful wherever one would use self-mapping construct like
    1919 * <code>Map&lt;T,T&gt;.put(t,t)</code>, that is, for caches, uniqueness filters or similar.
    2020 *
  • src/org/openstreetmap/josm/data/projection/Ellipsoid.java

    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  
    356356    public double latitude(double latIso, double e, double epsilon) {
    357357        double lat0 = 2*Math.atan(Math.exp(latIso))-Math.PI/2;
    358358        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
    360360        while (Math.abs(lati1-lati) >= epsilon) {
    361361            lati = lati1;
    362362            double v1 = 1+e*Math.sin(lati);
  • src/org/openstreetmap/josm/data/validation/routines/EmailValidator.java

    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  
    2929 * </p>
    3030 * <p>
    3131 * This implementation is not guaranteed to catch all possible errors in an email address.
    32  * </p>.
    3332 *
    3433 * @version $Revision: 1741724 $
    3534 * @since Validator 1.4
     
    125124    }
    126125
    127126    /**
    128      * <p>Checks if a field has a valid e-mail address.</p>
     127     * Checks if a field has a valid e-mail address.
    129128     *
    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>
    131130     *              value is considered invalid.
    132131     * @return true if the email address is valid.
    133132     */
  • src/org/openstreetmap/josm/gui/conflict/pair/AbstractListMergeModel.java

    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  
    634634         * replies true if the {@link ListRole} of this {@link EntriesTableModel}
    635635         * participates in the current {@link ComparePairType}
    636636         *
    637          * @return true, if the if the {@link ListRole} of this {@link EntriesTableModel}
     637         * @return true, if the {@link ListRole} of this {@link EntriesTableModel}
    638638         * participates in the current {@link ComparePairType}
    639639         *
    640640         * @see AbstractListMergeModel.ComparePairListModel#getSelectedComparePair()
  • src/org/openstreetmap/josm/gui/conflict/pair/AbstractListMerger.java

    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  
    774774        }
    775775
    776776        /**
    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
    778778         * such that the action gets notified about item state changes and the button gets
    779779         * notified about selection state changes of the action.
    780780         *
  • src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    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  
    135135 *
    136136 * If no object is selected, the dialog list is empty.
    137137 * 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
    139139 * different objects share the same tag, the shared value is displayed. If they have
    140140 * different values, all of them are put in a combo box and the string "&lt;different&gt;"
    141141 * is displayed in italic.
  • src/org/openstreetmap/josm/gui/layer/MainLayerManager.java

    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  
    2626 * <p>
    2727 * The active layer is the layer the user is currently working on.
    2828 * <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.
    3030 * @author Michael Zangl
    3131 * @since 10279
    3232 */
     
    210210    }
    211211
    212212    /**
    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
    214214     * the listener. The previous layers will be null. The listener is notified in the current thread.
    215215     * @param listener the listener.
    216216     */
  • src/org/openstreetmap/josm/gui/progress/swing/PleaseWaitProgressMonitor.java

    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  
    106106    }
    107107
    108108    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
    110110        // which freeze current code flow until modal dialog is closed
    111111        SwingUtilities.invokeLater(() -> {
    112112            try {
  • src/org/openstreetmap/josm/gui/progress/ProgressMonitor.java

    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  
    7575    void finishTask();
    7676
    7777    /**
    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.
    7979     * Basically replaces {@link #beginTask(String)} and {@link #finishTask()}
    8080     *
    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
    8282     * might prevent it from passing progressMonitor away. If {@link #beginTask(String)} was
    8383     * already called then this method does nothing.
    8484     */
  • src/org/openstreetmap/josm/gui/widgets/AbstractFileChooser.java

    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  
    9797     * as an available choice in the choosable filter list.
    9898     * If false, the <code>AcceptAll</code> file filter is removed from
    9999     * 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
    101101     * the actively used file filter.
    102102     * @param b whether the <code>AcceptAll FileFilter</code> is used
    103103     * as an available choice in the choosable filter list
  • src/org/openstreetmap/josm/gui/MainApplication.java

    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  
    683683                "\t--version                                 "+tr("Displays the JOSM version and exits")+"\n\n"+
    684684                "\t--status-report                           "+ShowStatusReportAction.ACTION_DESCRIPTION+"\n\n"+
    685685                "\t--debug                                   "+tr("Print debugging messages to console")+"\n\n"+
     686                "\t--trace                                   "+tr("Print detailed debugging messages to console")+"\n\n"+
    686687                "\t--skip-plugins                            "+tr("Skip loading plugins")+"\n\n"+
    687688                "\t--offline=" + Arrays.stream(OnlineResource.values()).map(OnlineResource::name).collect(
    688689                        Collectors.joining("|", "<", ">")) + "\n" +
     
    992993        ChangesetUpdater.start();
    993994
    994995        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
    996997            // but they don't seem to break anything and are difficult to fix
    997998            Logging.info("Enabled EDT checker, wrongful access to gui from non EDT thread will be printed to console");
    998999            RepaintManager.setCurrentManager(new CheckThreadViolationRepaintManager());
     
    11801181        UIManager.put("OptionPane.yesIcon", UIManager.get("OptionPane.okIcon"));
    11811182        UIManager.put("OptionPane.cancelIcon", ImageProvider.getIfAvailable("cancel"));
    11821183        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
    11841185        // See https://docs.oracle.com/javase/8/docs/api/javax/swing/plaf/synth/doc-files/componentProperties.html
    11851186        for (String p : Arrays.asList(
    11861187                "EditorPane", "FormattedTextField", "PasswordField", "TextArea", "TextField", "TextPane")) {
  • src/org/openstreetmap/josm/tools/Geometry.java

    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  
    350350    }
    351351
    352352    /**
    353      * Get the segment segment intersection of two line segments
     353     * Get the segment-segment intersection of two line segments
    354354     * @param x1 The x coordinate of the first point (first segment)
    355355     * @param y1 The y coordinate of the first point (first segment)
    356356     * @param x2 The x coordinate of the second point (first segment)
     
    921921    }
    922922
    923923    /**
    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].
    925925     *
    926926     * @param angle the angle in radians
    927927     * @return normalized angle in degrees
     
    992992    }
    993993
    994994    /**
    995      * Compute center of the circle closest to different nodes.
     995     * Compute the center of the circle closest to different nodes.
    996996     *
    997997     * Ensure exact center computation in case nodes are already aligned in circle.
    998998     * This is done by least square method.
  • src/org/openstreetmap/josm/tools/GuiSizesHelper.java

    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  
    1010/**
    1111 * Support class to handle size information of Gui elements
    1212 * 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.
    1414 * @since 12682 (moved from {@code gui.util} package)
    1515 * @since 10358
    1616 */
  • src/org/openstreetmap/josm/tools/HttpClient.java

    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  
    3535import org.openstreetmap.josm.spi.preferences.Config;
    3636
    3737/**
    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}.
    3939 * @since 9168
    4040 */
    4141public abstract class HttpClient {
  • test/unit/org/openstreetmap/josm/data/validation/tests/DirectionNodesTest.java

    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  
    99import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1010
    1111/**
    12  * JUnit Test of Multipolygon validation test.
     12 * JUnit Test of {@link DirectionNodes} validation test.
    1313 */
    1414class DirectionNodesTest {
    1515
    16 
    1716    /**
    1817     * Setup test.
    1918     */
     
    2625     * @throws Exception in case of error
    2726     */
    2827    @Test
    29     void testDirectionsNodesTestFile() throws Exception {
     28    void testDirectionNodesTestFile() throws Exception {
    3029        final DirectionNodes test = new DirectionNodes();
    3130        ValidatorTestUtils.testSampleFile("nodist/data/direction-nodes.osm", DataSet::getNodes, null, test);
    3231    }
  • test/unit/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWayTest.java

    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  
    2222import org.openstreetmap.josm.data.osm.Way;
    2323
    2424/**
    25  * JUnit Test of Multipolygon validation test.
     25 * JUnit Test of SelfIntersectingWay validation test.
    2626 */
    2727class SelfIntersectingWayTest {
    2828