Changeset 8540 in josm for trunk/src


Ignore:
Timestamp:
2015-06-27T21:43:35+02:00 (9 years ago)
Author:
Don-vip
Message:

fix remaining checkstyle issues

Location:
trunk/src/org/openstreetmap/josm
Files:
96 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java

    r8533 r8540  
    221221     * Returns a {@link Pair} of a multipolygon creating/modifying {@link Command} as well as the multipolygon {@link Relation}.
    222222     */
    223     public static Pair<SequenceCommand, Relation> createMultipolygonCommand(Collection<Way> selectedWays, Relation selectedMultipolygonRelation) {
     223    public static Pair<SequenceCommand, Relation> createMultipolygonCommand(Collection<Way> selectedWays,
     224            Relation selectedMultipolygonRelation) {
    224225
    225226        final Pair<Relation, Relation> rr = selectedMultipolygonRelation == null
  • trunk/src/org/openstreetmap/josm/actions/DownloadAction.java

    r8510 r8540  
    3333    public DownloadAction() {
    3434        super(tr("Download from OSM..."), "download", tr("Download map data from the OSM server."),
     35                // CHECKSTYLE.OFF: LineLength
    3536                Shortcut.registerShortcut("file:download", tr("File: {0}", tr("Download from OSM...")), KeyEvent.VK_DOWN, Shortcut.CTRL_SHIFT), true);
     37                // CHECKSTYLE.ON: LineLength
    3638        putValue("help", ht("/Action/Download"));
    3739    }
  • trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java

    r8404 r8540  
    184184            HelpAwareOptionPane.showMessageDialogInEDT(
    185185                    Main.parent,
    186                     tr("<html>Could not load session file ''{0}''.<br>Error is:<br>{1}</html>", uri != null ? uri : file.getName(), e.getMessage()),
     186                    tr("<html>Could not load session file ''{0}''.<br>Error is:<br>{1}</html>",
     187                            uri != null ? uri : file.getName(), e.getMessage()),
    187188                    dialogTitle,
    188189                    JOptionPane.ERROR_MESSAGE,
  • trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java

    r8510 r8540  
    205205        cmds.add(new DeleteCommand(delNodes));
    206206        w.getDataSet().clearSelection(delNodes);
    207         return new SequenceCommand(trn("Simplify Way (remove {0} node)", "Simplify Way (remove {0} nodes)", delNodes.size(), delNodes.size()), cmds);
     207        return new SequenceCommand(
     208                trn("Simplify Way (remove {0} node)", "Simplify Way (remove {0} nodes)", delNodes.size(), delNodes.size()), cmds);
    208209    }
    209210
  • trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java

    r8510 r8540  
    5858
    5959        /**
    60          * @param command The command to be performed to split the way (which is saved for later retrieval by the {@link #getCommand} method)
    61          * @param newSelection The new list of selected primitives ids (which is saved for later retrieval by the {@link #getNewSelection} method)
    62          * @param originalWay The original way being split (which is saved for later retrieval by the {@link #getOriginalWay} method)
    63          * @param newWays The resulting new ways (which is saved for later retrieval by the {@link #getOriginalWay} method)
     60         * @param command The command to be performed to split the way (which is saved for later retrieval with {@link #getCommand})
     61         * @param newSelection The new list of selected primitives ids (which is saved for later retrieval with {@link #getNewSelection})
     62         * @param originalWay The original way being split (which is saved for later retrieval with {@link #getOriginalWay})
     63         * @param newWays The resulting new ways (which is saved for later retrieval with {@link #getOriginalWay})
    6464         */
    6565        public SplitWayResult(Command command, List<? extends PrimitiveId> newSelection, Way originalWay, List<Way> newWays) {
     
    342342     * @return the result from the split operation
    343343     */
    344     public static SplitWayResult splitWay(OsmDataLayer layer, Way way, List<List<Node>> wayChunks, Collection<? extends OsmPrimitive> selection) {
     344    public static SplitWayResult splitWay(OsmDataLayer layer, Way way, List<List<Node>> wayChunks,
     345            Collection<? extends OsmPrimitive> selection) {
    345346        // build a list of commands, and also a new selection list
    346347        Collection<Command> commandList = new ArrayList<>(wayChunks.size());
  • trunk/src/org/openstreetmap/josm/actions/ToggleAction.java

    r8509 r8540  
    7979            return (Boolean) selected;
    8080        } else {
    81             Main.warn(getClass().getName()+" does not define a boolean for SELECTED_KEY but "+selected+". You should report it to JOSM developers.");
     81            Main.warn(getClass().getName() + " does not define a boolean for SELECTED_KEY but " + selected +
     82                    ". You should report it to JOSM developers.");
    8283            return false;
    8384        }
  • trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java

    r8513 r8540  
    4949                "uploadselection",
    5050                tr("Upload all changes in the current selection to the OSM server."),
     51                // CHECKSTYLE.OFF: LineLength
    5152                Shortcut.registerShortcut("file:uploadSelection", tr("File: {0}", tr("Upload selection")), KeyEvent.VK_U, Shortcut.ALT_CTRL_SHIFT),
     53                // CHECKSTYLE.ON: LineLength
    5254                true);
    5355        putValue("help", ht("/Action/UploadSelection"));
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java

    r8510 r8540  
    338338            if (dataSet.allPrimitives().isEmpty()) {
    339339                rememberErrorMessage(tr("No data found in this area."));
    340                 // need to synthesize a download bounds lest the visual indication of downloaded
    341                 // area doesn't work
    342                 dataSet.dataSources.add(new DataSource(currentBounds != null ? currentBounds : new Bounds(new LatLon(0, 0)), "OpenStreetMap server"));
     340                // need to synthesize a download bounds lest the visual indication of downloaded area doesn't work
     341                dataSet.dataSources.add(new DataSource(currentBounds != null ? currentBounds :
     342                    new Bounds(new LatLon(0, 0)), "OpenStreetMap server"));
    343343            }
    344344
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java

    r8510 r8540  
    296296    @Override
    297297    public String getModeHelpText() {
     298        // CHECKSTYLE.OFF: LineLength
    298299        return tr("Click to delete. Shift: delete way segment. Alt: do not delete unused nodes when deleting a way. Ctrl: delete referring objects.");
     300        // CHECKSTYLE.ON: LineLength
    299301    }
    300302
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java

    r8510 r8540  
    915915
    916916        // find out the movement distance, in metres
    917         double distance = Main.getProjection().eastNorth2latlon(initialN1en).greatCircleDistance(Main.getProjection().eastNorth2latlon(n1movedEn));
     917        double distance = Main.getProjection().eastNorth2latlon(initialN1en).greatCircleDistance(
     918                Main.getProjection().eastNorth2latlon(n1movedEn));
    918919        Main.map.statusLine.setDist(distance);
    919920        updateStatusLine();
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java

    r8513 r8540  
    192192        switch (mode) {
    193193        case normal:
     194            // CHECKSTYLE.OFF: LineLength
    194195            return tr("Select ways as in Select mode. Drag selected ways or a single way to create a parallel copy (Alt toggles tag preservation)");
     196            // CHECKSTYLE.ON: LineLength
    195197        case dragging:
    196198            return tr("Hold Ctrl to toggle snapping");
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r8512 r8540  
    827827            ed.setContent(
    828828                    /* for correct i18n of plural forms - see #9110 */
    829                     trn(
    830                             "You moved more than {0} element. " + "Moving a large number of elements is often an error.\n" + "Really move them?",
    831                             "You moved more than {0} elements. " + "Moving a large number of elements is often an error.\n" + "Really move them?",
    832                             max, max));
     829                    trn("You moved more than {0} element. " + "Moving a large number of elements is often an error.\n" + "Really move them?",
     830                        "You moved more than {0} elements. " + "Moving a large number of elements is often an error.\n" + "Really move them?",
     831                        max, max));
    833832            ed.setCancelButton(2);
    834833            ed.toggleEnable("movedManyElements");
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r8510 r8540  
    403403                .addKeyword("child <i>expr</i>", "child ", tr("all children of objects matching the expression"), "child building")
    404404                .addKeyword("parent <i>expr</i>", "parent ", tr("all parents of objects matching the expression"), "parent bus_stop")
    405                 .addKeyword("nth:<i>7</i>", "nth: ", tr("n-th member of relation and/or n-th node of way"), "nth:5 (child type:relation)", "nth:-1")
    406                 .addKeyword("nth%:<i>7</i>", "nth%: ", tr("every n-th member of relation and/or every n-th node of way"), "nth%:100 (child waterway)")
     405                .addKeyword("nth:<i>7</i>", "nth: ",
     406                        tr("n-th member of relation and/or n-th node of way"), "nth:5 (child type:relation)", "nth:-1")
     407                .addKeyword("nth%:<i>7</i>", "nth%: ",
     408                        tr("every n-th member of relation and/or every n-th node of way"), "nth%:100 (child waterway)")
    407409                , GBC.eol());
    408410            right.add(new SearchKeywordRow(hcbSearchString)
  • trunk/src/org/openstreetmap/josm/command/DeleteCommand.java

    r8510 r8540  
    477477    }
    478478
    479     public static boolean checkAndConfirmOutlyingDelete(Collection<? extends OsmPrimitive> primitives, Collection<? extends OsmPrimitive> ignore) {
     479    public static boolean checkAndConfirmOutlyingDelete(Collection<? extends OsmPrimitive> primitives,
     480            Collection<? extends OsmPrimitive> ignore) {
    480481        return Command.checkAndConfirmOutlyingOperation("delete",
    481482                tr("Delete confirmation"),
  • trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java

    r8510 r8540  
    159159        boolean lowerOnly = Main.pref.getBoolean("system_of_measurement.use_only_lower_unit", false);
    160160        boolean customAreaOnly = Main.pref.getBoolean("system_of_measurement.use_only_custom_area_unit", false);
    161         if ((!lowerOnly && areaCustomValue > 0 && a > areaCustomValue / (aValue*aValue) && a < (bValue*bValue) / (aValue*aValue)) || customAreaOnly)
     161        if ((!lowerOnly && areaCustomValue > 0 && a > areaCustomValue / (aValue*aValue)
     162                && a < (bValue*bValue) / (aValue*aValue)) || customAreaOnly)
    162163            return formatText(area / areaCustomValue, areaCustomName, format);
    163164        else if (!lowerOnly && a >= (bValue*bValue) / (aValue*aValue))
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r8530 r8540  
    335335                    // for further requests - use HEAD
    336336                    String serverKey = getServerKey();
    337                     log.log(Level.INFO, "JCS - Host: {0} found not to return 304 codes for If-Modifed-Since or If-None-Match headers", serverKey);
     337                    log.log(Level.INFO, "JCS - Host: {0} found not to return 304 codes for If-Modifed-Since or If-None-Match headers",
     338                            serverKey);
    338339                    useHead.put(serverKey, Boolean.TRUE);
    339340                }
  • trunk/src/org/openstreetmap/josm/data/coor/LatLon.java

    r8526 r8540  
    3131 * where valid values are in the [-180,180] and positive values specify positions east of the prime meridian.
    3232 * <br>
    33  * <img alt="lat/lon" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Latitude_and_Longitude_of_the_Earth.svg/500px-Latitude_and_Longitude_of_the_Earth.svg.png">
     33 * <img alt="lat/lon" src="https://upload.wikimedia.org/wikipedia/commons/6/62/Latitude_and_Longitude_of_the_Earth.svg">
    3434 * <br>
    3535 * This class is immutable.
  • trunk/src/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSource.java

    r8530 r8540  
    133133        //          E.g. [1] lists lat as first coordinate axis and lot as second, so it is switched for EPSG:4326.
    134134        //          For most other EPSG code there seems to be no difference.
     135        // CHECKSTYLE.OFF: LineLength
    135136        // [1] https://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::4326&reportDetail=short&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title=EPSG:4326
     137        // CHECKSTYLE.ON: LineLength
    136138        boolean switchLatLon = false;
    137139        if (baseUrl.toLowerCase().contains("crs=epsg:4326")) {
  • trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java

    r8510 r8540  
    528528            for (int i = 0; i < keys.length; i += 2) {
    529529                if (keys[i].equals(key)) {
    530                     keys[i+1] = value;  // This modifies the keys array but it doesn't make it invalidate for any time so its ok (see note no top)
     530                    // This modifies the keys array but it doesn't make it invalidate for any time so its ok (see note no top)
     531                    keys[i+1] = value;
    531532                    keysChangedImpl(originalKeys);
    532533                    return;
  • trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java

    r8512 r8540  
    178178                OsmPrimitive source = sourceDataSet.getPrimitiveById(target.getPrimitiveId());
    179179                if (source == null)
    180                     throw new RuntimeException(tr("Object of type {0} with id {1} was marked to be deleted, but it''s missing in the source dataset",
     180                    throw new RuntimeException(
     181                            tr("Object of type {0} with id {1} was marked to be deleted, but it''s missing in the source dataset",
    181182                            target.getType(), target.getUniqueId()));
    182183
  • trunk/src/org/openstreetmap/josm/data/osm/Node.java

    r8512 r8540  
    374374                    final boolean containsN = visited.contains(n);
    375375                    visited.add(n);
    376                     if (!containsN && (predicate == null || predicate.evaluate(n)) && n.isConnectedTo(otherNodes, hops - 1, predicate, visited)) {
     376                    if (!containsN && (predicate == null || predicate.evaluate(n))
     377                            && n.isConnectedTo(otherNodes, hops - 1, predicate, visited)) {
    377378                        return true;
    378379                    }
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java

    r8510 r8540  
    7575     * @since 5440
    7676     */
    77     public HistoryOsmPrimitive(long id, long version, boolean visible, User user, long changesetId, Date timestamp, boolean checkHistoricParams) {
     77    public HistoryOsmPrimitive(long id, long version, boolean visible, User user, long changesetId, Date timestamp,
     78            boolean checkHistoricParams) {
    7879        ensurePositiveLong(id, "id");
    7980        ensurePositiveLong(version, "version");
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java

    r8510 r8540  
    7070     * @throws IllegalArgumentException if preconditions are violated
    7171     */
    72     public HistoryRelation(long id, long version, boolean visible, User user, long changesetId, Date timestamp, List<RelationMemberData> members) {
     72    public HistoryRelation(long id, long version, boolean visible, User user, long changesetId, Date timestamp,
     73            List<RelationMemberData> members) {
    7374        this(id, version, visible, user, changesetId, timestamp);
    7475        if (members != null) {
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java

    r8513 r8540  
    127127        try {
    128128            // print highlighted virtual nodes. Since only the color changes, simply
    129             // drawing them over the existing ones works fine (at least in their current
    130             // simple style)
     129            // drawing them over the existing ones works fine (at least in their current simple style)
    131130            path = new GeneralPath();
    132131            for (WaySegment wseg: data.getHighlightedVirtualNodes()) {
     
    141140            // if the way has changed while being rendered (fix #7979)
    142141            // TODO: proper solution ?
    143             // Idea from bastiK: avoid the WaySegment class and add another data class with { Way way; Node firstNode, secondNode; int firstIdx; }.
    144             // On read, it would first check, if the way still has firstIdx+2 nodes, then check if the corresponding way nodes are still the same
    145             // and report changes in a more controlled manner.
     142            // Idea from bastiK:
     143            // avoid the WaySegment class and add another data class with { Way way; Node firstNode, secondNode; int firstIdx; }.
     144            // On read, it would first check, if the way still has firstIdx+2 nodes, then check if the corresponding way nodes are still
     145            // the same and report changes in a more controlled manner.
    146146            if (Main.isTraceEnabled()) {
    147147                Main.trace(e.getMessage());
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java

    r8510 r8540  
    250250        if (!isRegistered(defaultRenderer))
    251251            throw new IllegalStateException(
    252                     MessageFormat.format("Class ''{0}'' not registered as renderer. Can''t activate default renderer.", defaultRenderer.getName())
     252                    MessageFormat.format("Class ''{0}'' not registered as renderer. Can''t activate default renderer.",
     253                            defaultRenderer.getName())
    253254            );
    254255        activate(defaultRenderer);
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFileWrapper.java

    r7937 r8540  
    1313 */
    1414public class NTV2GridShiftFileWrapper {
     15
     16    // CHECKSTYLE.OFF: LineLength
    1517
    1618    /**
     
    2931     */
    3032    public static final NTV2GridShiftFileWrapper ntf_rgf93 = new NTV2GridShiftFileWrapper("resource://data/projection/ntf_r93_b.gsb");
     33
     34    // CHECKSTYLE.ON: LineLength
    3135
    3236    private NTV2GridShiftFile instance = null;
  • trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java

    r8509 r8540  
    2020import org.openstreetmap.josm.data.projection.ProjectionConfigurationException;
    2121
     22// CHECKSTYLE.OFF: LineLength
     23
    2224/**
    2325 * Projection for the SwissGrid CH1903 / L03, see <a href="https://en.wikipedia.org/wiki/Swiss_coordinate_system">Wikipedia article</a>.<br>
     
    3234 */
    3335public class SwissObliqueMercator implements Proj {
     36
     37    // CHECKSTYLE.ON: LineLength
    3438
    3539    private Ellipsoid ellps;
  • trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java

    r8509 r8540  
    2727
    2828    private final OpeningHourTest openingHourTest = new OpeningHourTest();
    29     private static final Set<String> RESTRICTION_TYPES = new HashSet<>(Arrays.asList("oneway", "toll", "noexit", "maxspeed", "minspeed", "maxstay",
    30             "maxweight", "maxaxleload", "maxheight", "maxwidth", "maxlength", "overtaking", "maxgcweight", "maxgcweightrating", "fee"));
     29    private static final Set<String> RESTRICTION_TYPES = new HashSet<>(Arrays.asList("oneway", "toll", "noexit", "maxspeed", "minspeed",
     30            "maxstay", "maxweight", "maxaxleload", "maxheight", "maxwidth", "maxlength", "overtaking", "maxgcweight", "maxgcweightrating",
     31            "fee"));
    3132    private static final Set<String> RESTRICTION_VALUES = new HashSet<>(Arrays.asList("yes", "official", "designated", "destination",
    3233            "delivery", "permissive", "private", "agricultural", "forestry", "no"));
  • trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java

    r8509 r8540  
    9393            }
    9494            if (n.hasKey("source:maxspeed")) {
    95                 // Check maxspeed but not context against highway for nodes as maxspeed is not set on highways here but on signs, speed cameras, etc.
     95                // Check maxspeed but not context against highway for nodes
     96                // as maxspeed is not set on highways here but on signs, speed cameras, etc.
    9697                testSourceMaxspeed(n, false);
    9798            }
     
    209210                }
    210211                if ((leftByPedestrians || leftByCyclists) && leftByCars) {
    211                     errors.add(new TestError(this, Severity.OTHER, tr("Missing pedestrian crossing information"), MISSING_PEDESTRIAN_CROSSING, n));
     212                    errors.add(new TestError(this, Severity.OTHER, tr("Missing pedestrian crossing information"),
     213                            MISSING_PEDESTRIAN_CROSSING, n));
    212214                    return;
    213215                }
     
    244246            String country = value.substring(0, index);
    245247            if (!ISO_COUNTRIES.contains(country)) {
    246                 errors.add(new TestError(this, Severity.WARNING, tr("Unknown country code: {0}", country), SOURCE_MAXSPEED_UNKNOWN_COUNTRY_CODE, p));
     248                errors.add(new TestError(this, Severity.WARNING,
     249                        tr("Unknown country code: {0}", country), SOURCE_MAXSPEED_UNKNOWN_COUNTRY_CODE, p));
    247250            }
    248251            // Check context
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java

    r8510 r8540  
    431431            final StringBuffer sb = new StringBuffer();
    432432            while (m.find()) {
    433                 final String argument = determineArgument((Selector.GeneralSelector) matchingSelector, Integer.parseInt(m.group(1)), m.group(2), p);
     433                final String argument = determineArgument((Selector.GeneralSelector) matchingSelector,
     434                        Integer.parseInt(m.group(1)), m.group(2), p);
    434435                try {
    435436                    // Perform replacement with null-safe + regex-safe handling
  • trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java

    r8510 r8540  
    192192     * @return a list of {@link TestError} or an empty list
    193193     */
    194     public List<OpeningHoursTestError> checkOpeningHourSyntax(final String key, final String value, CheckMode mode, boolean ignoreOtherSeverity) {
     194    public List<OpeningHoursTestError> checkOpeningHourSyntax(final String key, final String value, CheckMode mode,
     195            boolean ignoreOtherSeverity) {
    195196        if (ENGINE == null || value == null || value.trim().isEmpty()) {
    196197            return Collections.emptyList();
  • trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java

    r8510 r8540  
    7171
    7272    /**
    73      * Determines whether the key has been marked to be part of a bulk operation (in order to provide a "Do not show again (this operation)" option).
     73     * Determines whether the key has been marked to be part of a bulk operation
     74     * (in order to provide a "Do not show again (this operation)" option).
    7475     * @param prefKey the preference key
    7576     */
  • trunk/src/org/openstreetmap/josm/gui/FileDrop.java

    r8512 r8540  
    3434import org.openstreetmap.josm.Main;
    3535import org.openstreetmap.josm.actions.OpenFileAction;
     36
     37// CHECKSTYLE.OFF: HideUtilityClassConstructor
    3638
    3739/**
     
    7779public class FileDrop {
    7880
     81    // CHECKSTYLE.ON: HideUtilityClassConstructor
     82
    7983    private Border normalBorder;
    8084    private DropTargetListener dropListener;
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r8510 r8540  
    518518     * @param actionToBeInserted the action that should get a menu item directly below {@code existingMenuEntryAction}
    519519     * @param isExpert whether the entry should only be visible if the expert mode is activated
    520      * @param existingMenuEntryAction an action already added to the menu {@code menu}, the action {@code actionToBeInserted} is added directly below
     520     * @param existingMenuEntryAction an action already added to the menu {@code menu},
     521     * the action {@code actionToBeInserted} is added directly below
    521522     * @return the created menu item
    522523     */
  • trunk/src/org/openstreetmap/josm/gui/MapMover.java

    r8510 r8540  
    9898
    9999        if (contentPane != null) {
     100            // CHECKSTYLE.OFF: LineLength
    100101            contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    101102                Shortcut.registerShortcut("system:movefocusright", tr("Map: {0}", tr("Move right")), KeyEvent.VK_RIGHT, Shortcut.CTRL).getKeyStroke(),
     
    117118                "MapMover.Zoomer.down");
    118119            contentPane.getActionMap().put("MapMover.Zoomer.down", new ZoomerAction("down"));
     120            // CHECKSTYLE.ON: LineLength
    119121
    120122            // see #10592 - Disable these alternate shortcuts on OS X because of conflict with system shortcut
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java

    r8510 r8540  
    197197     * Task can run in background if returned value != null. Note that it's tasks responsibility
    198198     * to ensure proper synchronization, PleaseWaitRunnable doesn't with it.
    199      * @return If returned value is != null then task can run in background. TaskId could be used in future for "Always run in background" checkbox
     199     * @return If returned value is != null then task can run in background.
     200     * TaskId could be used in future for "Always run in background" checkbox
    200201     */
    201202    public ProgressTaskId canRunInBackground() {
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java

    r8510 r8540  
    608608            final Collection<? extends OsmPrimitive> primitives,
    609609            final TagCollection normalizedTags) throws UserCancelException {
    610         String conflicts = Utils.joinAsHtmlUnorderedList(Utils.transform(normalizedTags.getKeysWithMultipleValues(), new Function<String, String>() {
    611 
     610        String conflicts = Utils.joinAsHtmlUnorderedList(Utils.transform(normalizedTags.getKeysWithMultipleValues(),
     611                new Function<String, String>() {
    612612            @Override
    613613            public String apply(String key) {
    614                 return tr("{0} ({1})", key, Utils.join(tr(", "), Utils.transform(normalizedTags.getValues(key), new Function<String, String>() {
    615 
     614                return tr("{0} ({1})", key, Utils.join(tr(", "), Utils.transform(normalizedTags.getValues(key),
     615                        new Function<String, String>() {
    616616                    @Override
    617617                    public String apply(String x) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditor.java

    r8512 r8540  
    9191            @Override
    9292            public void processKeyEvent(KeyEvent e) {
    93                 if (e.getID() == KeyEvent.KEY_PRESSED && e.getKeyCode() == KeyEvent.VK_ENTER) {
     93                int keyCode = e.getKeyCode();
     94                if (e.getID() == KeyEvent.KEY_PRESSED && keyCode == KeyEvent.VK_ENTER) {
    9495                    fireGotoNextDecision();
    95                 } else if (e.getID() == KeyEvent.KEY_PRESSED && e.getKeyCode() == KeyEvent.VK_TAB) {
     96                } else if (e.getID() == KeyEvent.KEY_PRESSED && keyCode == KeyEvent.VK_TAB) {
    9697                    if (e.isShiftDown()) {
    9798                        fireGotoPreviousDecision();
     
    99100                        fireGotoNextDecision();
    100101                    }
    101                 } else if (e.getID() == KeyEvent.KEY_PRESSED && e.getKeyCode() == KeyEvent.VK_DELETE || e.getKeyCode() == KeyEvent.VK_BACK_SPACE) {
     102                } else if (e.getID() == KeyEvent.KEY_PRESSED && keyCode == KeyEvent.VK_DELETE || keyCode == KeyEvent.VK_BACK_SPACE) {
    102103                    if (editorModel.getIndexOf(MultiValueDecisionType.KEEP_NONE) > 0) {
    103104                        editorModel.setSelectedItem(MultiValueDecisionType.KEEP_NONE);
    104105                        fireGotoNextDecision();
    105106                    }
    106                 } else if (e.getID() == KeyEvent.KEY_PRESSED && e.getKeyCode() == KeyEvent.VK_ESCAPE) {
     107                } else if (e.getID() == KeyEvent.KEY_PRESSED && keyCode == KeyEvent.VK_ESCAPE) {
    107108                    cancelCellEditing();
    108109                }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java

    r8510 r8540  
    404404        public SelectAndZoomAction() {
    405405            putValue(NAME, tr("Select and zoom"));
    406             putValue(SHORT_DESCRIPTION, tr("Selects the objects that take part in this command (unless currently deleted), then and zooms to it"));
     406            putValue(SHORT_DESCRIPTION,
     407                    tr("Selects the objects that take part in this command (unless currently deleted), then and zooms to it"));
    407408            putValue(SMALL_ICON, ImageProvider.get("dialogs/autoscale", "selection"));
    408409        }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java

    r8510 r8540  
    126126         */
    127127        JPanel p = panels.get(N-1); // current Panel (start with last one)
    128         int k = -1;                 // indicates that the current Panel index is N-1, but no default-view-Dialog has been added to this Panel yet.
     128        int k = -1;                 // indicates that current Panel index is N-1, but no default-view-Dialog has been added to this Panel yet.
    129129        for (int i = N-1; i >= 0; --i) {
    130130            final ToggleDialog dlg = allDialogs.get(i);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java

    r8510 r8540  
    469469    }
    470470
    471     private static void setLatLon(final LatLonHolder latLon, final double coordDeg, final double coordMin, final double coordSec, final String card) {
     471    private static void setLatLon(final LatLonHolder latLon, final double coordDeg, final double coordMin, final double coordSec,
     472            final String card) {
    472473        if (coordDeg < -180 || coordDeg > 180 || coordMin < 0 || coordMin >= 60 || coordSec < 0 || coordSec > 60) {
    473474            throw new IllegalArgumentException("out of range");
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java

    r8512 r8540  
    948948            setSelected(visible);
    949949            setTranslucent(layer.getOpacity() < 1.0);
    950             setToolTipText(visible ? tr("layer is currently visible (click to hide layer)") : tr("layer is currently hidden (click to show layer)"));
     950            setToolTipText(visible ?
     951                tr("layer is currently visible (click to hide layer)") :
     952                tr("layer is currently hidden (click to show layer)"));
    951953        }
    952954    }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java

    r8512 r8540  
    108108    private final DuplicateRelationAction duplicateAction = new DuplicateRelationAction();
    109109    private final DownloadMembersAction downloadMembersAction = new DownloadMembersAction();
    110     private final DownloadSelectedIncompleteMembersAction downloadSelectedIncompleteMembersAction = new DownloadSelectedIncompleteMembersAction();
     110    private final DownloadSelectedIncompleteMembersAction downloadSelectedIncompleteMembersAction =
     111            new DownloadSelectedIncompleteMembersAction();
    111112    private final SelectMembersAction selectMembersAction = new SelectMembersAction(false);
    112113    private final SelectMembersAction addMembersToSelectionAction = new SelectMembersAction(true);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java

    r8510 r8540  
    594594                }
    595595                // It is wanted to ignore an error if it said fixable, even if fixCommand was null
    596                 // This is to fix #5764 and #5773: a delete command, for example, may be null if all concerned primitives have already been deleted
     596                // This is to fix #5764 and #5773:
     597                // a delete command, for example, may be null if all concerned primitives have already been deleted
    597598                error.setIgnored(true);
    598599            }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java

    r8513 r8540  
    527527                    query.forUser(im.getUserId());
    528528                } else
    529                     throw new IllegalStateException(tr("Cannot restrict changeset query to the current user because the current user is anonymous"));
     529                    throw new IllegalStateException(
     530                            tr("Cannot restrict changeset query to the current user because the current user is anonymous"));
    530531            } else if (rbRestrictToUid.isSelected()) {
    531532                int uid  = valUid.getUid();
     
    536537            } else if (rbRestrictToUserName.isSelected()) {
    537538                if (!valUserName.isValid())
    538                     throw new IllegalStateException(tr("Cannot restrict the changeset query to the user name ''{0}''", tfUserName.getText()));
     539                    throw new IllegalStateException(
     540                            tr("Cannot restrict the changeset query to the user name ''{0}''", tfUserName.getText()));
    539541                query.forUser(tfUserName.getText());
    540542            }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java

    r8510 r8540  
    3131            if (isSelected) {
    3232                c.setForeground(Main.pref.getColor(marktr("Discardable key: selection Foreground"), Color.GRAY));
    33                 c.setBackground(Main.pref.getColor(marktr("Discardable key: selection Background"), defaults.getColor("Table.selectionBackground")));
     33                c.setBackground(Main.pref.getColor(marktr("Discardable key: selection Background"),
     34                        defaults.getColor("Table.selectionBackground")));
    3435            } else {
    3536                c.setForeground(Main.pref.getColor(marktr("Discardable key: foreground"), Color.GRAY));
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r8510 r8540  
    183183
    184184    private final DownloadMembersAction downloadMembersAction = new DownloadMembersAction();
    185     private final DownloadSelectedIncompleteMembersAction downloadSelectedIncompleteMembersAction = new DownloadSelectedIncompleteMembersAction();
     185    private final DownloadSelectedIncompleteMembersAction downloadSelectedIncompleteMembersAction =
     186            new DownloadSelectedIncompleteMembersAction();
    186187
    187188    private final SelectMembersAction selectMembersAction = new SelectMembersAction(false);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r8538 r8540  
    416416    public static final BooleanProperty PROPERTY_FIX_TAG_LOCALE = new BooleanProperty("properties.fix-tag-combobox-locale", false);
    417417    public static final BooleanProperty PROPERTY_REMEMBER_TAGS = new BooleanProperty("properties.remember-recently-added-tags", true);
    418     public static final IntegerProperty PROPERTY_RECENT_TAGS_NUMBER = new IntegerProperty("properties.recently-added-tags", DEFAULT_LRU_TAGS_NUMBER);
     418    public static final IntegerProperty PROPERTY_RECENT_TAGS_NUMBER = new IntegerProperty("properties.recently-added-tags",
     419            DEFAULT_LRU_TAGS_NUMBER);
    419420
    420421    abstract class AbstractTagsDialog extends ExtendedDialog {
     
    697698                String actionShortcutKey = "properties:recent:"+count;
    698699                String actionShortcutShiftKey = "properties:recent:shift:"+count;
     700                // CHECKSTYLE.OFF: LineLength
    699701                Shortcut sc = Shortcut.registerShortcut(actionShortcutKey, tr("Choose recent tag {0}", count), KeyEvent.VK_0+count, Shortcut.CTRL);
     702                // CHECKSTYLE.ON: LineLength
    700703                final JosmAction action = new JosmAction(actionShortcutKey, null, tr("Use this tag again"), sc, false) {
    701704                    @Override
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java

    r8513 r8540  
    222222        registerCopyPasteAction(tagEditorPanel.getPasteAction(),
    223223                "PASTE_TAGS",
     224                // CHECKSTYLE.OFF: LineLength
    224225                Shortcut.registerShortcut("system:pastestyle", tr("Edit: {0}", tr("Paste Tags")), KeyEvent.VK_V, Shortcut.CTRL_SHIFT).getKeyStroke());
     226                // CHECKSTYLE.ON: LineLength
    225227        registerCopyPasteAction(new PasteMembersAction(), "PASTE_MEMBERS", Shortcut.getPasteKeyStroke());
    226228        registerCopyPasteAction(new CopyMembersAction(), "COPY_MEMBERS", Shortcut.getCopyKeyStroke());
     
    695697        getRootPane().getActionMap().put(actionName, action);
    696698        getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(shortcut, actionName);
    697         // Assign also to JTables because they have their own Copy&Paste implementation (which is disabled in this case but eats key shortcuts anyway)
     699        // Assign also to JTables because they have their own Copy&Paste implementation
     700        // (which is disabled in this case but eats key shortcuts anyway)
    698701        memberTable.getInputMap(JComponent.WHEN_FOCUSED).put(shortcut, actionName);
    699702        memberTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(shortcut, actionName);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java

    r8510 r8540  
    154154        protected void realRun() throws SAXException, IOException, OsmTransferException {
    155155            try {
    156                 OsmServerObjectReader reader = new OsmServerObjectReader(relation.getId(), OsmPrimitiveType.from(relation), true /* full load */);
     156                OsmServerObjectReader reader = new OsmServerObjectReader(relation.getId(), OsmPrimitiveType.from(relation), true);
    157157                ds = reader.parseOsm(progressMonitor
    158158                        .createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
  • trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java

    r8510 r8540  
    9191     * @param myVersion  the version of the primitive in the local dataset
    9292     */
    93     protected void handleUploadConflictForKnownConflict(final OsmPrimitiveType primitiveType, final long id, String serverVersion, String myVersion) {
     93    protected void handleUploadConflictForKnownConflict(final OsmPrimitiveType primitiveType, final long id, String serverVersion,
     94            String myVersion) {
    9495        String lbl = "";
    9596        switch(primitiveType) {
  • trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java

    r8510 r8540  
    238238    }
    239239
    240     @Override protected void realRun() {
     240    @Override
     241    protected void realRun() {
    241242        try {
    242243            uploadloop: while (true) {
    243244                try {
    244                     getProgressMonitor().subTask(trn("Uploading {0} object...", "Uploading {0} objects...", toUpload.getSize(), toUpload.getSize()));
     245                    getProgressMonitor().subTask(
     246                            trn("Uploading {0} object...", "Uploading {0} objects...", toUpload.getSize(), toUpload.getSize()));
    245247                    synchronized (this) {
    246248                        writer = new OsmServerWriter();
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java

    r8530 r8540  
    13991399        g.setFont(InfoFont);
    14001400
    1401         // The current zoom tileset should have all of its tiles
    1402         // due to the loadAllTiles(), unless it to tooLarge()
     1401        // The current zoom tileset should have all of its tiles due to the loadAllTiles(), unless it to tooLarge()
    14031402        for (Tile t : ts.allExistingTiles()) {
    14041403            this.paintTileText(ts, t, g, mv, displayZoomLevel, t);
    14051404        }
    14061405
    1407         attribution.paintAttribution(g, mv.getWidth(), mv.getHeight(), getShiftedCoord(topLeft), getShiftedCoord(botRight), displayZoomLevel, this);
     1406        attribution.paintAttribution(g, mv.getWidth(), mv.getHeight(), getShiftedCoord(topLeft), getShiftedCoord(botRight),
     1407                displayZoomLevel, this);
    14081408
    14091409        //g.drawString("currentZoomLevel=" + currentZoomLevel, 120, 120);
  • trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java

    r8530 r8540  
    153153
    154154    public static ImageryLayer create(ImageryInfo info) {
    155         if (info.getImageryType() == ImageryType.WMS || info.getImageryType() == ImageryType.HTML)
     155        ImageryType type = info.getImageryType();
     156        if (type == ImageryType.WMS || type == ImageryType.HTML)
    156157            return new WMSLayer(info);
    157         else if (info.getImageryType() == ImageryType.TMS || info.getImageryType() == ImageryType.BING || info.getImageryType() == ImageryType.SCANEX)
     158        else if (type == ImageryType.TMS || type == ImageryType.BING || type == ImageryType.SCANEX)
    158159            return new TMSLayer(info);
    159160        else throw new AssertionError();
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r8513 r8540  
    859859    /**
    860860     * Sets the "discouraged upload" flag.
    861      * @param uploadDiscouraged {@code true} if upload of data managed by this layer is discouraged. This feature allows to use "private" data layers.
     861     * @param uploadDiscouraged {@code true} if upload of data managed by this layer is discouraged.
     862     * This feature allows to use "private" data layers.
    862863     */
    863864    public final void setUploadDiscouraged(boolean uploadDiscouraged) {
  • trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java

    r8530 r8540  
    4242            AbstractTileSourceLayer.PROP_MAX_ZOOM_LVL.get());
    4343    /** shall TMS layers be added to download dialog */
    44     public static final BooleanProperty PROP_ADD_TO_SLIPPYMAP_CHOOSER = new BooleanProperty(PREFERENCE_PREFIX + ".add_to_slippymap_chooser", true);
     44    public static final BooleanProperty PROP_ADD_TO_SLIPPYMAP_CHOOSER = new BooleanProperty(PREFERENCE_PREFIX + ".add_to_slippymap_chooser",
     45            true);
    4546
    4647    /** loader factory responsible for loading tiles for this layer */
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r8512 r8540  
    10371037    @Override
    10381038    public void propertyChange(PropertyChangeEvent evt) {
    1039         if (NavigatableComponent.PROPNAME_CENTER.equals(evt.getPropertyName()) || NavigatableComponent.PROPNAME_SCALE.equals(evt.getPropertyName())) {
     1039        if (NavigatableComponent.PROPNAME_CENTER.equals(evt.getPropertyName()) ||
     1040                NavigatableComponent.PROPNAME_SCALE.equals(evt.getPropertyName())) {
    10401041            updateOffscreenBuffer = true;
    10411042        }
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java

    r8509 r8540  
    4444        JPanel msg = new JPanel(new GridBagLayout());
    4545        msg.add(new JLabel(
     46                // CHECKSTYLE.OFF: LineLength
    4647                tr("<html>Upload of unprocessed GPS data as map data is considered harmful.<br>If you want to upload traces, look here:</html>")),
     48                // CHECKSTYLE.ON: LineLength
    4749                GBC.eol());
    4850        msg.add(new UrlLabel(Main.getOSMWebsite() + "/traces", 2), GBC.eop());
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java

    r8510 r8540  
    327327                    case TIME:
    328328                        double t = trkPnt.time;
    329                         if (t > 0 && t <= now && maxval - minval > minTrackDurationForTimeColoring) { // skip bad timestamps and very short tracks
     329                        // skip bad timestamps and very short tracks
     330                        if (t > 0 && t <= now && maxval - minval > minTrackDurationForTimeColoring) {
    330331                            color = dateScale.getColor(t);
    331332                        } else {
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java

    r8510 r8540  
    110110                names = "";
    111111            }
    112             MarkerLayer ml = new MarkerLayer(new GpxData(), tr("Audio markers from {0}", layer.getName()) + names, layer.getAssociatedFile(), layer);
     112            MarkerLayer ml = new MarkerLayer(new GpxData(),
     113                    tr("Audio markers from {0}", layer.getName()) + names, layer.getAssociatedFile(), layer);
    113114            double firstStartTime = sel[0].lastModified() / 1000.0 - AudioUtil.getCalibratedDuration(sel[0]);
    114115            Markers m = new Markers();
     
    311312            .showMessageDialog(
    312313                    Main.parent,
     314                    // CHECKSTYLE.OFF: LineLength
    313315                    tr("Some waypoints with timestamps from before the start of the track or after the end were omitted or moved to the start."));
     316                    // CHECKSTYLE.ON: LineLength
    314317            markers.timedMarkersOmitted = timedMarkersOmitted;
    315318        }
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ButtonMarker.java

    r6830 r8540  
    3131    }
    3232
    33     public ButtonMarker(LatLon ll, TemplateEngineDataProvider dataProvider, String buttonImage, MarkerLayer parentLayer, double time, double offset) {
     33    public ButtonMarker(LatLon ll, TemplateEngineDataProvider dataProvider, String buttonImage, MarkerLayer parentLayer, double time,
     34            double offset) {
    3435        super(ll, dataProvider, buttonImage, parentLayer, time, offset);
    3536        buttonRectangle = new Rectangle(0, 0, symbol.getIconWidth(), symbol.getIconHeight());
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java

    r8510 r8540  
    206206                }
    207207
    208                 String urlString = url == null ? "" : url.toString();
     208                String urlStr = url == null ? "" : url.toString();
    209209                if (url == null) {
    210210                    String symbolName = wpt.getString("symbol");
     
    213213                    }
    214214                    return new Marker(wpt.getCoor(), wpt, symbolName, parentLayer, time, offset);
    215                 } else if (urlString.endsWith(".wav")) {
     215                } else if (urlStr.endsWith(".wav")) {
    216216                    AudioMarker audioMarker = new AudioMarker(wpt.getCoor(), wpt, url, parentLayer, time, offset);
    217217                    Extensions exts = (Extensions) wpt.get(GpxConstants.META_EXTENSIONS);
     
    224224                    }
    225225                    return audioMarker;
    226                 } else if (urlString.endsWith(".png") || urlString.endsWith(".jpg") || urlString.endsWith(".jpeg") || urlString.endsWith(".gif")) {
     226                } else if (urlStr.endsWith(".png") || urlStr.endsWith(".jpg") || urlStr.endsWith(".jpeg") || urlStr.endsWith(".gif")) {
    227227                    return new ImageMarker(wpt.getCoor(), url, parentLayer, time, offset);
    228228                } else {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java

    r8512 r8540  
    231231    @Override
    232232    public String toString() {
    233         return "BoxTextElemStyle{" + super.toString() + " " + text.toStringImpl() + " box=" + box + " hAlign=" + hAlign + " vAlign=" + vAlign + '}';
     233        return "BoxTextElemStyle{" + super.toString() + " " + text.toStringImpl()
     234                + " box=" + box + " hAlign=" + hAlign + " vAlign=" + vAlign + '}';
    234235    }
    235236
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java

    r8514 r8540  
    262262
    263263        /**
    264          * Creates a color value with the specified amounts of {@code r}ed, {@code g}reen, {@code b}lue, {@code alpha} (arguments from 0.0 to 1.0)
     264         * Creates a color value with the specified amounts of {@code r}ed, {@code g}reen, {@code b}lue, {@code alpha}
     265         * (arguments from 0.0 to 1.0)
    265266         * @param r the red component
    266267         * @param g the green component
  • trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java

    r8510 r8540  
    317317            SessionId sessionId = extractOsmSession(connection);
    318318            if (sessionId == null)
    319                 throw new OsmOAuthAuthorizationException(tr("OSM website did not return a session cookie in response to ''{0}'',", url.toString()));
     319                throw new OsmOAuthAuthorizationException(
     320                        tr("OSM website did not return a session cookie in response to ''{0}'',", url.toString()));
    320321            return sessionId;
    321322        } catch (IOException e) {
     
    347348            sessionId.token = extractToken(connection);
    348349            if (sessionId.token == null)
    349                 throw new OsmOAuthAuthorizationException(tr("OSM website did not return a session cookie in response to ''{0}'',", url.toString()));
     350                throw new OsmOAuthAuthorizationException(tr("OSM website did not return a session cookie in response to ''{0}'',",
     351                        url.toString()));
    350352        } catch (IOException e) {
    351353            throw new OsmOAuthAuthorizationException(e);
     
    396398            int retCode = connection.getResponseCode();
    397399            if (retCode != HttpURLConnection.HTTP_MOVED_TEMP)
    398                 throw new OsmOAuthAuthorizationException(tr("Failed to authenticate user ''{0}'' with password ''***'' as OAuth user", userName));
     400                throw new OsmOAuthAuthorizationException(tr("Failed to authenticate user ''{0}'' with password ''***'' as OAuth user",
     401                        userName));
    399402        } catch (OsmOAuthAuthorizationException e) {
    400403            throw new OsmLoginFailedException(e.getCause());
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java

    r8510 r8540  
    159159
    160160        // drawRawGpsMaxLineLengthLocal
    161         drawRawGpsMaxLineLengthLocal.setToolTipText(tr("Maximum length (in meters) to draw lines for local files. Set to ''-1'' to draw all lines."));
     161        drawRawGpsMaxLineLengthLocal.setToolTipText(
     162                tr("Maximum length (in meters) to draw lines for local files. Set to ''-1'' to draw all lines."));
    162163        label = new JLabel(tr("Maximum length for local files (meters)"));
    163164        add(label, GBC.std().insets(40, 0, 0, 0));
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/TMSSettingsPanel.java

    r8526 r8540  
    4242    public TMSSettingsPanel() {
    4343        super(new GridBagLayout());
    44         minZoomLvl = new JSpinner(new SpinnerNumberModel(TMSLayer.PROP_MIN_ZOOM_LVL.get().intValue(), TMSLayer.MIN_ZOOM, TMSLayer.MAX_ZOOM, 1));
    45         maxZoomLvl = new JSpinner(new SpinnerNumberModel(TMSLayer.PROP_MAX_ZOOM_LVL.get().intValue(), TMSLayer.MIN_ZOOM, TMSLayer.MAX_ZOOM, 1));
    46         maxElementsOnDisk = new JSpinner(new SpinnerNumberModel(TMSCachedTileLoader.MAX_OBJECTS_ON_DISK.get().intValue(), 0, Integer.MAX_VALUE, 1));
    47         maxConcurrentDownloads = new JSpinner(new SpinnerNumberModel(TMSCachedTileLoaderJob.THREAD_LIMIT.get().intValue(), 0, Integer.MAX_VALUE, 1));
    48         maxDownloadsPerHost = new JSpinner(new SpinnerNumberModel(TMSCachedTileLoader.HOST_LIMIT.get().intValue(), 0, Integer.MAX_VALUE, 1));
     44        minZoomLvl = new JSpinner(new SpinnerNumberModel(
     45                TMSLayer.PROP_MIN_ZOOM_LVL.get().intValue(), TMSLayer.MIN_ZOOM, TMSLayer.MAX_ZOOM, 1));
     46        maxZoomLvl = new JSpinner(new SpinnerNumberModel(
     47                TMSLayer.PROP_MAX_ZOOM_LVL.get().intValue(), TMSLayer.MIN_ZOOM, TMSLayer.MAX_ZOOM, 1));
     48        maxElementsOnDisk = new JSpinner(new SpinnerNumberModel(
     49                TMSCachedTileLoader.MAX_OBJECTS_ON_DISK.get().intValue(), 0, Integer.MAX_VALUE, 1));
     50        maxConcurrentDownloads = new JSpinner(new SpinnerNumberModel(
     51                TMSCachedTileLoaderJob.THREAD_LIMIT.get().intValue(), 0, Integer.MAX_VALUE, 1));
     52        maxDownloadsPerHost = new JSpinner(new SpinnerNumberModel(
     53                TMSCachedTileLoader.HOST_LIMIT.get().intValue(), 0, Integer.MAX_VALUE, 1));
    4954
    5055        add(new JLabel(tr("Auto zoom by default: ")), GBC.std());
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java

    r8510 r8540  
    354354        Bounds b = proj.getWorldBoundsLatLon();
    355355        CoordinateFormat cf = CoordinateFormat.getDefaultFormat();
    356         bounds.setText(b.getMin().lonToString(cf)+", "+b.getMin().latToString(cf)+" : "+b.getMax().lonToString(cf)+", "+b.getMax().latToString(cf));
     356        bounds.setText(b.getMin().lonToString(cf) + ", " + b.getMin().latToString(cf) + " : " +
     357                b.getMax().lonToString(cf) + ", " + b.getMax().latToString(cf));
    357358        boolean showCode = true;
    358359        boolean showName = false;
  • trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java

    r8510 r8540  
    6161    // independent from the keyboard's labelling. But the operation system's locale
    6262    // usually matches the keyboard. This even works with my English Windows and my German keyboard.
    63     private static final String SHIFT = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.SHIFT_DOWN_MASK).getModifiers());
    64     private static final String CTRL  = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.CTRL_DOWN_MASK).getModifiers());
    65     private static final String ALT   = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.ALT_DOWN_MASK).getModifiers());
    66     private static final String META  = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.META_DOWN_MASK).getModifiers());
     63    private static final String SHIFT = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A,
     64            KeyEvent.SHIFT_DOWN_MASK).getModifiers());
     65    private static final String CTRL  = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A,
     66            KeyEvent.CTRL_DOWN_MASK).getModifiers());
     67    private static final String ALT   = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A,
     68            KeyEvent.ALT_DOWN_MASK).getModifiers());
     69    private static final String META  = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A,
     70            KeyEvent.META_DOWN_MASK).getModifiers());
    6771
    6872    // A list of keys to present the user. Sadly this really is a list of keys Java knows about,
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java

    r8510 r8540  
    336336                List<PrimitiveData> directlyAdded = Main.pasteBuffer.getDirectlyAdded();
    337337                if (directlyAdded == null || directlyAdded.isEmpty()) return;
    338                 PasteTagsAction.TagPaster tagPaster = new PasteTagsAction.TagPaster(directlyAdded, Collections.<OsmPrimitive>singletonList(relation));
     338                PasteTagsAction.TagPaster tagPaster = new PasteTagsAction.TagPaster(directlyAdded,
     339                        Collections.<OsmPrimitive>singletonList(relation));
    339340                model.updateTags(tagPaster.execute());
    340341            } else {
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java

    r8510 r8540  
    4343     * @since 6867
    4444     */
    45     public static final String PRESET_MIME_TYPES = "application/xml, text/xml, text/plain; q=0.8, application/zip, application/octet-stream; q=0.5";
     45    public static final String PRESET_MIME_TYPES =
     46            "application/xml, text/xml, text/plain; q=0.8, application/zip, application/octet-stream; q=0.5";
    4647
    4748    private TaggingPresetReader() {
     
    306307     * @throws IOException if any I/O error occurs
    307308     */
    308     static Collection<TaggingPreset> readAll(String source, boolean validate, HashSetWithLast<TaggingPreset> all) throws SAXException, IOException {
     309    static Collection<TaggingPreset> readAll(String source, boolean validate, HashSetWithLast<TaggingPreset> all)
     310            throws SAXException, IOException {
    309311        Collection<TaggingPreset> tp;
    310312        CachedFile cf = new CachedFile(source).setHttpAccept(PRESET_MIME_TYPES);
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchPrimitiveDialog.java

    r8378 r8540  
    8080        public Action() {
    8181            super(tr("Search for objects by preset"), "dialogs/search", tr("Show preset search dialog"),
    82                     Shortcut.registerShortcut("preset:search-objects", tr("Search for objects by preset"), KeyEvent.VK_F3, Shortcut.SHIFT), false);
     82                    Shortcut.registerShortcut("preset:search-objects", tr("Search for objects by preset"), KeyEvent.VK_F3, Shortcut.SHIFT),
     83                    false);
    8384            putValue("toolbar", "presets/search-objects");
    8485            Main.toolbar.register(this);
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java

    r8513 r8540  
    397397                    boolean suitable = preset.typeMatches(presetTypes);
    398398
    399                     if (!suitable && preset.types.contains(TaggingPresetType.RELATION) && preset.roles != null && !preset.roles.roles.isEmpty()) {
     399                    if (!suitable && preset.types.contains(TaggingPresetType.RELATION)
     400                            && preset.roles != null && !preset.roles.roles.isEmpty()) {
    400401                        final Predicate<Role> memberExpressionMatchesOnePrimitive = new Predicate<Role>() {
    401 
    402402                            @Override
    403403                            public boolean evaluate(Role object) {
  • trunk/src/org/openstreetmap/josm/gui/widgets/FileChooserManager.java

    r8512 r8540  
    4949    }
    5050
     51    // CHECKSTYLE.OFF: LineLength
     52
    5153    /**
    5254     * Creates a new {@code FileChooserManager}.
     
    7577                : Main.pref.get(this.lastDirProperty);
    7678    }
     79
     80    // CHECKSTYLE.ON: LineLength
    7781
    7882    /**
  • trunk/src/org/openstreetmap/josm/gui/widgets/NativeFileChooser.java

    r7937 r8540  
    107107    @Override
    108108    public void setFileSelectionMode(int selectionMode) {
     109        // CHECKSTYLE.OFF: LineLength
    109110        // TODO implement this after Oracle fixes JDK-6192906 / JDK-6699863 / JDK-6927978 / JDK-7125172:
    110111        // https://bugs.openjdk.java.net/browse/JDK-6192906 : Add more features to java.awt.FileDialog
     
    116117        // http://stackoverflow.com/questions/1224714/how-can-i-make-a-java-filedialog-accept-directories-as-its-filetype-in-os-x/1224744#1224744
    117118        // https://bugs.openjdk.java.net/browse/JDK-7161437 : [macosx] awt.FileDialog doesn't respond appropriately for mac when selecting folders
     119        // CHECKSTYLE.ON: LineLength
    118120        this.selectionMode = selectionMode;
    119121    }
     
    164166        switch (selectionMode) {
    165167        case JFileChooser.FILES_AND_DIRECTORIES:
     168            // CHECKSTYLE.OFF: LineLength
    166169            // https://bugs.openjdk.java.net/browse/JDK-7125172 : FileDialog objects don't allow directory AND files selection simultaneously
    167170            return false;
    168171        case JFileChooser.DIRECTORIES_ONLY:
    169172            // http://stackoverflow.com/questions/1224714/how-can-i-make-a-java-filedialog-accept-directories-as-its-filetype-in-os-x/1224744#1224744
     173            // CHECKSTYLE.ON: LineLength
    170174            return Main.isPlatformOsx();
    171175        case JFileChooser.FILES_ONLY:
  • trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java

    r8510 r8540  
    126126                DataSet ds2 = null;
    127127
    128                 try (InputStream in = getInputStream(getRequestForBbox(lon1, lat1, 180.0, lat2), progressMonitor.createSubTaskMonitor(9, false))) {
     128                try (InputStream in = getInputStream(getRequestForBbox(lon1, lat1, 180.0, lat2),
     129                        progressMonitor.createSubTaskMonitor(9, false))) {
    129130                    if (in == null)
    130131                        return null;
     
    132133                }
    133134
    134                 try (InputStream in = getInputStream(getRequestForBbox(-180.0, lat1, lon2, lat2), progressMonitor.createSubTaskMonitor(9, false))) {
     135                try (InputStream in = getInputStream(getRequestForBbox(-180.0, lat1, lon2, lat2),
     136                        progressMonitor.createSubTaskMonitor(9, false))) {
    135137                    if (in == null)
    136138                        return null;
     
    143145            } else {
    144146                // Simple request
    145                 try (InputStream in = getInputStream(getRequestForBbox(lon1, lat1, lon2, lat2), progressMonitor.createSubTaskMonitor(9, false))) {
     147                try (InputStream in = getInputStream(getRequestForBbox(lon1, lat1, lon2, lat2),
     148                        progressMonitor.createSubTaskMonitor(9, false))) {
    146149                    if (in == null)
    147150                        return null;
     
    161164
    162165    @Override
    163     public List<Note> parseNotes(int noteLimit, int daysClosed, ProgressMonitor progressMonitor) throws OsmTransferException, MoreNotesException {
     166    public List<Note> parseNotes(int noteLimit, int daysClosed, ProgressMonitor progressMonitor)
     167            throws OsmTransferException, MoreNotesException {
    164168        progressMonitor.beginTask("Downloading notes");
    165169        CheckParameterUtil.ensureThat(noteLimit > 0, "Requested note limit is less than 1.");
  • trunk/src/org/openstreetmap/josm/io/GpxExporter.java

    r8510 r8540  
    230230        }
    231231    }
     232
     233    // CHECKSTYLE.OFF: ParameterNumber
    232234
    233235    /**
     
    248250            final JLabel warning) {
    249251
     252        // CHECKSTYLE.ON: ParameterNumber
    250253        ActionListener authorActionListener = new ActionListener() {
    251254            @Override
  • trunk/src/org/openstreetmap/josm/io/JpgImporter.java

    r8404 r8540  
    8888    }
    8989
    90     private void addRecursiveFiles(List<File> files, Set<String> visitedDirs, List<File> sel, ProgressMonitor progressMonitor) throws IOException {
     90    private void addRecursiveFiles(List<File> files, Set<String> visitedDirs, List<File> sel, ProgressMonitor progressMonitor)
     91            throws IOException {
    9192
    9293        if (progressMonitor.isCanceled())
  • trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java

    r8510 r8540  
    513513         * @throws OsmTransferException if an error occurs while communicating with the API server
    514514         */
    515         protected FetchResult multiGetIdPackage(OsmPrimitiveType type, Set<Long> pkg, ProgressMonitor progressMonitor) throws OsmTransferException {
     515        protected FetchResult multiGetIdPackage(OsmPrimitiveType type, Set<Long> pkg, ProgressMonitor progressMonitor)
     516                throws OsmTransferException {
    516517            String request = buildRequestString(type, pkg);
    517518            FetchResult result = null;
     
    571572         * @throws OsmTransferException if an error occurs while communicating with the API server
    572573         */
    573         protected FetchResult singleGetIdPackage(OsmPrimitiveType type, Set<Long> pkg, ProgressMonitor progressMonitor) throws OsmTransferException {
     574        protected FetchResult singleGetIdPackage(OsmPrimitiveType type, Set<Long> pkg, ProgressMonitor progressMonitor)
     575                throws OsmTransferException {
    574576            FetchResult result = new FetchResult(new DataSet(), new HashSet<PrimitiveId>());
    575577            String baseUrl = OsmApi.getOsmApi().getBaseUrl();
  • trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java

    r8510 r8540  
    8181            case "relation":
    8282                if (currentModificationType == null) {
     83                    // CHECKSTYLE.OFF: LineLength
    8384                    throwException(tr("Illegal document structure. Found node, way, or relation outside of ''create'', ''modify'', or ''delete''."));
     85                    // CHECKSTYLE.ON: LineLength
    8486                }
    8587                data.put(currentPrimitive, currentModificationType);
  • trunk/src/org/openstreetmap/josm/io/OsmReader.java

    r8510 r8540  
    317317            id = Long.parseLong(value);
    318318        } catch (NumberFormatException e) {
    319             throwException(tr("Illegal value for attribute ''ref'' on member in relation {0}. Got {1}", Long.toString(r.getUniqueId()), value), e);
     319            throwException(tr("Illegal value for attribute ''ref'' on member in relation {0}. Got {1}", Long.toString(r.getUniqueId()),
     320                    value), e);
    320321        }
    321322        value = parser.getAttributeValue(null, "type");
     
    502503                if (current.isNew()) {
    503504                    // for a new primitive we just log a warning
    504                     Main.info(tr("Illegal value for attribute ''changeset'' on new object {1}. Got {0}. Resetting to 0.", v, current.getUniqueId()));
     505                    Main.info(tr("Illegal value for attribute ''changeset'' on new object {1}. Got {0}. Resetting to 0.",
     506                            v, current.getUniqueId()));
    505507                    current.setChangesetId(0);
    506508                } else {
     
    516518                if (current.isNew()) {
    517519                    // for a new primitive we just log a warning
    518                     Main.info(tr("Illegal value for attribute ''changeset'' on new object {1}. Got {0}. Resetting to 0.", v, current.getUniqueId()));
     520                    Main.info(tr("Illegal value for attribute ''changeset'' on new object {1}. Got {0}. Resetting to 0.",
     521                            v, current.getUniqueId()));
    519522                    current.setChangesetId(0);
    520523                } else {
  • trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java

    r8510 r8540  
    141141     * @since 7704
    142142     */
    143     public List<Changeset> readChangesets(Collection<Integer> ids, boolean includeDiscussion, ProgressMonitor monitor) throws OsmTransferException {
     143    public List<Changeset> readChangesets(Collection<Integer> ids, boolean includeDiscussion, ProgressMonitor monitor)
     144            throws OsmTransferException {
    144145        if (ids == null)
    145146            return Collections.emptyList();
     
    192193    public ChangesetDataSet downloadChangeset(int id, ProgressMonitor monitor) throws OsmTransferException {
    193194        if (id <= 0)
    194             throw new IllegalArgumentException(MessageFormat.format("Expected value of type integer > 0 for parameter ''{0}'', got {1}", "id", id));
     195            throw new IllegalArgumentException(
     196                    MessageFormat.format("Expected value of type integer > 0 for parameter ''{0}'', got {1}", "id", id));
    195197        if (monitor == null) {
    196198            monitor = NullProgressMonitor.INSTANCE;
  • trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java

    r8510 r8540  
    125125                    userInfo.setUnreadMessages(Integer.parseInt(v));
    126126                } catch (NumberFormatException e) {
    127                     throw new XmlParsingException(tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}.", "unread", "received", v), e);
     127                    throw new XmlParsingException(
     128                            tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}.", "unread", "received", v), e);
    128129                }
    129130            }
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java

    r8510 r8540  
    128128        this.sender = senderName;
    129129
    130         final DefaultTableModel tm = new DefaultTableModel(new String[] {tr("Assume"), tr("Key"), tr("Value"), tr("Existing values")}, tags.length) {
     130        final DefaultTableModel tm = new DefaultTableModel(new String[] {tr("Assume"), tr("Key"), tr("Value"), tr("Existing values")},
     131                tags.length) {
    131132            private final Class<?>[] types = {Boolean.class, String.class, Object.class, ExistingValues.class};
    132133            @Override
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java

    r8510 r8540  
    233233            X509Certificate cert = generateCertificate("CN=localhost, OU=JOSM, O=OpenStreetMap", pair, 1825, "SHA256withRSA",
    234234                    // see #10033#comment:20: All browsers respect "ip" in SAN, except IE which only understands DNS entries:
     235                    // CHECKSTYLE.OFF: LineLength
    235236                    // https://connect.microsoft.com/IE/feedback/details/814744/the-ie-doesnt-trust-a-san-certificate-when-connecting-to-ip-address
     237                    // CHECKSTYLE.ON: LineLength
    236238                    "dns:localhost,ip:127.0.0.1,dns:127.0.0.1,ip:::1,uri:https://127.0.0.1:"+HTTPS_PORT+",uri:https://::1:"+HTTPS_PORT);
    237239
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java

    r8510 r8540  
    6464    public String[] getUsageExamples() {
    6565        return new String[] {
     66            // CHECKSTYLE.OFF: LineLength
    6667            "/add_way?way=53.2,13.3;53.3,13.3;53.3,13.2",
    6768            "/add_way?&addtags=building=yes&way=45.437213,-2.810792;45.437988,-2.455983;45.224080,-2.455036;45.223302,-2.809845;45.437213,-2.810792"
     69            // CHECKSTYLE.ON: LineLength
    6870        };
    6971    }
  • trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java

    r8513 r8540  
    2525
    2626    @Override
    27     public Layer load(Element elem, SessionReader.ImportSupport support, ProgressMonitor progressMonitor) throws IOException, IllegalDataException {
     27    public Layer load(Element elem, SessionReader.ImportSupport support, ProgressMonitor progressMonitor)
     28            throws IOException, IllegalDataException {
    2829        String version = elem.getAttribute("version");
    2930        if (!"0.1".equals(version)) {
  • trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionImporter.java

    r7937 r8540  
    2323
    2424    @Override
    25     public Layer load(Element elem, SessionReader.ImportSupport support, ProgressMonitor progressMonitor) throws IOException, IllegalDataException {
     25    public Layer load(Element elem, SessionReader.ImportSupport support, ProgressMonitor progressMonitor)
     26            throws IOException, IllegalDataException {
    2627        String version = elem.getAttribute("version");
    2728        if (!"0.1".equals(version)) {
  • trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionImporter.java

    r7326 r8540  
    3939            OsmImporter importer = new OsmImporter();
    4040            try (InputStream in = support.getInputStream(fileStr)) {
    41                 OsmImporter.OsmImporterData importData = importer.loadLayer(in, support.getFile(fileStr), support.getLayerName(), progressMonitor);
     41                OsmImporter.OsmImporterData importData = importer.loadLayer(in, support.getFile(fileStr), support.getLayerName(),
     42                        progressMonitor);
    4243
    4344                support.addPostLayersTask(importData.getPostLayerTask());
  • trunk/src/org/openstreetmap/josm/io/session/SessionReader.java

    r8510 r8540  
    308308            if (centerEl != null && centerEl.hasAttribute("lat") && centerEl.hasAttribute("lon")) {
    309309                try {
    310                     LatLon centerLL = new LatLon(Double.parseDouble(centerEl.getAttribute("lat")), Double.parseDouble(centerEl.getAttribute("lon")));
     310                    LatLon centerLL = new LatLon(Double.parseDouble(centerEl.getAttribute("lat")),
     311                            Double.parseDouble(centerEl.getAttribute("lon")));
    311312                    center = Projections.project(centerLL);
    312313                } catch (NumberFormatException ex) {
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r8513 r8540  
    14821482            gc.fill = GridBagConstraints.HORIZONTAL;
    14831483            gc.weighty = 0.0;
    1484             add(cbDontShowAgain = new JCheckBox(tr("Do not ask again and remember my decision (go to Preferences->Plugins to change it later)")), gc);
     1484            add(cbDontShowAgain = new JCheckBox(
     1485                    tr("Do not ask again and remember my decision (go to Preferences->Plugins to change it later)")), gc);
    14851486            cbDontShowAgain.setFont(cbDontShowAgain.getFont().deriveFont(Font.PLAIN));
    14861487        }
  • trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java

    r8510 r8540  
    191191    }
    192192
    193     private void handleIOException(final ProgressMonitor monitor, IOException e, final String title, final String firstMessage, boolean displayMsg) {
     193    private void handleIOException(final ProgressMonitor monitor, IOException e, final String title, final String firstMessage,
     194            boolean displayMsg) {
    194195        StringBuilder sb = new StringBuilder();
    195196        try (InputStream errStream = connection.getErrorStream()) {
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r8510 r8540  
    857857                    // See #10479: for PNG files, always enforce transparency to be sure tNRS chunk is used even not in paletted mode
    858858                    // This can be removed if someday Oracle fixes https://bugs.openjdk.java.net/browse/JDK-6788458
     859                    // CHECKSTYLE.OFF: LineLength
    859860                    // hg.openjdk.java.net/jdk7u/jdk7u/jdk/file/828c4fedd29f/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java#l656
     861                    // CHECKSTYLE.ON: LineLength
    860862                    Image img = read(new ByteArrayInputStream(bytes), false, true);
    861863                    return img == null ? null : new ImageResource(img);
     
    15411543    }
    15421544
     1545    // CHECKSTYLE.OFF: LineLength
     1546
    15431547    /**
    15441548     * Returns the {@code TransparentColor} defined in image reader metadata.
     
    15511555     */
    15521556    public static Color getTransparentColor(ColorModel model, ImageReader reader) throws IOException {
     1557        // CHECKSTYLE.ON: LineLength
    15531558        try {
    15541559            IIOMetadata metadata = reader.getImageMetadata(0);
  • trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java

    r8291 r8540  
    5151                    Main.platform.openUrl(uri.toString());
    5252                } else {
    53                     // This is not the case with some Linux environments (see below), and not sure about Mac OS X, so we need to handle API failure
     53                    // This is not the case with some Linux environments (see below),
     54                    // and not sure about Mac OS X, so we need to handle API failure
    5455                    try {
    5556                        Desktop.getDesktop().browse(uri);
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r8518 r8540  
    261261        if ("Linux".equalsIgnoreCase(osName)) {
    262262            try {
    263                 // Try lsb_release (only available on LSB-compliant Linux systems, see https://www.linuxbase.org/lsb-cert/productdir.php?by_prod )
     263                // Try lsb_release (only available on LSB-compliant Linux systems,
     264                // see https://www.linuxbase.org/lsb-cert/productdir.php?by_prod )
    264265                Process p = Runtime.getRuntime().exec("lsb_release -ds");
    265266                try (BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream(), StandardCharsets.UTF_8))) {
  • trunk/src/org/openstreetmap/josm/tools/template_engine/ParseError.java

    r8308 r8540  
    1717
    1818    public ParseError(Token unexpectedToken, TokenType expected) {
    19         super(tr("Unexpected token on position {0}. Expected {1}, found {2}", unexpectedToken.getPosition(), expected, unexpectedToken.getType()));
     19        super(tr("Unexpected token on position {0}. Expected {1}, found {2}",
     20                unexpectedToken.getPosition(), expected, unexpectedToken.getType()));
    2021        this.unexpectedToken = unexpectedToken;
    2122    }
Note: See TracChangeset for help on using the changeset viewer.