Changeset 10378 in josm


Ignore:
Timestamp:
2016-06-15T10:30:37+02:00 (3 years ago)
Author:
Don-vip
Message:

Checkstyle 6.19: enable SingleSpaceSeparator and fix violations

Location:
trunk
Files:
264 edited

Legend:

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

    r9917 r10378  
    6262     */
    6363    public static boolean confirmLaunchMultiple(int numBrowsers) {
    64         String msg  = /* for correct i18n of plural forms - see #9110 */ trn(
     64        String msg = /* for correct i18n of plural forms - see #9110 */ trn(
    6565                "You are about to launch {0} browser window.<br>"
    6666                        + "This may both clutter your screen with browser windows<br>"
  • trunk/src/org/openstreetmap/josm/actions/AbstractSelectAction.java

    r10369 r10378  
    1919    public AbstractSelectAction() {
    2020        putValue(NAME, tr("Select"));
    21         putValue(SHORT_DESCRIPTION,  tr("Set the selected elements on the map to the selected items in the list above."));
     21        putValue(SHORT_DESCRIPTION, tr("Set the selected elements on the map to the selected items in the list above."));
    2222        new ImageProvider("dialogs", "select").getResource().attachImageIcon(this, true);
    2323    }
  • trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java

    r10308 r10378  
    271271                    delta = pcLast.angle - pcFirst.angle;
    272272                    if (delta < 0) // Assume each PolarCoor.angle is in range ]-pi; pi]
    273                         delta +=  2*Math.PI;
     273                        delta += 2*Math.PI;
    274274                    delta /= j - i;
    275275                }
  • trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java

    r10347 r10378  
    336336            return lines.get(0).projectionCommand(node);
    337337        else if (lines.size() == 2)
    338             return lines.get(0).intersectionCommand(node,  lines.get(1));
     338            return lines.get(0).intersectionCommand(node, lines.get(1));
    339339        throw new InvalidSelection();
    340340    }
  • trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java

    r10250 r10378  
    569569                return null;
    570570            Stack<NodePair> path = new Stack<>();
    571             Stack<NodePair> nextPairs  = new Stack<>();
     571            Stack<NodePair> nextPairs = new Stack<>();
    572572            nextPairs.addAll(getOutboundPairs(startNode));
    573573            while (!nextPairs.isEmpty()) {
  • trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java

    r10043 r10378  
    166166        if (nodes.size() == 2) {
    167167            // diameter: two single nodes needed or a way with two nodes
    168             Node   n1 = nodes.get(0);
     168            Node n1 = nodes.get(0);
    169169            double x1 = n1.getEastNorth().east();
    170170            double y1 = n1.getEastNorth().north();
    171             Node   n2 = nodes.get(1);
     171            Node n2 = nodes.get(1);
    172172            double x2 = n2.getEastNorth().east();
    173173            double y2 = n2.getEastNorth().north();
  • trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java

    r10010 r10378  
    7070        super(getName(update), /* ICON */ "multipoly_create", getName(update),
    7171                /* atleast three lines for each shortcut or the server extractor fails */
    72                 update  ? Shortcut.registerShortcut("tools:multipoly_update",
     72                update ? Shortcut.registerShortcut("tools:multipoly_update",
    7373                            tr("Tool: {0}", getName(true)),
    7474                            KeyEvent.VK_B, Shortcut.CTRL_SHIFT)
    75                         : Shortcut.registerShortcut("tools:multipoly_create",
     75                       : Shortcut.registerShortcut("tools:multipoly_create",
    7676                            tr("Tool: {0}", getName(false)),
    7777                            KeyEvent.VK_B, Shortcut.CTRL),
  • trunk/src/org/openstreetmap/josm/actions/HistoryInfoWebAction.java

    r9136 r10378  
    3131
    3232    @Override
    33     protected  String createInfoUrl(Object infoObject) {
     33    protected String createInfoUrl(Object infoObject) {
    3434        if (infoObject instanceof OsmPrimitive) {
    3535            OsmPrimitive primitive = (OsmPrimitive) infoObject;
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r10308 r10378  
    291291         * @return The next way.
    292292         */
    293         public  WayInPolygon walk() {
     293        public WayInPolygon walk() {
    294294            Node headNode = getHeadNode();
    295295            Node prevNode = getPrevNode();
     
    12171217     * @throws UserCancelException if user cancels the operation
    12181218     */
    1219     private Multipolygon  joinPolygon(AssembledMultipolygon polygon) throws UserCancelException {
     1219    private Multipolygon joinPolygon(AssembledMultipolygon polygon) throws UserCancelException {
    12201220        Multipolygon result = new Multipolygon(joinWays(polygon.outerWay.ways));
    12211221
     
    14401440
    14411441                cmds.add(new ChangeCommand(r, newRel));
    1442                 RelationRole saverel =  new RelationRole(r, rm.getRole());
     1442                RelationRole saverel = new RelationRole(r, rm.getRole());
    14431443                if (!result.contains(saverel)) {
    14441444                    result.add(saverel);
  • trunk/src/org/openstreetmap/josm/actions/MoveAction.java

    r9067 r10378  
    3434    private static String calltosupermustbefirststatementinconstructortext(Direction dir) {
    3535        String directiontext;
    36         if        (dir == Direction.UP)  {
     36        if (dir == Direction.UP) {
    3737            directiontext = tr("up");
    38         } else if (dir == Direction.DOWN)  {
     38        } else if (dir == Direction.DOWN) {
    3939            directiontext = tr("down");
    40         } else if (dir == Direction.LEFT)  {
     40        } else if (dir == Direction.LEFT) {
    4141            directiontext = tr("left");
    4242        } else {
     
    4949    private static Shortcut calltosupermustbefirststatementinconstructor(Direction dir) {
    5050        Shortcut sc;
    51         if        (dir == Direction.UP)   {
    52             sc = Shortcut.registerShortcut("core:moveup",    tr("Move objects {0}", tr("up")), KeyEvent.VK_UP,    Shortcut.SHIFT);
    53         } else if (dir == Direction.DOWN)  {
    54             sc = Shortcut.registerShortcut("core:movedown",  tr("Move objects {0}", tr("down")), KeyEvent.VK_DOWN,  Shortcut.SHIFT);
    55         } else if (dir == Direction.LEFT)  {
    56             sc = Shortcut.registerShortcut("core:moveleft",  tr("Move objects {0}", tr("left")), KeyEvent.VK_LEFT,  Shortcut.SHIFT);
     51        // CHECKSTYLE.OFF: SingleSpaceSeparator
     52        if (dir == Direction.UP) {
     53            sc = Shortcut.registerShortcut("core:moveup",    tr("Move objects {0}", tr("up")),    KeyEvent.VK_UP,    Shortcut.SHIFT);
     54        } else if (dir == Direction.DOWN) {
     55            sc = Shortcut.registerShortcut("core:movedown",  tr("Move objects {0}", tr("down")),  KeyEvent.VK_DOWN,  Shortcut.SHIFT);
     56        } else if (dir == Direction.LEFT) {
     57            sc = Shortcut.registerShortcut("core:moveleft",  tr("Move objects {0}", tr("left")),  KeyEvent.VK_LEFT,  Shortcut.SHIFT);
    5758        } else { //dir == Direction.RIGHT
    5859            sc = Shortcut.registerShortcut("core:moveright", tr("Move objects {0}", tr("right")), KeyEvent.VK_RIGHT, Shortcut.SHIFT);
    5960        }
     61        // CHECKSTYLE.ON: SingleSpaceSeparator
    6062        return sc;
    6163    }
     
    7173        myDirection = dir;
    7274        putValue("help", ht("/Action/Move"));
    73         if        (dir == Direction.UP)  {
     75        if (dir == Direction.UP) {
    7476            putValue("toolbar", "action/move/up");
    75         } else if (dir == Direction.DOWN)  {
     77        } else if (dir == Direction.DOWN) {
    7678            putValue("toolbar", "action/move/down");
    77         } else if (dir == Direction.LEFT)  {
     79        } else if (dir == Direction.LEFT) {
    7880            putValue("toolbar", "action/move/left");
    7981        } else { //dir == Direction.RIGHT
  • trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java

    r10250 r10378  
    191191        } else if (wayDataList.isEmpty()) {
    192192            throw new InvalidUserInputException("usage");
    193         } else  {
     193        } else {
    194194            if (nodeList.size() == 2 || nodeList.isEmpty()) {
    195195                OrthogonalizeAction.rememberMovements.clear();
     
    401401            EastNorth tmp = new EastNorth(nX.get(n), nY.get(n));
    402402            tmp = EN.rotateCC(pivot, tmp, headingAll);
    403             final double dx = tmp.east()  - n.getEastNorth().east();
     403            final double dx = tmp.east() - n.getEastNorth().east();
    404404            final double dy = tmp.north() - n.getEastNorth().north();
    405405            if (headingNodes.contains(n)) { // The heading nodes should not have changed
     
    467467            for (int i = 0; i < nSeg; ++i) {
    468468                EastNorth segment = EN.diff(en[i+1], en[i]);
    469                 if      (segDirections[i] == Direction.RIGHT) {
     469                if (segDirections[i] == Direction.RIGHT) {
    470470                    h = EN.sum(h, segment);
    471471                } else if (segDirections[i] == Direction.UP) {
     
    544544            double x = en.east() - pivot.east();
    545545            double y = en.north() - pivot.north();
    546             double nx =  cosPhi * x - sinPhi * y + pivot.east();
    547             double ny =  sinPhi * x + cosPhi * y + pivot.north();
     546            double nx = cosPhi * x - sinPhi * y + pivot.east();
     547            double ny = sinPhi * x + cosPhi * y + pivot.north();
    548548            return new EastNorth(nx, ny);
    549549        }
     
    558558
    559559        public static double polar(EastNorth en1, EastNorth en2) {
    560             return Math.atan2(en2.north() - en1.north(), en2.east() -  en1.east());
     560            return Math.atan2(en2.north() - en1.north(), en2.east() - en1.east());
    561561        }
    562562    }
     
    572572    private static int angleToDirectionChange(double a, double deltaMax) throws RejectedAngleException {
    573573        a = standard_angle_mPI_to_PI(a);
    574         double d0   = Math.abs(a);
    575         double d90  = Math.abs(a - Math.PI / 2);
     574        double d0 = Math.abs(a);
     575        double d90 = Math.abs(a - Math.PI / 2);
    576576        double dm90 = Math.abs(a + Math.PI / 2);
    577577        int dirChange;
    578578        if (d0 < deltaMax) {
    579             dirChange =  0;
     579            dirChange = 0;
    580580        } else if (d90 < deltaMax) {
    581             dirChange =  1;
     581            dirChange = 1;
    582582        } else if (dm90 < deltaMax) {
    583583            dirChange = -1;
  • trunk/src/org/openstreetmap/josm/actions/PasteAction.java

    r10216 r10378  
    113113        }
    114114
    115         double offsetEast  = mPosition.east() - (maxEast + minEast)/2.0;
     115        double offsetEast = mPosition.east() - (maxEast + minEast)/2.0;
    116116        double offsetNorth = mPosition.north() - (maxNorth + minNorth)/2.0;
    117117
  • trunk/src/org/openstreetmap/josm/actions/PurgeAction.java

    r9233 r10378  
    6464    public PurgeAction() {
    6565        /* translator note: other expressions for "purge" might be "forget", "clean", "obliterate", "prune" */
    66         super(tr("Purge..."), "purge",  tr("Forget objects but do not delete them on server when uploading."),
     66        super(tr("Purge..."), "purge", tr("Forget objects but do not delete them on server when uploading."),
    6767                Shortcut.registerShortcut("system:purge", tr("Edit: {0}", tr("Purge")),
    6868                KeyEvent.VK_P, Shortcut.CTRL_SHIFT),
     
    272272            JButton addToSelection = new JButton(new AbstractAction() {
    273273                {
    274                     putValue(SHORT_DESCRIPTION,   tr("Add to selection"));
     274                    putValue(SHORT_DESCRIPTION, tr("Add to selection"));
    275275                    putValue(SMALL_ICON, ImageProvider.get("dialogs", "select"));
    276276                }
  • trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java

    r9972 r10378  
    137137     */
    138138    protected boolean isRequiredNode(Way way, Node node) {
    139         boolean isRequired =  Collections.frequency(way.getNodes(), node) > 1;
     139        boolean isRequired = Collections.frequency(way.getNodes(), node) > 1;
    140140        if (!isRequired) {
    141141            List<OsmPrimitive> parents = new LinkedList<>();
  • trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java

    r10254 r10378  
    139139            if (tmpNodes.isEmpty()) {
    140140                if (selection.size() > 1) {
    141                     errMsg =  tr("None of these nodes are glued to anything else.");
     141                    errMsg = tr("None of these nodes are glued to anything else.");
    142142                } else {
    143143                    errMsg = tr("None of this way''s nodes are glued to anything else.");
  • trunk/src/org/openstreetmap/josm/actions/ValidateAction.java

    r9067 r10378  
    126126                Collection<OsmPrimitive> formerValidatedPrimitives) {
    127127            super(tr("Validating"), false /*don't ignore exceptions */);
    128             this.validatedPrimitives  = validatedPrimitives;
     128            this.validatedPrimitives = validatedPrimitives;
    129129            this.formerValidatedPrimitives = formerValidatedPrimitives;
    130130            this.tests = tests;
     
    142142            // update GUI on Swing EDT
    143143            //
    144             GuiHelper.runInEDT(new Runnable()  {
     144            GuiHelper.runInEDT(new Runnable() {
    145145                @Override
    146146                public void run() {
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/ChangesetQueryTask.java

    r10250 r10378  
    7171                // thrown if user cancel the authentication dialog
    7272                setCanceled(true);
    73             }  catch (OsmTransferException e) {
     73            } catch (OsmTransferException e) {
    7474                if (isCanceled())
    7575                    return;
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmCompressedTask.java

    r10001 r10378  
    1919public class DownloadOsmCompressedTask extends DownloadOsmTask {
    2020
    21     private static final String PATTERN_COMPRESS =  "https?://.*/.*\\.osm.(gz|bz2?|zip)";
     21    private static final String PATTERN_COMPRESS = "https?://.*/.*\\.osm.(gz|bz2?|zip)";
    2222
    2323    @Override
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java

    r10371 r10378  
    3737public class DownloadOsmTask extends AbstractDownloadTask<DataSet> {
    3838
     39    // CHECKSTYLE.OFF: SingleSpaceSeparator
    3940    protected static final String PATTERN_OSM_API_URL           = "https?://.*/api/0.6/(map|nodes?|ways?|relations?|\\*).*";
    4041    protected static final String PATTERN_OVERPASS_API_URL      = "https?://.*/interpreter\\?data=.*";
    4142    protected static final String PATTERN_OVERPASS_API_XAPI_URL = "https?://.*/xapi(\\?.*\\[@meta\\]|_meta\\?).*";
    4243    protected static final String PATTERN_EXTERNAL_OSM_FILE     = "https?://.*/.*\\.osm";
     44    // CHECKSTYLE.ON: SingleSpaceSeparator
    4345
    4446    protected Bounds currentBounds;
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadSessionTask.java

    r9171 r10378  
    2121public class DownloadSessionTask extends AbstractDownloadTask<Object> {
    2222
    23     private static final String PATTERN_SESSION =  "https?://.*/.*\\.jo(s|z)";
     23    private static final String PATTERN_SESSION = "https?://.*/.*\\.jo(s|z)";
    2424
    2525    private Loader loader;
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r10308 r10378  
    691691            int posn0 = selectedWay.getNodes().indexOf(currentNode);
    692692            if (posn0 != -1 && // n0 is part of way
    693                     (posn0 >= 1                             && targetNode.equals(selectedWay.getNode(posn0-1))) || // previous node
    694                     (posn0 < selectedWay.getNodesCount()-1) && targetNode.equals(selectedWay.getNode(posn0+1))) {  // next node
     693                  // CHECKSTYLE.OFF: SingleSpaceSeparator
     694                  (posn0 >= 1                             && targetNode.equals(selectedWay.getNode(posn0-1))) || // previous node
     695                  (posn0 < selectedWay.getNodesCount()-1) && targetNode.equals(selectedWay.getNode(posn0+1))) {  // next node
     696                  // CHECKSTYLE.ON: SingleSpaceSeparator
    695697                getCurrentDataSet().setSelected(targetNode);
    696698                lastUsedNode = targetNode;
     
    845847     * uses also lastUsedNode field
    846848     */
    847     private void determineCurrentBaseNodeAndPreviousNode(Collection<OsmPrimitive>  selection) {
     849    private void determineCurrentBaseNodeAndPreviousNode(Collection<OsmPrimitive> selection) {
    848850        Node selectedNode = null;
    849851        Way selectedWay = null;
     
    12831285                        n = (Node) p; // found one node
    12841286                        wayIsFinished = false;
    1285                     }  else {
     1287                    } else {
    12861288                        // if more than 1 node were affected by previous command,
    12871289                        // we have no way to continue, so we forget about found node
     
    16591661                    }
    16601662                    if (enOpt != null) {
    1661                         projectionSource =  enOpt;
     1663                        projectionSource = enOpt;
    16621664                    }
    16631665                }
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java

    r10308 r10378  
    822822                    initialN2en.getX() - en.getX(),
    823823                    initialN2en.getY() - en.getY()
    824                     ), initialN2en,  en, false));
     824                    ), initialN2en, en, false));
    825825        }
    826826    }
     
    835835        possibleMoveDirections = new ArrayList<>();
    836836        for (OsmPrimitive p: selectedNode.getReferrers()) {
    837             if (p instanceof Way  && p.isUsable()) {
     837            if (p instanceof Way && p.isUsable()) {
    838838                for (Node neighbor: ((Way) p).getNeighbours(selectedNode)) {
    839839                    EastNorth en = neighbor.getEastNorth();
     
    905905            initialN2en.getX() - nextNodeEn.getX(),
    906906            initialN2en.getY() - nextNodeEn.getY()
    907             ), initialN2en,  nextNodeEn, false);
     907            ), initialN2en, nextNodeEn, false);
    908908    }
    909909
     
    985985    private int getNextNodeIndex(int index) {
    986986        int count = selectedSegment.way.getNodesCount();
    987         if (index <  count - 1)
     987        if (index < count - 1)
    988988            return index + 1;
    989989        else if (selectedSegment.way.isClosed())
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ModifiersSpec.java

    r9970 r10378  
    2525        char c = str.charAt(2);
    2626        // @formatter:off
     27        // CHECKSTYLE.OFF: SingleSpaceSeparator
    2728        alt   = a == '?' ? UNKNOWN : (a == 'A' ? ON : OFF);
    2829        shift = s == '?' ? UNKNOWN : (s == 'S' ? ON : OFF);
    2930        ctrl  = c == '?' ? UNKNOWN : (c == 'C' ? ON : OFF);
     31        // CHECKSTYLE.ON: SingleSpaceSeparator
    3032        // @formatter:on
    3133    }
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java

    r10220 r10378  
    205205    private void updateModeLocalPreferences() {
    206206        // @formatter:off
     207        // CHECKSTYLE.OFF: SingleSpaceSeparator
    207208        snapThreshold        = Main.pref.getDouble(prefKey("snap-threshold-percent"), 0.70);
    208209        snapDefault          = Main.pref.getBoolean(prefKey("snap-default"),      true);
     
    219220        toggleSelectedModifierCombo = new ModifiersSpec(getStringPref("toggle-selection-modifier-combo", "asC"));
    220221        setSelectedModifierCombo    = new ModifiersSpec(getStringPref("set-selection-modifier-combo",    "asc"));
     222        // CHECKSTYLE.ON: SingleSpaceSeparator
    221223        // @formatter:on
    222224    }
  • trunk/src/org/openstreetmap/josm/actions/relation/EditRelationAction.java

    r9273 r10378  
    2424 * @since 5793
    2525 */
    26 public class EditRelationAction extends AbstractRelationAction  {
     26public class EditRelationAction extends AbstractRelationAction {
    2727
    2828    /**
  • trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java

    r10308 r10378  
    6868    private final boolean caseSensitive;
    6969    private final boolean regexSearch;
    70     private static String  rxErrorMsg = marktr("The regex \"{0}\" had a parse error at offset {1}, full error:\n\n{2}");
    71     private static String  rxErrorMsgNoPos = marktr("The regex \"{0}\" had a parse error, full error:\n\n{1}");
     70    private static String rxErrorMsg = marktr("The regex \"{0}\" had a parse error at offset {1}, full error:\n\n{2}");
     71    private static String rxErrorMsgNoPos = marktr("The regex \"{0}\" had a parse error, full error:\n\n{1}");
    7272    private final PushbackTokenizer tokenizer;
    7373    private static Map<String, SimpleMatchFactory> simpleMatchFactoryMap = new HashMap<>();
  • trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java

    r9067 r10378  
    3636     */
    3737    public FixDataHook() {
     38        // CHECKSTYLE.OFF: SingleSpaceSeparator
    3839        deprecated.add(new FixDataSpace());
    3940        deprecated.add(new FixDataKey("color",            "colour"));
     
    4445        deprecated.add(new FixDataTag("oneway",  "1",     "oneway",  "yes"));
    4546        deprecated.add(new FixDataTag("highway", "stile", "barrier", "stile"));
     47        // CHECKSTYLE.ON: SingleSpaceSeparator
    4648        deprecated.add(new FixData() {
    4749            @Override
  • trunk/src/org/openstreetmap/josm/command/MoveCommand.java

    r10248 r10378  
    107107    public MoveCommand(Collection<OsmPrimitive> objects, EastNorth start, EastNorth end) {
    108108        this(objects, end.getX()-start.getX(), end.getY()-start.getY());
    109         startEN =  start;
     109        startEN = start;
    110110    }
    111111
     
    118118    public MoveCommand(OsmPrimitive p, EastNorth start, EastNorth end) {
    119119        this(Collections.singleton(p), end.getX()-start.getX(), end.getY()-start.getY());
    120         startEN =  start;
     120        startEN = start;
    121121    }
    122122
  • trunk/src/org/openstreetmap/josm/command/PurgeCommand.java

    r9989 r10378  
    231231        List<Relation> outR = new ArrayList<>(inR.size());
    232232        while (!childlessR.isEmpty()) {
    233             // Identify one childless Relation and
    234             // let it virtually die. This makes other
    235             // relations childless.
    236             Iterator<Relation> it  = childlessR.iterator();
     233            // Identify one childless Relation and let it virtually die. This makes other relations childless.
     234            Iterator<Relation> it = childlessR.iterator();
    237235            Relation next = it.next();
    238236            it.remove();
  • trunk/src/org/openstreetmap/josm/command/RotateCommand.java

    r9371 r10378  
    8181            double x = oldEastNorth.east() - pivot.east();
    8282            double y = oldEastNorth.north() - pivot.north();
     83            // CHECKSTYLE.OFF: SingleSpaceSeparator
    8384            double nx =  cosPhi * x + sinPhi * y + pivot.east();
    8485            double ny = -sinPhi * x + cosPhi * y + pivot.north();
     86            // CHECKSTYLE.ON: SingleSpaceSeparator
    8587            n.setEastNorth(new EastNorth(nx, ny));
    8688        }
  • trunk/src/org/openstreetmap/josm/command/ScaleCommand.java

    r9371 r10378  
    4444        // releases the button and presses it again with the same modifiers.
    4545        // The very first point of this operation is stored here.
    46         startEN   = currentEN;
     46        startEN = currentEN;
    4747
    4848        handleEvent(currentEN);
  • trunk/src/org/openstreetmap/josm/command/conflict/ConflictAddCommand.java

    r10364 r10378  
    3232    public ConflictAddCommand(OsmDataLayer layer, Conflict<? extends OsmPrimitive> conflict) {
    3333        super(layer);
    34         this.conflict  = conflict;
     34        this.conflict = conflict;
    3535    }
    3636
  • trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java

    r10216 r10378  
    344344    private static boolean busy;
    345345
    346     public static void pluginOperation(String install, String uninstall, String delete)  {
     346    public static void pluginOperation(String install, String uninstall, String delete) {
    347347        final List<String> installList = new ArrayList<>();
    348348        final List<String> removeList = new ArrayList<>();
     
    601601                   tmpPref.getAllSettings().size(), tmpPref.getAllSettings().keySet().toString());
    602602                PreferencesUtils.appendPreferences(tmpPref, mainPrefs);
    603             }  else if ("delete-values".equals(oper)) {
     603            } else if ("delete-values".equals(oper)) {
    604604                PreferencesUtils.deletePreferenceValues(tmpPref, mainPrefs);
    605605            }
     
    734734                    mr.appendReplacement(sb, result);
    735735                } catch (ScriptException ex) {
    736                     log("Error: Can not evaluate expression %s : %s",  mr.group(1), ex.getMessage());
     736                    log("Error: Can not evaluate expression %s : %s", mr.group(1), ex.getMessage());
    737737                }
    738738            }
     
    916916    }
    917917
    918     private static Collection<String> getCollection(Preferences mainpref, String key, boolean warnUnknownDefault)  {
     918    private static Collection<String> getCollection(Preferences mainpref, String key, boolean warnUnknownDefault) {
    919919        ListSetting existing = Utils.cast(mainpref.settingsMap.get(key), ListSetting.class);
    920920        ListSetting defaults = Utils.cast(mainpref.defaultsMap.get(key), ListSetting.class);
     
    929929    }
    930930
    931     private static Collection<Collection<String>> getArray(Preferences mainpref, String key, boolean warnUnknownDefault)  {
     931    private static Collection<Collection<String>> getArray(Preferences mainpref, String key, boolean warnUnknownDefault) {
    932932        ListListSetting existing = Utils.cast(mainpref.settingsMap.get(key), ListListSetting.class);
    933933        ListListSetting defaults = Utils.cast(mainpref.defaultsMap.get(key), ListListSetting.class);
     
    943943    }
    944944
    945     private static List<Map<String, String>> getListOfStructs(Preferences mainpref, String key, boolean warnUnknownDefault)  {
     945    private static List<Map<String, String>> getListOfStructs(Preferences mainpref, String key, boolean warnUnknownDefault) {
    946946        MapListSetting existing = Utils.cast(mainpref.settingsMap.get(key), MapListSetting.class);
    947947        MapListSetting defaults = Utils.cast(mainpref.settingsMap.get(key), MapListSetting.class);
     
    10311031
    10321032        @SuppressWarnings("unchecked")
    1033         Map<String, String> stringMap =  (Map<String, String>) engine.get("stringMap");
     1033        Map<String, String> stringMap = (Map<String, String>) engine.get("stringMap");
    10341034        @SuppressWarnings("unchecked")
    10351035        Map<String, List<String>> listMap = (SortedMap<String, List<String>>) engine.get("listMap");
     
    10731073    public static void loadPrefsToJS(ScriptEngine engine, Preferences tmpPref, String whereToPutInJS, boolean includeDefaults)
    10741074            throws ScriptException {
    1075         Map<String, String> stringMap =  new TreeMap<>();
     1075        Map<String, String> stringMap = new TreeMap<>();
    10761076        Map<String, List<String>> listMap = new TreeMap<>();
    10771077        Map<String, List<List<String>>> listlistMap = new TreeMap<>();
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r10322 r10378  
    12791279                    continue;
    12801280                }
    1281             } else  if (f.getType() == String.class) {
     1281            } else if (f.getType() == String.class) {
    12821282                value = key_value.getValue();
    12831283            } else if (f.getType().isAssignableFrom(Map.class)) {
  • trunk/src/org/openstreetmap/josm/data/Version.java

    r10300 r10378  
    8585        isLocalBuild = false;
    8686        value = properties.getProperty("Is-Local-Build");
    87         if (value != null && "true".equalsIgnoreCase(value.trim()))  {
     87        if (value != null && "true".equalsIgnoreCase(value.trim())) {
    8888            isLocalBuild = true;
    8989        }
     
    9393        buildName = null;
    9494        value = properties.getProperty("Build-Name");
    95         if (value != null && !value.trim().isEmpty())  {
     95        if (value != null && !value.trim().isEmpty()) {
    9696            buildName = value.trim();
    9797        }
     
    130130     */
    131131    public String getVersionString() {
    132         return  version == 0 ? tr("UNKNOWN") : Integer.toString(version);
     132        return version == 0 ? tr("UNKNOWN") : Integer.toString(version);
    133133    }
    134134
  • trunk/src/org/openstreetmap/josm/data/cache/CacheEntryAttributes.java

    r9070 r10378  
    9292        String val = attrs.get(key);
    9393        if (val == null) {
    94             attrs.put(key,  "0");
     94            attrs.put(key, "0");
    9595            return 0;
    9696        }
  • trunk/src/org/openstreetmap/josm/data/cache/HostLimitQueue.java

    r9004 r10378  
    100100    }
    101101
    102     private  Semaphore getSemaphore(JCSCachedTileLoaderJob<?, ?> job) {
     102    private Semaphore getSemaphore(JCSCachedTileLoaderJob<?, ?> job) {
    103103        String host;
    104104        try {
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java

    r10323 r10378  
    4242
    4343    private static volatile CompositeCacheManager cacheManager;
    44     private static long maxObjectTTL        = -1;
     44    private static long maxObjectTTL = -1;
    4545    private static final String PREFERENCE_PREFIX = "jcs.cache";
    4646    private static BooleanProperty USE_BLOCK_CACHE = new BooleanProperty(PREFERENCE_PREFIX + ".use_block_cache", true);
     
    5353     * default objects to be held in memory by JCS caches (per region)
    5454     */
    55     public static final IntegerProperty DEFAULT_MAX_OBJECTS_IN_MEMORY  = new IntegerProperty(PREFERENCE_PREFIX + ".max_objects_in_memory", 1000);
     55    public static final IntegerProperty DEFAULT_MAX_OBJECTS_IN_MEMORY = new IntegerProperty(PREFERENCE_PREFIX + ".max_objects_in_memory", 1000);
    5656
    5757    private JCSCacheManager() {
     
    114114        // these are default common to all cache regions
    115115        // use of auxiliary cache and sizing of the caches is done with giving proper geCache(...) params
     116        // CHECKSTYLE.OFF: SingleSpaceSeparator
    116117        props.setProperty("jcs.default.cacheattributes",                      CompositeCacheAttributes.class.getCanonicalName());
    117118        props.setProperty("jcs.default.cacheattributes.MaxObjects",           DEFAULT_MAX_OBJECTS_IN_MEMORY.get().toString());
     
    123124        props.setProperty("jcs.default.elementattributes.IdleTime",           Long.toString(maxObjectTTL));
    124125        props.setProperty("jcs.default.elementattributes.IsSpool",            "true");
     126        // CHECKSTYLE.ON: SingleSpaceSeparator
    125127        CompositeCacheManager cm = CompositeCacheManager.getUnconfiguredInstance();
    126128        cm.configure(props);
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r10308 r10378  
    313313            final HttpClient request = getRequest("GET", true);
    314314
    315             if (isObjectLoadable()  &&
     315            if (isObjectLoadable() &&
    316316                    (now - attributes.getLastModification()) <= ABSOLUTE_EXPIRE_TIME_LIMIT) {
    317317                request.setIfModifiedSince(attributes.getLastModification());
     
    397397        } catch (InterruptedException e) {
    398398            attributes.setErrorMessage(e.toString());
    399             log.log(Level.WARNING, "JCS - Exception during download {0}",  getUrlNoException());
     399            log.log(Level.WARNING, "JCS - Exception during download {0}", getUrlNoException());
    400400            Main.warn(e);
    401401        }
  • trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java

    r9371 r10378  
    235235     */
    236236    public boolean hasConflictForTheir(OsmPrimitive their) {
    237         return getConflictForTheir(their)  != null;
     237        return getConflictForTheir(their) != null;
    238238    }
    239239
  • trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java

    r10334 r10378  
    162162        double x = east() - pivot.east();
    163163        double y = north() - pivot.north();
     164        // CHECKSTYLE.OFF: SingleSpaceSeparator
    164165        double nx =  cosPhi * x + sinPhi * y + pivot.east();
    165166        double ny = -sinPhi * x + cosPhi * y + pivot.north();
     167        // CHECKSTYLE.ON: SingleSpaceSeparator
    166168        return new EastNorth(nx, ny);
    167169    }
  • trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java

    r10212 r10378  
    3939 * @since 8168
    4040 */
    41 public class TMSCachedTileLoaderJob extends JCSCachedTileLoaderJob<String, BufferedImageCacheEntry> implements TileJob, ICachedLoaderListener  {
     41public class TMSCachedTileLoaderJob extends JCSCachedTileLoaderJob<String, BufferedImageCacheEntry> implements TileJob, ICachedLoaderListener {
    4242    private static final Logger LOG = FeatureAdapter.getLogger(TMSCachedTileLoaderJob.class.getCanonicalName());
    4343    private static final LongProperty MAXIMUM_EXPIRES = new LongProperty("imagery.generic.maximum_expires",
     
    124124            byte[] content = cacheData.getContent();
    125125            try {
    126                 return content != null  || cacheData.getImage() != null || isNoTileAtZoom();
     126                return content != null || cacheData.getImage() != null || isNoTileAtZoom();
    127127            } catch (IOException e) {
    128128                LOG.log(Level.WARNING, "JCS TMS - error loading from cache for tile {0}: {1}", new Object[] {tile.getKey(), e.getMessage()});
  • trunk/src/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSource.java

    r10181 r10378  
    4646    private double[] degreesPerTile;
    4747
    48     private static final Pattern PATTERN_HEADER  = Pattern.compile("\\{header\\(([^,]+),([^}]+)\\)\\}");
    49     private static final Pattern PATTERN_PROJ    = Pattern.compile("\\{proj\\}");
    50     private static final Pattern PATTERN_WKID    = Pattern.compile("\\{wkid\\}");
    51     private static final Pattern PATTERN_BBOX    = Pattern.compile("\\{bbox\\}");
    52     private static final Pattern PATTERN_W       = Pattern.compile("\\{w\\}");
    53     private static final Pattern PATTERN_S       = Pattern.compile("\\{s\\}");
    54     private static final Pattern PATTERN_E       = Pattern.compile("\\{e\\}");
    55     private static final Pattern PATTERN_N       = Pattern.compile("\\{n\\}");
    56     private static final Pattern PATTERN_WIDTH   = Pattern.compile("\\{width\\}");
    57     private static final Pattern PATTERN_HEIGHT  = Pattern.compile("\\{height\\}");
    58     private static final Pattern PATTERN_PARAM   = Pattern.compile("\\{([^}]+)\\}");
     48    // CHECKSTYLE.OFF: SingleSpaceSeparator
     49    private static final Pattern PATTERN_HEADER = Pattern.compile("\\{header\\(([^,]+),([^}]+)\\)\\}");
     50    private static final Pattern PATTERN_PROJ   = Pattern.compile("\\{proj\\}");
     51    private static final Pattern PATTERN_WKID   = Pattern.compile("\\{wkid\\}");
     52    private static final Pattern PATTERN_BBOX   = Pattern.compile("\\{bbox\\}");
     53    private static final Pattern PATTERN_W      = Pattern.compile("\\{w\\}");
     54    private static final Pattern PATTERN_S      = Pattern.compile("\\{s\\}");
     55    private static final Pattern PATTERN_E      = Pattern.compile("\\{e\\}");
     56    private static final Pattern PATTERN_N      = Pattern.compile("\\{n\\}");
     57    private static final Pattern PATTERN_WIDTH  = Pattern.compile("\\{width\\}");
     58    private static final Pattern PATTERN_HEIGHT = Pattern.compile("\\{height\\}");
     59    private static final Pattern PATTERN_PARAM  = Pattern.compile("\\{([^}]+)\\}");
     60    // CHECKSTYLE.ON: SingleSpaceSeparator
    5961
    6062    private static final NumberFormat latLonFormat = new DecimalFormat("###0.0000000", new DecimalFormatSymbols(Locale.US));
     
    269271    @Override
    270272    public TileXY latLonToTileXY(ICoordinate point, int zoom) {
    271         return latLonToTileXY(point.getLat(),  point.getLon(), zoom);
     273        return latLonToTileXY(point.getLat(), point.getLon(), zoom);
    272274    }
    273275
     
    297299        EastNorth point = Main.getProjection().latlon2eastNorth(new LatLon(lat, lon));
    298300        return new Point(
    299                     (int) Math.round((point.east() - anchorPosition.east())   / scale),
     301                    (int) Math.round((point.east() - anchorPosition.east()) / scale),
    300302                    (int) Math.round((anchorPosition.north() - point.north()) / scale)
    301303                );
  • trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java

    r10212 r10378  
    6161 */
    6262public class WMTSTileSource extends AbstractTMSTileSource implements TemplatedTileSource {
    63     private static final String PATTERN_HEADER  = "\\{header\\(([^,]+),([^}]+)\\)\\}";
     63    private static final String PATTERN_HEADER = "\\{header\\(([^,]+),([^}]+)\\)\\}";
    6464
    6565    private static final String URL_GET_ENCODING_PARAMS = "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER={layer}&STYLE={style}&"
     
    812812    @Override
    813813    public TileXY latLonToTileXY(ICoordinate point, int zoom) {
    814         return latLonToTileXY(point.getLat(),  point.getLon(), zoom);
     814        return latLonToTileXY(point.getLat(), point.getLon(), zoom);
    815815    }
    816816
     
    844844        EastNorth point = Main.getProjection().latlon2eastNorth(new LatLon(lat, lon));
    845845        return new Point(
    846                     (int) Math.round((point.east() - matrix.topLeftCorner.east())   / scale),
     846                    (int) Math.round((point.east() - matrix.topLeftCorner.east()) / scale),
    847847                    (int) Math.round((matrix.topLeftCorner.north() - point.north()) / scale)
    848848                );
  • trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java

    r9656 r10378  
    6060     * as deleted on the server.
    6161     */
    62     protected static final int FLAG_VISIBLE  = 1 << 1;
     62    protected static final int FLAG_VISIBLE = 1 << 1;
    6363
    6464    /**
     
    6969     * objects still referring to it.
    7070     */
    71     protected static final int FLAG_DELETED  = 1 << 2;
     71    protected static final int FLAG_DELETED = 1 << 2;
    7272
    7373    /**
  • trunk/src/org/openstreetmap/josm/data/osm/BBox.java

    r10336 r10378  
    5353    }
    5454
    55     public BBox(double ax, double ay, double bx, double by)  {
     55    public BBox(double ax, double ay, double bx, double by) {
    5656
    5757        if (ax > bx) {
     
    9494    }
    9595
    96     private void sanity()  {
     96    private void sanity() {
    9797        if (xmin < -180.0) {
    9898            xmin = -180.0;
    9999        }
    100         if (xmax >  180.0) {
    101             xmax =  180.0;
    102         }
    103         if (ymin <  -90.0) {
    104             ymin =  -90.0;
    105         }
    106         if (ymax >   90.0) {
    107             ymax =   90.0;
     100        if (xmax > 180.0) {
     101            xmax = 180.0;
     102        }
     103        if (ymin < -90.0) {
     104            ymin = -90.0;
     105        }
     106        if (ymax > 90.0) {
     107            ymax = 90.0;
    108108        }
    109109    }
  • trunk/src/org/openstreetmap/josm/data/osm/Changeset.java

    r9468 r10378  
    326326        this.createdAt = other.createdAt;
    327327        this.closedAt = other.closedAt;
    328         this.open  = other.open;
     328        this.open = other.open;
    329329        this.min = other.min;
    330330        this.max = other.max;
  • trunk/src/org/openstreetmap/josm/data/osm/ChangesetDataSet.java

    r9067 r10378  
    144144     */
    145145    public HistoryOsmPrimitive getPrimitive(PrimitiveId id) {
    146         if (id == null)  return null;
     146        if (id == null) return null;
    147147        return primitives.get(id);
    148148    }
  • trunk/src/org/openstreetmap/josm/data/osm/DatasetConsistencyTest.java

    r10212 r10378  
    141141        } else if (dataSet.getPrimitiveById(primitive) == null) {
    142142            printError("REFERENCED BUT NOT IN DATA", "%s is referenced by %s but not found in dataset", primitive, parent);
    143         } else  if (dataSet.getPrimitiveById(primitive) != primitive) {
     143        } else if (dataSet.getPrimitiveById(primitive) != primitive) {
    144144            printError("DIFFERENT INSTANCE", "%s is different instance that referred by %s", primitive, parent);
    145145        }
  • trunk/src/org/openstreetmap/josm/data/osm/Filter.java

    r9980 r10378  
    5757        } else if ("remove".equals(e.mode)) {
    5858            mode = SearchMode.remove;
    59         } else  if ("in_selection".equals(e.mode)) {
     59        } else if ("in_selection".equals(e.mode)) {
    6060            mode = SearchMode.in_selection;
    6161        }
  • trunk/src/org/openstreetmap/josm/data/osm/Node.java

    r9989 r10378  
    277277    public String toString() {
    278278        String coorDesc = isLatLonKnown() ? "lat="+lat+",lon="+lon : "";
    279         return "{Node id=" + getUniqueId() + " version=" + getVersion() + ' ' + getFlagsAsString() + ' '  + coorDesc+'}';
     279        return "{Node id=" + getUniqueId() + " version=" + getVersion() + ' ' + getFlagsAsString() + ' ' + coorDesc+'}';
    280280    }
    281281
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r10040 r10378  
    634634            }
    635635            super.setIncomplete(incomplete);
    636         }  finally {
     636        } finally {
    637637            writeUnlock(locked);
    638638        }
     
    12661266
    12671267    boolean hasEqualSemanticAttributes(final OsmPrimitive other, final boolean testInterestingTagsOnly) {
    1268         if (!isNew() &&  id != other.id)
     1268        if (!isNew() && id != other.id)
    12691269            return false;
    12701270        if (isIncomplete() ^ other.isIncomplete()) // exclusive or operator for performance (see #7159)
     
    12911291        if (other == null) return false;
    12921292
    1293         return  isDeleted() == other.isDeleted()
     1293        return isDeleted() == other.isDeleted()
    12941294                && isModified() == other.isModified()
    12951295                && timestamp == other.timestamp
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java

    r9067 r10378  
    4141            MapView.addLayerChangeListener(historyDataSet);
    4242        }
    43         return  historyDataSet;
     43        return historyDataSet;
    4444    }
    4545
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java

    r10006 r10378  
    8989        this.visible = visible;
    9090        this.user = user;
    91         this.changesetId  = changesetId;
     91        this.changesetId = changesetId;
    9292        this.timestamp = timestamp;
    9393        tags = new HashMap<>();
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java

    r9067 r10378  
    111111     * @throws IndexOutOfBoundsException if idx is out of bounds
    112112     */
    113     public RelationMemberData getRelationMember(int idx) throws IndexOutOfBoundsException  {
     113    public RelationMemberData getRelationMember(int idx) throws IndexOutOfBoundsException {
    114114        if (idx < 0 || idx >= members.size())
    115115            throw new IndexOutOfBoundsException(
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java

    r9243 r10378  
    6666        public Descriptor(Class<? extends AbstractMapRenderer> renderer, String displayName, String description) {
    6767            this.renderer = renderer;
    68             this.displayName  = displayName;
     68            this.displayName = displayName;
    6969            this.description = description;
    7070        }
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/PaintColors.java

    r8840 r10378  
    2121    CONNECTION(marktr("Node: connection"), Color.yellow),
    2222    TAGGED(marktr("Node: tagged"), new Color(204, 255, 255)), // light cyan
    23     DEFAULT_WAY(marktr("way"),  new Color(0, 0, 128)), // dark blue
     23    DEFAULT_WAY(marktr("way"), new Color(0, 0, 128)), // dark blue
    2424    RELATION(marktr("relation"), new Color(0, 128, 128)), // teal
    2525    UNTAGGED_WAY(marktr("untagged way"), new Color(0, 128, 0)), // dark green
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r10312 r10378  
    295295     */
    296296    public static boolean isGlyphVectorDoubleTranslationBug(Font font) {
    297         Boolean cached  = IS_GLYPH_VECTOR_DOUBLE_TRANSLATION_BUG.get(font);
     297        Boolean cached = IS_GLYPH_VECTOR_DOUBLE_TRANSLATION_BUG.get(font);
    298298        if (cached != null)
    299299            return cached;
     
    575575            if (pb.width >= nb.getWidth() && pb.height >= nb.getHeight()) {
    576576
    577                 final double w = pb.width  - nb.getWidth();
     577                final double w = pb.width - nb.getWidth();
    578578                final double h = pb.height - nb.getHeight();
    579579
     
    590590                if (!labelOK) {
    591591                    // if center position (C) is not inside osm shape, try naively some other positions as follows:
     592                    // CHECKSTYLE.OFF: SingleSpaceSeparator
    592593                    final int x1 = pb.x + (int)   (w/4.0);
    593594                    final int x3 = pb.x + (int) (3*w/4.0);
    594595                    final int y1 = pb.y + (int)   (h/4.0);
    595596                    final int y3 = pb.y + (int) (3*h/4.0);
     597                    // CHECKSTYLE.ON: SingleSpaceSeparator
    596598                    // +-----------+
    597599                    // |  5  1  6  |
     
    14811483                        final double segmentLength = p1.distance(p2);
    14821484                        if (segmentLength != 0) {
    1483                             final double l =  (10. + line.getLineWidth()) / segmentLength;
     1485                            final double l = (10. + line.getLineWidth()) / segmentLength;
    14841486
    14851487                            final double sx = l * (p1.x - p2.x);
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java

    r10303 r10378  
    427427
    428428            if (showDirection) {
    429                 final double l =  10. / p1.distance(p2);
     429                final double l = 10. / p1.distance(p2);
    430430
    431431                final double sx = l * (p1.x - p2.x);
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java

    r10312 r10378  
    646646    }
    647647
    648     private void addInnerToOuters(List<PolyData> innerPolygons, List<PolyData> outerPolygons)  {
     648    private void addInnerToOuters(List<PolyData> innerPolygons, List<PolyData> outerPolygons) {
    649649        if (innerPolygons.isEmpty()) {
    650650            combinedPolygons.addAll(outerPolygons);
  • trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java

    r10235 r10378  
    316316            s = parameters.get(Param.axis.key);
    317317            if (s != null) {
    318                 this.axis  = s;
     318                this.axis = s;
    319319            }
    320320        }
     
    526526            id = "tmerc";
    527527        }
    528         Proj proj =  Projections.getBaseProjection(id);
     528        Proj proj = Projections.getBaseProjection(id);
    529529        if (proj == null) throw new ProjectionConfigurationException(tr("Unknown projection identifier: ''{0}''", id));
    530530
  • trunk/src/org/openstreetmap/josm/data/projection/proj/AbstractProj.java

    r10250 r10378  
    9292        //  Compute constants for the mlfn
    9393        double t;
     94        // CHECKSTYLE.OFF: SingleSpaceSeparator
    9495        en0 = C00 - e2  *  (C02 + e2  *
    9596             (C04 + e2  *  (C06 + e2  * C08)));
     
    100101        en3 = (t *= e2) *  (C66 - e2  * C68);
    101102        en4 =   t * e2  *  C88;
     103        // CHECKSTYLE.ON: SingleSpaceSeparator
    102104    }
    103105
     
    158160        double phi = (Math.PI/2) - 2.0 * Math.atan(ts);
    159161        for (int i = 0; i < MAXIMUM_ITERATIONS; i++) {
    160             final double con  = e * Math.sin(phi);
     162            final double con = e * Math.sin(phi);
    161163            final double dphi = (Math.PI/2) - 2.0*Math.atan(ts * Math.pow((1-con)/(1+con), eccnth)) - phi;
    162164            phi += dphi;
  • trunk/src/org/openstreetmap/josm/data/projection/proj/AlbersEqualArea.java

    r10235 r10378  
    9898            throw new ProjectionConfigurationException(tr("standard parallels are opposite"));
    9999        }
    100         double  sinphi = Math.sin(phi1);
    101         double  cosphi = Math.cos(phi1);
    102         double  n      = sinphi;
     100        double sinphi = Math.sin(phi1);
     101        double cosphi = Math.cos(phi1);
     102        double n = sinphi;
    103103        boolean secant = Math.abs(phi1 - phi2) >= EPSILON;
    104104        double m1 = msfn(sinphi, cosphi);
    105105        double q1 = qsfn(sinphi);
    106106        if (secant) { // secant cone
    107             sinphi    = Math.sin(phi2);
    108             cosphi    = Math.cos(phi2);
     107            sinphi = Math.sin(phi2);
     108            cosphi = Math.cos(phi2);
    109109            double m2 = msfn(sinphi, cosphi);
    110110            double q2 = qsfn(sinphi);
     
    130130        }
    131131        rho = Math.sqrt(rho) / n;
    132         y   = rho0 - rho * Math.cos(x);
    133         x   =        rho * Math.sin(x);
     132        // CHECKSTYLE.OFF: SingleSpaceSeparator
     133        y = rho0 - rho * Math.cos(x);
     134        x =        rho * Math.sin(x);
     135        // CHECKSTYLE.ON: SingleSpaceSeparator
    134136        return new double[] {x, y};
    135137    }
     
    142144            if (n < 0.0) {
    143145                rho = -rho;
    144                 x   = -x;
    145                 y   = -y;
     146                x = -x;
     147                y = -y;
    146148            }
    147149            x = Math.atan2(x, y) / n;
     
    175177            final double sinpi = Math.sin(phi);
    176178            final double cospi = Math.cos(phi);
    177             final double con   = e * sinpi;
    178             final double com   = 1.0 - con*con;
    179             final double dphi  = 0.5 * com*com / cospi *
     179            final double con = e * sinpi;
     180            final double com = 1.0 - con*con;
     181            final double dphi = 0.5 * com*com / cospi *
    180182                    (qs/toneEs - sinpi / com + 0.5/e * Math.log((1. - con) / (1. + con)));
    181183            phi += dphi;
  • trunk/src/org/openstreetmap/josm/data/projection/proj/LambertAzimuthalEqualArea.java

    r9998 r10378  
    100100
    101101        final double sinphi;
    102         qp     = qsfn(1);
    103         rq     = Math.sqrt(0.5 * qp);
     102        qp = qsfn(1);
     103        rq = Math.sqrt(0.5 * qp);
    104104        sinphi = Math.sin(latitudeOfOrigin);
    105105        sinb1 = qsfn(sinphi) / qp;
     
    107107        switch (mode) {
    108108            case NORTH_POLE:  // Fall through
    109             case SOUTH_POLE: {
    110                 dd  = 1.0;
     109            case SOUTH_POLE:
     110                dd = 1.0;
    111111                xmf = ymf = rq;
    112112                break;
    113             }
    114             case EQUATORIAL: {
    115                 dd  = 1.0 / rq;
     113            case EQUATORIAL:
     114                dd = 1.0 / rq;
    116115                xmf = 1.0;
    117116                ymf = 0.5 * qp;
    118117                break;
    119             }
    120             case OBLIQUE: {
    121                 dd  = Math.cos(latitudeOfOrigin) /
    122                         (Math.sqrt(1.0 - e2 * sinphi * sinphi) * rq * cosb1);
     118            case OBLIQUE:
     119                dd = Math.cos(latitudeOfOrigin) / (Math.sqrt(1.0 - e2 * sinphi * sinphi) * rq * cosb1);
    123120                xmf = rq * dd;
    124121                ymf = rq / dd;
    125122                break;
    126             }
    127             default: {
     123            default:
    128124                throw new AssertionError(mode);
    129             }
    130125        }
    131126    }
     
    139134        final double sinb, cosb, b, c, x, y;
    140135        switch (mode) {
    141             case OBLIQUE: {
     136            case OBLIQUE:
    142137                sinb = q / qp;
    143138                cosb = Math.sqrt(1.0 - sinb * sinb);
    144                 c    = 1.0 + sinb1 * sinb + cosb1 * cosb * coslam;
    145                 b    = Math.sqrt(2.0 / c);
    146                 y    = ymf * b * (cosb1 * sinb - sinb1 * cosb * coslam);
    147                 x    = xmf * b * cosb * sinlam;
    148                 break;
    149             }
    150             case EQUATORIAL: {
     139                c = 1.0 + sinb1 * sinb + cosb1 * cosb * coslam;
     140                b = Math.sqrt(2.0 / c);
     141                y = ymf * b * (cosb1 * sinb - sinb1 * cosb * coslam);
     142                x = xmf * b * cosb * sinlam;
     143                break;
     144            case EQUATORIAL:
    151145                sinb = q / qp;
    152146                cosb = Math.sqrt(1.0 - sinb * sinb);
    153                 c    = 1.0 + cosb * coslam;
    154                 b    = Math.sqrt(2.0 / c);
    155                 y    = ymf * b * sinb;
    156                 x    = xmf * b * cosb * sinlam;
    157                 break;
    158             }
    159             case NORTH_POLE: {
     147                c = 1.0 + cosb * coslam;
     148                b = Math.sqrt(2.0 / c);
     149                y = ymf * b * sinb;
     150                x = xmf * b * cosb * sinlam;
     151                break;
     152            case NORTH_POLE:
    160153                c = (Math.PI / 2) + phi;
    161154                q = qp - q;
     
    168161                }
    169162                break;
    170             }
    171             case SOUTH_POLE: {
     163            case SOUTH_POLE:
    172164                c = phi - (Math.PI / 2);
    173165                q = qp + q;
     
    180172                }
    181173                break;
    182             }
    183             default: {
     174            default:
    184175                throw new AssertionError(mode);
    185             }
    186176        }
    187177        if (Math.abs(c) < EPSILON_LATITUDE) {
     
    211201                    if (mode == Mode.OBLIQUE) {
    212202                        ab = cCe * sinb1 + y * sCe * cosb1 / rho;
    213                         y  = rho * cosb1 * cCe - y * sinb1 * sCe;
     203                        y = rho * cosb1 * cCe - y * sinb1 * sCe;
    214204                    } else {
    215205                        ab = y * sCe / rho;
    216                         y  = rho * cCe;
     206                        y = rho * cCe;
    217207                    }
    218208                    lambda = Math.atan2(x, y);
  • trunk/src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java

    r10001 r10378  
    105105        final double tf = t(toRadians(lat0));
    106106
    107         n  = (log(m1) - log(m2)) / (log(t1) - log(t2));
    108         f  = m1 / (n * pow(t1, n));
     107        n = (log(m1) - log(m2)) / (log(t1) - log(t2));
     108        f = m1 / (n * pow(t1, n));
    109109        r0 = f * pow(tf, n);
    110110    }
     
    123123
    124124        n = sin(lat0rad);
    125         f  = m0 / (n * pow(t0, n));
     125        f = m0 / (n * pow(t0, n));
    126126        r0 = f * pow(t0, n);
    127127    }
  • trunk/src/org/openstreetmap/josm/data/projection/proj/Mercator.java

    r9577 r10378  
    7272            if (spherical) {
    7373                scaleFactor *= Math.cos(standardParallel);
    74             }  else {
     74            } else {
    7575                scaleFactor *= msfn(Math.sin(standardParallel), Math.cos(standardParallel));
    7676            }
  • trunk/src/org/openstreetmap/josm/data/projection/proj/ObliqueMercator.java

    r10001 r10378  
    314314            lonCenter = Math.toRadians(params.lonc);
    315315            azimuth = Math.toRadians(params.alpha);
     316            // CHECKSTYLE.OFF: SingleSpaceSeparator
    316317            if ((azimuth > -1.5*Math.PI && azimuth < -0.5*Math.PI) ||
    317318                (azimuth >  0.5*Math.PI && azimuth <  1.5*Math.PI)) {
     
    319320                        tr("Illegal value for parameter ''{0}'': {1}", "alpha", Double.toString(params.alpha)));
    320321            }
     322            // CHECKSTYLE.ON: SingleSpaceSeparator
    321323            if (params.gamma != null) {
    322324                rectifiedGridAngle = Math.toRadians(params.gamma);
     
    341343        singamma0 = Math.sin(gamma0);
    342344        cosgamma0 = Math.cos(gamma0);
    343         sinrot    = Math.sin(rectifiedGridAngle);
    344         cosrot    = Math.cos(rectifiedGridAngle);
    345         arb       = a / b;
    346         ab        = a * b;
    347         bra       = b / a;
    348         vPoleN  = arb * Math.log(Math.tan(0.5 * (Math.PI/2.0 - gamma0)));
    349         vPoleS  = arb * Math.log(Math.tan(0.5 * (Math.PI/2.0 + gamma0)));
     345        sinrot = Math.sin(rectifiedGridAngle);
     346        cosrot = Math.cos(rectifiedGridAngle);
     347        arb = a / b;
     348        ab = a * b;
     349        bra = b / a;
     350        vPoleN = arb * Math.log(Math.tan(0.5 * (Math.PI/2.0 - gamma0)));
     351        vPoleS = arb * Math.log(Math.tan(0.5 * (Math.PI/2.0 + gamma0)));
    350352        boolean hotine = params.no_off != null && params.no_off;
    351353        if (hotine) {
  • trunk/src/org/openstreetmap/josm/data/projection/proj/PolarStereographic.java

    r10235 r10378  
    135135        } else {
    136136            final double rho = k0 * tsfn(y, sinlat);
    137             x =  rho * sinlon;
     137            x = rho * sinlon;
    138138            y = -rho * coslon;
    139139        }
  • trunk/src/org/openstreetmap/josm/data/validation/PaintVisitor.java

    r10250 r10378  
    152152                                 (int) (p2.y + sinT), (int) (p1.y + sinT)};
    153153            g.fillPolygon(x, y, 4);
    154             g.fillArc(p1.x - 5, p1.y - 5, 10, 10, deg,  180);
     154            g.fillArc(p1.x - 5, p1.y - 5, 10, 10, deg, 180);
    155155            g.fillArc(p2.x - 5, p2.y - 5, 10, 10, deg, -180);
    156156        }
     
    160160        g.drawLine((int) (p1.x - cosT), (int) (p1.y + sinT),
    161161                (int) (p2.x - cosT), (int) (p2.y + sinT));
    162         g.drawArc(p1.x - 5, p1.y - 5, 10, 10, deg,  180);
     162        g.drawArc(p1.x - 5, p1.y - 5, 10, 10, deg, 180);
    163163        g.drawArc(p2.x - 5, p2.y - 5, 10, 10, deg, -180);
    164164    }
  • trunk/src/org/openstreetmap/josm/data/validation/Severity.java

    r9929 r10378  
    1111/** The error severity */
    1212public enum Severity {
     13    // CHECKSTYLE.OFF: SingleSpaceSeparator
    1314    /** Error messages */
    1415    ERROR(tr("Errors"), /* ICON(data/) */"error",       Main.pref.getColor(marktr("validation error"), Color.RED)),
     
    1718    /** Other messages */
    1819    OTHER(tr("Other"), /* ICON(data/) */"other",        Main.pref.getColor(marktr("validation other"), Color.CYAN));
     20    // CHECKSTYLE.ON: SingleSpaceSeparator
    1921
    2022    /** Description of the severity code */
  • trunk/src/org/openstreetmap/josm/data/validation/routines/RegexValidator.java

    r10338 r10378  
    125125                throw new IllegalArgumentException("Regular expression[" + i + "] is missing");
    126126            }
    127             patterns[i] =  Pattern.compile(regexs[i], flags);
     127            patterns[i] = Pattern.compile(regexs[i], flags);
    128128        }
    129129    }
  • trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java

    r10228 r10378  
    4444    protected static final int HOUSE_NUMBER_TOO_FAR = 2605;
    4545
     46    // CHECKSTYLE.OFF: SingleSpaceSeparator
    4647    protected static final String ADDR_HOUSE_NUMBER  = "addr:housenumber";
    4748    protected static final String ADDR_INTERPOLATION = "addr:interpolation";
     
    4950    protected static final String ADDR_STREET        = "addr:street";
    5051    protected static final String ASSOCIATED_STREET  = "associatedStreet";
     52    // CHECKSTYLE.ON: SingleSpaceSeparator
    5153
    5254    protected static class AddressError extends TestError {
  • trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java

    r10228 r10378  
    4747     */
    4848    private static final List<String> CLASSIFIED_HIGHWAYS = Arrays.asList(
     49            // CHECKSTYLE.OFF: SingleSpaceSeparator
    4950            "motorway",  "motorway_link",
    5051            "trunk",     "trunk_link",
     
    5556            "residential",
    5657            "living_street");
     58            // CHECKSTYLE.ON: SingleSpaceSeparator
    5759
    5860    private static final Set<String> KNOWN_SOURCE_MAXSPEED_CONTEXTS = new HashSet<>(Arrays.asList(
  • trunk/src/org/openstreetmap/josm/data/validation/tests/LongSegment.java

    r10080 r10378  
    2020
    2121    /** Long segment error */
    22     protected static final int LONG_SEGMENT    = 3501;
     22    protected static final int LONG_SEGMENT = 3501;
    2323    /** Maximum segment length for this test */
    2424    protected int maxlength;
  • trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java

    r10043 r10378  
    6262
    6363    @Override
    64     public void startTest(ProgressMonitor monitor)  {
     64    public void startTest(ProgressMonitor monitor) {
    6565        super.startTest(monitor);
    6666        nodePairs = new MultiMap<>(1000);
  • trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java

    r10308 r10378  
    3636public class RelationChecker extends Test {
    3737
     38    // CHECKSTYLE.OFF: SingleSpaceSeparator
    3839    /** Role {0} unknown in templates {1} */
    39     public static final int ROLE_UNKNOWN      = 1701;
     40    public static final int ROLE_UNKNOWN     = 1701;
    4041    /** Empty role type found when expecting one of {0} */
    41     public static final int ROLE_EMPTY        = 1702;
     42    public static final int ROLE_EMPTY       = 1702;
    4243    /** Role member does not match expression {0} in template {1} */
    43     public static final int WRONG_TYPE        = 1703;
     44    public static final int WRONG_TYPE       = 1703;
    4445    /** Number of {0} roles too high ({1}) */
    45     public static final int HIGH_COUNT        = 1704;
     46    public static final int HIGH_COUNT       = 1704;
    4647    /** Number of {0} roles too low ({1}) */
    47     public static final int LOW_COUNT         = 1705;
     48    public static final int LOW_COUNT        = 1705;
    4849    /** Role {0} missing */
    49     public static final int ROLE_MISSING      = 1706;
     50    public static final int ROLE_MISSING     = 1706;
    5051    /** Relation type is unknown */
    51     public static final int RELATION_UNKNOWN  = 1707;
     52    public static final int RELATION_UNKNOWN = 1707;
    5253    /** Relation is empty */
    53     public static final int RELATION_EMPTY    = 1708;
     54    public static final int RELATION_EMPTY   = 1708;
     55    // CHECKSTYLE.ON: SingleSpaceSeparator
    5456
    5557    /**
  • trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java

    r10224 r10378  
    115115    protected JCheckBox prefCheckPaintBeforeUpload;
    116116
     117    // CHECKSTYLE.OFF: SingleSpaceSeparator
    117118    protected static final int EMPTY_VALUES      = 1200;
    118119    protected static final int INVALID_KEY       = 1201;
     
    129130    protected static final int MISSPELLED_KEY    = 1213;
    130131    protected static final int MULTIPLE_SPACES   = 1214;
     132    // CHECKSTYLE.ON: SingleSpaceSeparator
    131133    // 1250 and up is used by tagcheck
    132134
     
    707709        private int code;
    708710        protected Severity severity;
    709         protected static final int TAG_CHECK_ERROR  = 1250;
    710         protected static final int TAG_CHECK_WARN   = 1260;
    711         protected static final int TAG_CHECK_INFO   = 1270;
     711        // CHECKSTYLE.OFF: SingleSpaceSeparator
     712        protected static final int TAG_CHECK_ERROR = 1250;
     713        protected static final int TAG_CHECK_WARN  = 1260;
     714        protected static final int TAG_CHECK_INFO  = 1270;
     715        // CHECKSTYLE.ON: SingleSpaceSeparator
    712716
    713717        protected static class CheckerElement {
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java

    r10376 r10378  
    9595            String value = w.get(key);
    9696            if (isValueErroneous(value)) {
     97                // CHECKSTYLE.OFF: SingleSpaceSeparator
    9798                String  type = engMessage.contains("{0}") ? tr(engMessage, tr(value)) : tr(engMessage);
    9899                String etype = engMessage.contains("{0}") ? MessageFormat.format(engMessage, value) : engMessage;
     100                // CHECKSTYLE.ON: SingleSpaceSeparator
    99101                return new TestError(UnclosedWays.this, Severity.WARNING, tr("Unclosed way"),
    100102                        type, etype, code, Arrays.asList(w),
     
    136138
    137139    private final UnclosedWaysCheck[] checks = {
     140        // CHECKSTYLE.OFF: SingleSpaceSeparator
    138141        new UnclosedWaysCheck(1101, "natural",   marktr("natural type {0}"),
    139142                new HashSet<>(Arrays.asList("cave", "coastline", "cliff", "tree_row", "ridge", "valley", "arete", "gorge"))),
     
    152155        new UnclosedWaysBooleanCheck(1120, "building", marktr("building")),
    153156        new UnclosedWaysBooleanCheck(1130, "area",     marktr("area")),
     157        // CHECKSTYLE.ON: SingleSpaceSeparator
    154158    };
    155159
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java

    r10001 r10378  
    346346                y2 = tmpy;
    347347            }
    348             LatLon topLeft  = new LatLon(y2+fudge, x1-fudge);
     348            LatLon topLeft = new LatLon(y2+fudge, x1-fudge);
    349349            LatLon botRight = new LatLon(y1-fudge, x2+fudge);
    350350            List<LatLon> ret = new ArrayList<>(2);
     
    355355
    356356        public Collection<Node> nearbyNodes(double dist) {
    357             // If you're looking for nodes that are farther
    358             // away that we looked for last time, the cached
    359             // result is no good
     357            // If you're looking for nodes that are farther away that we looked for last time,
     358            // the cached result is no good
    360359            if (dist > nearbyNodeCacheDist) {
    361360                nearbyNodeCache = null;
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java

    r9675 r10378  
    2727public class UntaggedWay extends Test {
    2828
     29    // CHECKSTYLE.OFF: SingleSpaceSeparator
    2930    /** Empty way error */
    30     protected static final int EMPTY_WAY    = 301;
     31    protected static final int EMPTY_WAY        = 301;
    3132    /** Untagged way error */
    32     protected static final int UNTAGGED_WAY = 302;
     33    protected static final int UNTAGGED_WAY     = 302;
    3334    /** Unnamed way error */
    34     protected static final int UNNAMED_WAY  = 303;
     35    protected static final int UNNAMED_WAY      = 303;
    3536    /** One node way error */
    36     protected static final int ONE_NODE_WAY = 304;
     37    protected static final int ONE_NODE_WAY     = 304;
    3738    /** Unnamed junction error */
    38     protected static final int UNNAMED_JUNCTION  = 305;
     39    protected static final int UNNAMED_JUNCTION = 305;
    3940    /** Untagged, but commented way error */
    40     protected static final int COMMENTED_WAY = 306;
     41    protected static final int COMMENTED_WAY    = 306;
     42    // CHECKSTYLE.ON: SingleSpaceSeparator
    4143
    4244    private Set<Way> waysUsedInRelations;
  • trunk/src/org/openstreetmap/josm/data/validation/tests/WronglyOrderedWays.java

    r8378 r10378  
    1919public class WronglyOrderedWays extends Test {
    2020
     21    // CHECKSTYLE.OFF: SingleSpaceSeparator
    2122    protected static final int WRONGLY_ORDERED_COAST = 1001;
    2223    protected static final int WRONGLY_ORDERED_LAND  = 1003;
     24    // CHECKSTYLE.ON: SingleSpaceSeparator
    2325
    2426    /**
  • trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java

    r8510 r10378  
    4545
    4646        // First, round coordinates
     47        // CHECKSTYLE.OFF: SingleSpaceSeparator
    4748        long x0 = Math.round(n1.getEastNorth().east()  * OsmValidator.griddetail);
    4849        long y0 = Math.round(n1.getEastNorth().north() * OsmValidator.griddetail);
    4950        long x1 = Math.round(n2.getEastNorth().east()  * OsmValidator.griddetail);
    5051        long y1 = Math.round(n2.getEastNorth().north() * OsmValidator.griddetail);
     52        // CHECKSTYLE.ON: SingleSpaceSeparator
    5153
    5254        // Start of the way
     
    7375
    7476        // Then floor coordinates, in case the way is in the border of the cell.
     77        // CHECKSTYLE.OFF: SingleSpaceSeparator
    7578        x0 = (long) Math.floor(n1.getEastNorth().east()  * OsmValidator.griddetail);
    7679        y0 = (long) Math.floor(n1.getEastNorth().north() * OsmValidator.griddetail);
    7780        x1 = (long) Math.floor(n2.getEastNorth().east()  * OsmValidator.griddetail);
    7881        y1 = (long) Math.floor(n2.getEastNorth().north() * OsmValidator.griddetail);
     82        // CHECKSTYLE.ON: SingleSpaceSeparator
    7983
    8084        // Start of the way
     
    147151        }
    148152
    149         double dx  = x1 - x0;
    150         double dy  = y1 - y0;
     153        double dx = x1 - x0;
     154        double dy = y1 - y0;
    151155        long stepY = y0 <= y1 ? 1 : -1;
    152156        long gridX0 = (long) Math.floor(x0);
  • trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java

    r10308 r10378  
    161161                            /* I18n: house number, street as parameter, number should remain
    162162                        before street for better visibility */
    163                             n =  tr("House number {0} at {1}", s, t);
     163                            n = tr("House number {0} at {1}", s, t);
    164164                        } else {
    165165                            /* I18n: house number as parameter */
     
    253253                            /* I18n: house number, street as parameter, number should remain
    254254                        before street for better visibility */
    255                             n =  tr("House number {0} at {1}", s, t);
     255                            n = tr("House number {0} at {1}", s, t);
    256256                        } else {
    257257                            /* I18n: house number as parameter */
     
    405405        }
    406406        if (name == null) {
    407             String building  = relation.get("building");
     407            String building = relation.get("building");
    408408            if (OsmUtils.isTrue(building)) {
    409409                name = tr("building");
  • trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java

    r10308 r10378  
    407407        boolean limitedInHeight = d.height > x.height;
    408408
    409         if (x.width  > 0 && d.width > x.width) {
    410             d.width  = x.width;
     409        if (x.width > 0 && d.width > x.width) {
     410            d.width = x.width;
    411411        }
    412412        if (x.height > 0 && d.height > x.height) {
  • trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java

    r10122 r10378  
    214214     */
    215215    public static int showOptionDialog(Component parentComponent, Object msg, String title, int messageType,
    216             Icon icon, final ButtonSpec[] options, final ButtonSpec defaultOption, final String helpTopic)  {
     216            Icon icon, final ButtonSpec[] options, final ButtonSpec defaultOption, final String helpTopic) {
    217217        final List<JButton> buttons = createOptionButtons(options, helpTopic);
    218218        if (helpTopic != null) {
     
    334334     * @see #showOptionDialog(Component, Object, String, int, Icon, ButtonSpec[], ButtonSpec, String)
    335335     */
    336     public static int showOptionDialog(Component parentComponent, Object msg, String title, int messageType, String helpTopic)  {
     336    public static int showOptionDialog(Component parentComponent, Object msg, String title, int messageType, String helpTopic) {
    337337        return showOptionDialog(parentComponent, msg, title, messageType, null, null, null, helpTopic);
    338338    }
     
    352352     */
    353353    public static void showMessageDialogInEDT(final Component parentComponent, final Object msg, final String title,
    354             final int messageType, final String helpTopic)  {
     354            final int messageType, final String helpTopic) {
    355355        GuiHelper.runInEDT(new Runnable() {
    356356            @Override
  • trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java

    r10364 r10378  
    282282
    283283    private void addDynamicSeparator() {
    284         JPopupMenu.Separator s =  new JPopupMenu.Separator();
     284        JPopupMenu.Separator s = new JPopupMenu.Separator();
    285285        dynamicItems.add(s);
    286286        add(s);
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r10340 r10378  
    146146                "\t--offline=<osm_api|josm_website|all>      "+tr("Disable access to the given resource(s), separated by comma")+"\n\n"+
    147147                tr("options provided as Java system properties")+":\n"+
     148                // CHECKSTYLE.OFF: SingleSpaceSeparator
    148149                "\t-Djosm.pref="    +tr("/PATH/TO/JOSM/PREF    ")+tr("Set the preferences directory")+"\n\n"+
    149150                "\t-Djosm.userdata="+tr("/PATH/TO/JOSM/USERDATA")+tr("Set the user data directory")+"\n\n"+
    150151                "\t-Djosm.cache="   +tr("/PATH/TO/JOSM/CACHE   ")+tr("Set the cache directory")+"\n\n"+
    151152                "\t-Djosm.home="    +tr("/PATH/TO/JOSM/HOMEDIR ")+
     153                // CHECKSTYLE.ON: SingleSpaceSeparator
    152154                tr("Relocate all 3 directories to homedir. Cache directory will be in homedir/cache")+"\n\n"+
    153155                tr("-Djosm.home has lower precedence, i.e. the specific setting overrides the general one")+"\n\n"+
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r10345 r10378  
    599599
    600600        public void setButton(JButton button) {
    601             this.button =  button;
     601            this.button = button;
    602602            final ImageIcon icon = ImageProvider.get("audio-fwd");
    603603            putValue(SMALL_ICON, icon);
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r10375 r10378  
    10041004    }
    10051005
    1006     public void setHelpText(Object id, final String text)  {
     1006    public void setHelpText(Object id, final String text) {
    10071007
    10081008        StatusTextHistory entry = new StatusTextHistory(id, text);
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r10375 r10378  
    564564    public void rememberLastPositionOnScreen() {
    565565        oldSize = getSize();
    566         oldLoc  = getLocationOnScreen();
     566        oldLoc = getLocationOnScreen();
    567567    }
    568568
     
    949949        // if the position was remembered, we need to adjust center once before repainting
    950950        if (oldLoc != null && oldSize != null) {
    951             Point l1  = getLocationOnScreen();
     951            Point l1 = getLocationOnScreen();
    952952            final EastNorth newCenter = new EastNorth(
    953953                    getCenter().getX()+ (l1.x-oldLoc.x - (oldSize.width-getWidth())/2.0)*getScale(),
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r10375 r10378  
    101101
    102102    public static final String PROPNAME_CENTER = "center";
    103     public static final String PROPNAME_SCALE  = "scale";
     103    public static final String PROPNAME_SCALE = "scale";
    104104
    105105    /**
  • trunk/src/org/openstreetmap/josm/gui/ScrollViewport.java

    r10244 r10378  
    132132
    133133        this.addComponentListener(new ComponentAdapter() {
    134             @Override public void  componentResized(ComponentEvent e) {
     134            @Override public void componentResized(ComponentEvent e) {
    135135                showOrHideButtons();
    136136            }
  • trunk/src/org/openstreetmap/josm/gui/SideButton.java

    r10365 r10378  
    102102        if (i instanceof ImageIcon && i.getIconHeight() != iconHeight) {
    103103            Image im = ((ImageIcon) i).getImage();
    104             int newWidth = im.getWidth(null) *  iconHeight / im.getHeight(null);
     104            int newWidth = im.getWidth(null) * iconHeight / im.getHeight(null);
    105105            ImageIcon icon = new ImageIcon(im.getScaledInstance(newWidth, iconHeight, Image.SCALE_SMOOTH));
    106106            setIcon(icon);
  • trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java

    r10212 r10378  
    137137        headers.put("User-Agent", Version.getInstance().getFullAgentString());
    138138
    139         cachedLoader = AbstractCachedTileSourceLayer.getTileLoaderFactory("TMS", TMSCachedTileLoader.class).makeTileLoader(this,  headers);
     139        cachedLoader = AbstractCachedTileSourceLayer.getTileLoaderFactory("TMS", TMSCachedTileLoader.class).makeTileLoader(this, headers);
    140140
    141141        uncachedLoader = new OsmTileLoader(this);
     
    240240
    241241        iSelectionRectStart = getPosition(pMin);
    242         iSelectionRectEnd =   getPosition(pMax);
     242        iSelectionRectEnd = getPosition(pMax);
    243243
    244244        Bounds b = new Bounds(
  • trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java

    r10212 r10378  
    183183     */
    184184    protected LatLon getNorthWestLatLonOfTile(Point tile, int zoom) {
    185         double lon =  tile.x / Math.pow(2.0, zoom) * 360.0 - 180;
    186         double lat =  Math.toDegrees(Math.atan(Math.sinh(Math.PI - (2.0 * Math.PI * tile.y) / Math.pow(2.0, zoom))));
     185        double lon = tile.x / Math.pow(2.0, zoom) * 360.0 - 180;
     186        double lat = Math.toDegrees(Math.atan(Math.sinh(Math.PI - (2.0 * Math.PI * tile.y) / Math.pow(2.0, zoom))));
    187187        return new LatLon(lat, lon);
    188188    }
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ComparePairType.java

    r9212 r10378  
    2222     * compare my version of an {@link org.openstreetmap.josm.data.osm.OsmPrimitive} with the merged version
    2323     */
    24     MY_WITH_MERGED(tr("My with Merged"),  new ListRole[] {MY_ENTRIES, MERGED_ENTRIES}),
     24    MY_WITH_MERGED(tr("My with Merged"), new ListRole[] {MY_ENTRIES, MERGED_ENTRIES}),
    2525
    2626    /**
    2727     * compare their version of an {@link org.openstreetmap.josm.data.osm.OsmPrimitive} with the merged veresion
    2828     */
    29     THEIR_WITH_MERGED(tr("Their with Merged"),  new ListRole[] {THEIR_ENTRIES, MERGED_ENTRIES});
     29    THEIR_WITH_MERGED(tr("Their with Merged"), new ListRole[] {THEIR_ENTRIES, MERGED_ENTRIES});
    3030
    3131    /** the localized display name */
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java

    r9482 r10378  
    4848 *
    4949 */
    50 public class ConflictResolver extends JPanel implements PropertyChangeListener  {
     50public class ConflictResolver extends JPanel implements PropertyChangeListener {
    5151
    5252    /* -------------------------------------------------------------------------------------- */
     
    320320            this.resolvedCompletely =
    321321                tagMerger.getModel().isResolvedCompletely()
    322                 &&  propertiesMerger.getModel().isResolvedCompletely()
     322                && propertiesMerger.getModel().isResolvedCompletely()
    323323                && nodeListMerger.getModel().isFrozen();
    324         }  else if (my instanceof Relation) {
     324        } else if (my instanceof Relation) {
    325325            // resolve the version conflict if this is a relation, all tag
    326326            // conflicts and all conflicts in the member list
     
    329329            this.resolvedCompletely =
    330330                tagMerger.getModel().isResolvedCompletely()
    331                 &&  propertiesMerger.getModel().isResolvedCompletely()
     331                && propertiesMerger.getModel().isResolvedCompletely()
    332332                && relationMemberMerger.getModel().isFrozen();
    333333        }
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java

    r10210 r10378  
    199199        myEntriesSelectionModel = new EntriesSelectionModel(entries.get(MY_ENTRIES));
    200200        theirEntriesSelectionModel = new EntriesSelectionModel(entries.get(THEIR_ENTRIES));
    201         mergedEntriesSelectionModel =  new EntriesSelectionModel(entries.get(MERGED_ENTRIES));
     201        mergedEntriesSelectionModel = new EntriesSelectionModel(entries.get(MERGED_ENTRIES));
    202202
    203203        listeners = new HashSet<>();
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java

    r10364 r10378  
    783783     *
    784784     */
    785     private final class FreezeAction extends AbstractAction implements ItemListener, FreezeActionProperties  {
     785    private final class FreezeAction extends AbstractAction implements ItemListener, FreezeActionProperties {
    786786
    787787        private FreezeAction() {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMerger.java

    r10000 r10378  
    2525    @Override
    2626    protected JScrollPane buildMyElementsTable() {
    27         myEntriesTable  = new NodeListTable(
     27        myEntriesTable = new NodeListTable(
    2828                "table.mynodes",
    2929                model,
     
    3636    @Override
    3737    protected JScrollPane buildMergedElementsTable() {
    38         mergedEntriesTable  = new NodeListTable(
     38        mergedEntriesTable = new NodeListTable(
    3939                "table.mergednodes",
    4040                model,
     
    4747    @Override
    4848    protected JScrollPane buildTheirElementsTable() {
    49         theirEntriesTable  = new NodeListTable(
     49        theirEntriesTable = new NodeListTable(
    5050                "table.theirnodes",
    5151                model,
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java

    r10210 r10378  
    137137        }
    138138
    139         myDeletedState =  conflict.isMyDeleted() || my.isDeleted();
     139        myDeletedState = conflict.isMyDeleted() || my.isDeleted();
    140140        theirDeletedState = their.isDeleted();
    141141
     
    211211     * @return The state of deleted flag
    212212     */
    213     public  Boolean getTheirDeletedState() {
     213    public Boolean getTheirDeletedState() {
    214214        return theirDeletedState;
    215215    }
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMerger.java

    r10000 r10378  
    2525    @Override
    2626    protected JScrollPane buildMyElementsTable() {
    27         myEntriesTable  = new RelationMemberTable(
     27        myEntriesTable = new RelationMemberTable(
    2828                "table.mymembers",
    2929                model,
     
    3636    @Override
    3737    protected JScrollPane buildMergedElementsTable() {
    38         mergedEntriesTable  = new RelationMemberTable(
     38        mergedEntriesTable = new RelationMemberTable(
    3939                "table.mergedmembers",
    4040                model,
     
    4848    @Override
    4949    protected JScrollPane buildTheirElementsTable() {
    50         theirEntriesTable  = new RelationMemberTable(
     50        theirEntriesTable = new RelationMemberTable(
    5151                "table.theirmembers",
    5252                model,
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java

    r9078 r10378  
    2222 *
    2323 */
    24 public  class RelationMemberTableCellRenderer extends JLabel implements TableCellRenderer {
     24public class RelationMemberTableCellRenderer extends JLabel implements TableCellRenderer {
    2525    private final transient Border rowNumberBorder;
    2626
     
    101101     * @param row the row index
    102102     */
    103     protected  void renderRowId(int row) {
     103    protected void renderRowId(int row) {
    104104        setBorder(rowNumberBorder);
    105105        setText(Integer.toString(row+1));
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItem.java

    r9078 r10378  
    3232    public TagMergeItem(String key, String myTagValue, String theirTagValue) {
    3333        CheckParameterUtil.ensureParameterNotNull(key, "key");
    34         this.key  = key;
     34        this.key = key;
    3535        this.myTagValue = myTagValue;
    3636        this.theirTagValue = theirTagValue;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java

    r10308 r10378  
    386386     *
    387387     */
    388     class UndecideAction extends AbstractAction implements ListSelectionListener  {
     388    class UndecideAction extends AbstractAction implements ListSelectionListener {
    389389
    390390        UndecideAction() {
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java

    r10369 r10378  
    4343import org.openstreetmap.josm.tools.WindowGeometry;
    4444
    45 public class PasteTagsConflictResolverDialog extends JDialog  implements PropertyChangeListener {
     45public class PasteTagsConflictResolverDialog extends JDialog implements PropertyChangeListener {
    4646    static final Map<OsmPrimitiveType, String> PANE_TITLES;
    4747    static {
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java

    r9371 r10378  
    2727                    tr("Position {0} is out of range. Current number of members is {1}.", pos, relation.getMembersCount()));
    2828        this.relation = relation;
    29         this.pos  = pos;
     29        this.pos = pos;
    3030        this.originalPrimitive = member.getMember();
    3131        this.role = member.hasRole() ? member.getRole() : "";
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java

    r10369 r10378  
    234234     */
    235235    public void refreshView() {
    236         OsmDataLayer editLayer =  Main.main.getEditLayer();
     236        OsmDataLayer editLayer = Main.main.getEditLayer();
    237237        conflicts = editLayer == null ? new ConflictCollection() : editLayer.getConflicts();
    238238        GuiHelper.runInEDT(new Runnable() {
     
    433433        ResolveAction() {
    434434            putValue(NAME, tr("Resolve"));
    435             putValue(SHORT_DESCRIPTION,  tr("Open a merge dialog of all selected items in the list above."));
     435            putValue(SHORT_DESCRIPTION, tr("Open a merge dialog of all selected items in the list above."));
    436436            new ImageProvider("dialogs", "conflict").getResource().attachImageIcon(this, true);
    437437            putValue("help", ht("/Dialog/ConflictList#ResolveAction"));
     
    480480            this.type = type;
    481481            putValue(NAME, name);
    482             putValue(SHORT_DESCRIPTION,  description);
     482            putValue(SHORT_DESCRIPTION, description);
    483483        }
    484484
  • trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java

    r10308 r10378  
    162162        if (visible) {
    163163            new WindowGeometry(
    164                     getClass().getName()  + ".geometry",
     164                    getClass().getName() + ".geometry",
    165165                    WindowGeometry.centerInWindow(
    166166                            Main.parent,
  • trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java

    r10369 r10378  
    140140            {
    141141                putValue(NAME, tr("Add"));
    142                 putValue(SHORT_DESCRIPTION,  tr("Add filter."));
     142                putValue(SHORT_DESCRIPTION, tr("Add filter."));
    143143                new ImageProvider("dialogs", "add").getResource().attachImageIcon(this, true);
    144144            }
     
    410410    }
    411411
    412     private class EnableFilterAction extends AbstractFilterAction  {
     412    private class EnableFilterAction extends AbstractFilterAction {
    413413
    414414        EnableFilterAction() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java

    r10306 r10378  
    299299    }
    300300
    301     private JosmTextField  setupFilter() {
     301    private JosmTextField setupFilter() {
    302302        final JosmTextField f = new DisableShortcutsOnFocusGainedTextField();
    303303        f.setToolTipText(tr("Relation list filter"));
     
    411411
    412412        public void setRelations(Collection<Relation> relations) {
    413             List<Relation> sel =  getSelectedRelations();
     413            List<Relation> sel = getSelectedRelations();
    414414            this.relations.clear();
    415415            this.filteredRelations = null;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r10369 r10378  
    8888 * @since 8
    8989 */
    90 public class SelectionListDialog extends ToggleDialog  {
     90public class SelectionListDialog extends ToggleDialog {
    9191    private JList<OsmPrimitive> lstPrimitives;
    9292    private final DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
     
    298298        SearchAction() {
    299299            putValue(NAME, tr("Search"));
    300             putValue(SHORT_DESCRIPTION,   tr("Search for objects"));
     300            putValue(SHORT_DESCRIPTION, tr("Search for objects"));
    301301            new ImageProvider("dialogs", "search").getResource().attachImageIcon(this, true);
    302302            updateEnabledState();
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r10358 r10378  
    163163    protected JCheckBoxMenuItem windowMenuItem;
    164164
    165     private final JRadioButtonMenuItem alwaysShown  = new JRadioButtonMenuItem(new AbstractAction(tr("Always shown")) {
     165    private final JRadioButtonMenuItem alwaysShown = new JRadioButtonMenuItem(new AbstractAction(tr("Always shown")) {
    166166        @Override
    167167        public void actionPerformed(ActionEvent e) {
     
    170170    });
    171171
    172     private final JRadioButtonMenuItem dynamic      = new JRadioButtonMenuItem(new AbstractAction(tr("Dynamic")) {
     172    private final JRadioButtonMenuItem dynamic = new JRadioButtonMenuItem(new AbstractAction(tr("Dynamic")) {
    173173        @Override
    174174        public void actionPerformed(ActionEvent e) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java

    r10369 r10378  
    316316            if (primitives != null) {
    317317                for (Map.Entry<User, Integer> entry: statistics.entrySet()) {
    318                     data.add(new UserInfo(entry.getKey(), entry.getValue(), (double) entry.getValue() /  (double) primitives.size()));
     318                    data.add(new UserInfo(entry.getKey(), entry.getValue(), (double) entry.getValue() / (double) primitives.size()));
    319319                }
    320320            }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java

    r10369 r10378  
    140140            {
    141141                putValue(NAME, tr("Fix"));
    142                 putValue(SHORT_DESCRIPTION,  tr("Fix the selected issue."));
     142                putValue(SHORT_DESCRIPTION, tr("Fix the selected issue."));
    143143                new ImageProvider("dialogs", "fix").getResource().attachImageIcon(this, true);
    144144            }
     
    155155                {
    156156                    putValue(NAME, tr("Ignore"));
    157                     putValue(SHORT_DESCRIPTION,  tr("Ignore the selected issue next time."));
     157                    putValue(SHORT_DESCRIPTION, tr("Ignore the selected issue next time."));
    158158                    new ImageProvider("dialogs", "fix").getResource().attachImageIcon(this, true);
    159159                }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java

    r10124 r10378  
    7171public class ChangesetCacheManager extends JFrame {
    7272
     73    // CHECKSTYLE.OFF: SingleSpaceSeparator
    7374    /** The changeset download icon **/
    7475    public static final ImageIcon DOWNLOAD_CONTENT_ICON = ImageProvider.get("dialogs/changeset", "downloadchangesetcontent");
    7576    /** The changeset update icon **/
    7677    public static final ImageIcon UPDATE_CONTENT_ICON   = ImageProvider.get("dialogs/changeset", "updatechangesetcontent");
     78    // CHECKSTYLE.ON: SingleSpaceSeparator
    7779
    7880    /** the unique instance of the cache manager  */
     
    164166    protected JPanel buildChangesetDetailPanel() {
    165167        JPanel pnl = new JPanel(new BorderLayout());
    166         JTabbedPane tp =  new JTabbedPane();
     168        JTabbedPane tp = new JTabbedPane();
    167169        pnlChangesetDetailTabs = tp;
    168170
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanel.java

    r10332 r10378  
    5252public class ChangesetDetailPanel extends JPanel implements PropertyChangeListener, ChangesetAware {
    5353
     54    // CHECKSTYLE.OFF: SingleSpaceSeparator
    5455    private final JosmTextField tfID        = new JosmTextField(10);
    5556    private final JosmTextArea  taComment   = new JosmTextArea(5, 40);
     
    6465    private final SelectInCurrentLayerAction     actSelectInCurrentLayer     = new SelectInCurrentLayerAction();
    6566    private final ZoomInCurrentLayerAction       actZoomInCurrentLayerAction = new ZoomInCurrentLayerAction();
     67    // CHECKSTYLE.ON: SingleSpaceSeparator
    6668
    6769    private transient Changeset currentChangeset;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/SingleChangesetDownloadPanel.java

    r10179 r10378  
    9292            if (id == 0)
    9393                return;
    94             ChangesetContentDownloadTask task =  new ChangesetContentDownloadTask(
     94            ChangesetContentDownloadTask task = new ChangesetContentDownloadTask(
    9595                    SingleChangesetDownloadPanel.this,
    9696                    Collections.singleton(id)
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java

    r10179 r10378  
    6666    protected JPanel buildQueryPanel() {
    6767        ItemListener stateChangeHandler = new RestrictionGroupStateChangeHandler();
    68         JPanel pnl  = new VerticallyScrollablePanel(new GridBagLayout());
     68        JPanel pnl = new VerticallyScrollablePanel(new GridBagLayout());
    6969        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    7070        GridBagConstraints gc = new GridBagConstraints();
     
    449449
    450450            gc.gridx = 1;
    451             gc.fill =  GridBagConstraints.HORIZONTAL;
     451            gc.fill = GridBagConstraints.HORIZONTAL;
    452452            gc.weightx = 1.0;
    453453            add(lblRestrictedToMyself, gc);
     
    461461
    462462            gc.gridx = 1;
    463             gc.fill =  GridBagConstraints.HORIZONTAL;
     463            gc.fill = GridBagConstraints.HORIZONTAL;
    464464            gc.weightx = 1.0;
    465465            add(new JMultilineLabel(tr("Only changesets owned by the user with the following user ID")), gc);
     
    467467            gc.gridx = 1;
    468468            gc.gridy = 2;
    469             gc.fill =  GridBagConstraints.HORIZONTAL;
     469            gc.fill = GridBagConstraints.HORIZONTAL;
    470470            gc.weightx = 1.0;
    471471            add(buildUidInputPanel(), gc);
     
    530530                            tr("Cannot restrict changeset query to the current user because the current user is anonymous"));
    531531            } else if (rbRestrictToUid.isSelected()) {
    532                 int uid  = valUid.getUid();
     532                int uid = valUid.getUid();
    533533                if (uid > 0) {
    534534                    query.forUser(uid);
     
    985985        @Override
    986986        public void validate() {
    987             String value  = getComponent().getText();
     987            String value = getComponent().getText();
    988988            if (value == null || value.trim().isEmpty()) {
    989989                feedbackInvalid("");
     
    10041004
    10051005        public int getUid() {
    1006             String value  = getComponent().getText();
     1006            String value = getComponent().getText();
    10071007            if (value == null || value.trim().isEmpty()) return 0;
    10081008            try {
     
    10431043        public String getStandardTooltipText() {
    10441044            Date date = new Date();
    1045             return  tr(
     1045            return tr(
    10461046                    "Please enter a date in the usual format for your locale.<br>"
    10471047                    + "Example: {0}<br>"
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java

    r10179 r10378  
    188188    public void restoreFromPreferences() {
    189189        BasicQuery q;
    190         String value =  Main.pref.get("changeset-query.basic.query", null);
     190        String value = Main.pref.get("changeset-query.basic.query", null);
    191191        if (value == null) {
    192192            q = BasicQuery.MOST_RECENT_CHANGESETS;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java

    r10294 r10378  
    4646        gc.weightx = 0.0;
    4747        gc.fill = GridBagConstraints.HORIZONTAL;
    48         gc.insets  = new Insets(0, 0, 0, 5);
     48        gc.insets = new Insets(0, 0, 0, 5);
    4949        pnl.add(new JLabel(tr("URL: ")), gc);
    5050
  • trunk/src/org/openstreetmap/josm/gui/dialogs/layer/MergeAction.java

    r10144 r10378  
    8787            if (model.getSelectedLayers().isEmpty()) {
    8888                setEnabled(false);
    89             } else  if (model.getSelectedLayers().size() > 1) {
     89            } else if (model.getSelectedLayers().size() > 1) {
    9090                setEnabled(supportLayers(model.getSelectedLayers()));
    9191            } else {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/layer/MoveUpAction.java

    r10144 r10378  
    1414 * The action to move up the currently selected entries in the list.
    1515 */
    16 public class MoveUpAction extends AbstractAction implements  IEnabledStateUpdating {
     16public class MoveUpAction extends AbstractAction implements IEnabledStateUpdating {
    1717    private final LayerListModel model;
    1818
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r10352 r10378  
    383383            @Override
    384384            public Component getListCellRendererComponent(JList<? extends AutoCompletionListItem> list,
    385                     AutoCompletionListItem value, int index, boolean isSelected,  boolean cellHasFocus) {
     385                    AutoCompletionListItem value, int index, boolean isSelected, boolean cellHasFocus) {
    386386                Component c = def.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
    387387                if (c instanceof JLabel) {
     
    602602        }
    603603
    604         public void selectValuesCombobox()   {
     604        public void selectValuesCombobox() {
    605605            selectACComboBoxSavingUnixBuffer(values);
    606606        }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java

    r10212 r10378  
    159159     */
    160160    protected Dialog getParentDialog() {
    161         Component c  = this;
     161        Component c = this;
    162162        while (c != null && !(c instanceof Dialog)) {
    163163            c = c.getParent();
     
    389389                if (!visitor.getConflicts().isEmpty()) {
    390390                    getLayer().getConflicts().add(visitor.getConflicts());
    391                     conflictsCount +=  visitor.getConflicts().size();
     391                    conflictsCount += visitor.getConflicts().size();
    392392                }
    393393            }
     
    453453                if (!visitor.getConflicts().isEmpty()) {
    454454                    getLayer().getConflicts().add(visitor.getConflicts());
    455                     conflictsCount +=  visitor.getConflicts().size();
     455                    conflictsCount += visitor.getConflicts().size();
    456456                }
    457457            }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java

    r10217 r10378  
    106106 * @since 343
    107107 */
    108 public class GenericRelationEditor extends RelationEditor  {
     108public class GenericRelationEditor extends RelationEditor {
    109109    /** the tag table and its model */
    110110    private final TagEditorPanel tagEditorPanel;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java

    r10308 r10378  
    126126            y1 = 7;
    127127
    128             int[] xValues  = {xoff - xowloop + 1, xoff - xowloop + 1, xoff};
    129             int[] yValues  = {ymax, y1+1, 1};
     128            int[] xValues = {xoff - xowloop + 1, xoff - xowloop + 1, xoff};
     129            int[] yValues = {ymax, y1+1, 1};
    130130            g.drawPolyline(xValues, yValues, 3);
    131131            unsetDotted(g);
     
    137137            y2 = ymax - 7;
    138138
    139             int[] xValues  = {xoff+1, xoff - xowloop + 1, xoff - xowloop + 1};
    140             int[] yValues  = {ymax-1, y2, y1};
     139            int[] xValues = {xoff+1, xoff - xowloop + 1, xoff - xowloop + 1};
     140            int[] yValues = {ymax-1, y2, y1};
    141141            g.drawPolyline(xValues, yValues, 3);
    142142            unsetDotted(g);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowser.java

    r10179 r10378  
    180180        @Override
    181181        public void mouseClicked(MouseEvent e) {
    182             if (e.getClickCount() == 2)  {
     182            if (e.getClickCount() == 2) {
    183183                editAction.run();
    184184            }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java

    r10212 r10378  
    8888        @Override
    8989        public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
    90             TreePath path  = event.getPath();
     90            TreePath path = event.getPath();
    9191            Relation parent = (Relation) event.getPath().getLastPathComponent();
    9292            if (!parent.isIncomplete() || parent.isNew())
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableColumnModel.java

    r10089 r10378  
    1212 * @since 1790
    1313 */
    14 public class SelectionTableColumnModel  extends DefaultTableColumnModel {
     14public class SelectionTableColumnModel extends DefaultTableColumnModel {
    1515
    1616    /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java

    r10345 r10378  
    7474    @Override
    7575    public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) {
    76         if (e.getPreviousActiveLayer()  == layer) {
     76        if (e.getPreviousActiveLayer() == layer) {
    7777            cache.clear();
    7878        }
  • trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java

    r10179 r10378  
    8181        JPanel pnl = new JPanel(new GridBagLayout());
    8282
    83         GridBagConstraints  gc = new GridBagConstraints();
     83        GridBagConstraints gc = new GridBagConstraints();
    8484        gc.anchor = GridBagConstraints.NORTHWEST;
    8585        gc.insets = new Insets(5, 5, 5, 5);
  • trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java

    r9606 r10378  
    307307
    308308        protected void refreshBounds() {
    309             Bounds  b = build();
     309            Bounds b = build();
    310310            parent.boundingBoxChanged(b, BoundingBoxSelection.this);
    311311        }
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java

    r10212 r10378  
    5454 * Dialog displayed to download OSM and/or GPS data from OSM server.
    5555 */
    56 public class DownloadDialog extends JDialog  {
     56public class DownloadDialog extends JDialog {
    5757    /** the unique instance of the download dialog */
    5858    private static DownloadDialog instance;
     
    169169        pnl.add(cbStartup, GBC.std().anchor(GBC.WEST).insets(15, 5, 5, 5));
    170170
    171         pnl.add(sizeCheck,  GBC.eol().anchor(GBC.EAST).insets(5, 5, 5, 2));
     171        pnl.add(sizeCheck, GBC.eol().anchor(GBC.EAST).insets(5, 5, 5, 2));
    172172
    173173        if (!ExpertToggleAction.isExpert()) {
    174             JLabel infoLabel  = new JLabel(
     174            JLabel infoLabel = new JLabel(
    175175                    tr("Use left click&drag to select area, arrows or right mouse button to scroll map, wheel or +/- to zoom."));
    176176            pnl.add(infoLabel, GBC.eol().anchor(GBC.SOUTH).insets(0, 0, 0, 0));
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadObjectDialog.java

    r8061 r10378  
    2424public class DownloadObjectDialog extends OsmIdSelectionDialog {
    2525
     26    // CHECKSTYLE.OFF: SingleSpaceSeparator
    2627    protected final JCheckBox referrers = new JCheckBox(tr("Download referrers (parent relations)"));
    2728    protected final JCheckBox fullRel   = new JCheckBox(tr("Download relation members"));
    2829    protected final JCheckBox newLayer  = new JCheckBox(tr("Separate Layer"));
     30    // CHECKSTYLE.ON: SingleSpaceSeparator
    2931
    3032    /**
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadSelection.java

    r9243 r10378  
    44import org.openstreetmap.josm.data.Bounds;
    55
    6 public interface DownloadSelection  {
     6public interface DownloadSelection {
    77
    88    /**
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java

    r10345 r10378  
    306306        if (reference.getId() != history.getId())
    307307            throw new IllegalArgumentException(
    308                     tr("Failed to set reference. Reference ID {0} does not match history ID {1}.", reference.getId(),  history.getId()));
     308                    tr("Failed to set reference. Reference ID {0} does not match history ID {1}.", reference.getId(), history.getId()));
    309309        HistoryOsmPrimitive primitive = history.getByVersion(reference.getVersion());
    310310        if (primitive == null)
     
    337337        if (current.getId() != history.getId())
    338338            throw new IllegalArgumentException(
    339                     tr("Failed to set reference. Reference ID {0} does not match history ID {1}.", current.getId(),  history.getId()));
     339                    tr("Failed to set reference. Reference ID {0} does not match history ID {1}.", current.getId(), history.getId()));
    340340        HistoryOsmPrimitive primitive = history.getByVersion(current.getVersion());
    341341        if (primitive == null)
     
    374374     * @throws IllegalArgumentException if type is null
    375375     */
    376     public HistoryOsmPrimitive getPointInTime(PointInTimeType type)  {
     376    public HistoryOsmPrimitive getPointInTime(PointInTimeType type) {
    377377        CheckParameterUtil.ensureParameterNotNull(type, "type");
    378378        if (type.equals(PointInTimeType.CURRENT_POINT_IN_TIME))
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r10210 r10378  
    194194
    195195    protected static String getUserUrl(String username) {
    196         return Main.getBaseUserUrl() + '/' +  Utils.encodeUrl(username).replaceAll("\\+", "%20");
     196        return Main.getBaseUserUrl() + '/' + Utils.encodeUrl(username).replaceAll("\\+", "%20");
    197197    }
    198198
  • trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java

    r10217 r10378  
    115115        String lbl;
    116116        switch(primitiveType) {
    117         case NODE: lbl =  tr("Synchronize node {0} only", id); break;
    118         case WAY: lbl =  tr("Synchronize way {0} only", id); break;
    119         case RELATION: lbl =  tr("Synchronize relation {0} only", id); break;
     117        // CHECKSTYLE.OFF: SingleSpaceSeparator
     118        case NODE:     lbl = tr("Synchronize node {0} only", id); break;
     119        case WAY:      lbl = tr("Synchronize way {0} only", id); break;
     120        case RELATION: lbl = tr("Synchronize relation {0} only", id); break;
     121        // CHECKSTYLE.ON: SingleSpaceSeparator
    120122        default: throw new AssertionError();
    121123        }
     
    140142                )
    141143        };
    142         String msg =  tr("<html>Uploading <strong>failed</strong> because the server has a newer version of one<br>"
     144        String msg = tr("<html>Uploading <strong>failed</strong> because the server has a newer version of one<br>"
    143145                + "of your nodes, ways, or relations.<br>"
    144146                + "The conflict is caused by the <strong>{0}</strong> with id <strong>{1}</strong>,<br>"
     
    188190                )
    189191        };
    190         String msg =  tr("<html>Uploading <strong>failed</strong> because the server has a newer version of one<br>"
     192        String msg = tr("<html>Uploading <strong>failed</strong> because the server has a newer version of one<br>"
    191193                + "of your nodes, ways, or relations.<br>"
    192194                + "<br>"
     
    217219     */
    218220    protected void handleUploadConflictForClosedChangeset(long changesetId, Date d) {
    219         String msg =  tr("<html>Uploading <strong>failed</strong> because you have been using<br>"
     221        String msg = tr("<html>Uploading <strong>failed</strong> because you have been using<br>"
    220222                + "changeset {0} which was already closed at {1}.<br>"
    221223                + "Please upload again with a new or an existing open changeset.</html>",
  • trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java

    r10217 r10378  
    184184     */
    185185    public void setSelectedChangesetForNextUpload(Changeset cs) {
    186         int idx  = model.getIndexOf(cs);
     186        int idx = model.getIndexOf(cs);
    187187        if (idx >= 0) {
    188188            rbExisting.setSelected(true);
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayerTask.java

    r10212 r10378  
    4141            monitor = NullProgressMonitor.INSTANCE;
    4242        }
    43         this.layerInfo =  layerInfo;
     43        this.layerInfo = layerInfo;
    4444        this.parentMonitor = monitor;
    4545    }
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java

    r10212 r10378  
    324324    }
    325325
    326     class DiscardAndProceedAction extends AbstractAction  implements PropertyChangeListener {
     326    class DiscardAndProceedAction extends AbstractAction implements PropertyChangeListener {
    327327        DiscardAndProceedAction() {
    328328            initForDiscardAndExit();
     
    414414            BufferedImage newIco = new BufferedImage(ICON_SIZE*3, ICON_SIZE, BufferedImage.TYPE_4BYTE_ABGR);
    415415            Graphics2D g = newIco.createGraphics();
     416            // CHECKSTYLE.OFF: SingleSpaceSeparator
    416417            g.drawImage(model.getLayersToUpload().isEmpty() ? upldDis : upld, ICON_SIZE*0, 0, ICON_SIZE, ICON_SIZE, null);
    417418            g.drawImage(model.getLayersToSave().isEmpty()   ? saveDis : save, ICON_SIZE*1, 0, ICON_SIZE, ICON_SIZE, null);
    418419            g.drawImage(base,                                                 ICON_SIZE*2, 0, ICON_SIZE, ICON_SIZE, null);
     420            // CHECKSTYLE.ON: SingleSpaceSeparator
    419421            putValue(SMALL_ICON, new ImageIcon(newIco));
    420422        }
  • trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java

    r9986 r10378  
    220220        // partially uploaded. Better run on EDT.
    221221        //
    222         Runnable r  = new Runnable() {
     222        Runnable r = new Runnable() {
    223223            @Override
    224224            public void run() {
  • trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java

    r10369 r10378  
    154154
    155155    public List<OsmPrimitive> getSelectedPrimitives() {
    156         List<OsmPrimitive> ret  = new ArrayList<>();
     156        List<OsmPrimitive> ret = new ArrayList<>();
    157157        ret.addAll(lstSelectedPrimitives.getOsmPrimitiveListModel().getPrimitives(lstSelectedPrimitives.getSelectedIndices()));
    158158        ret.addAll(lstDeletedPrimitives.getOsmPrimitiveListModel().getPrimitives(lstDeletedPrimitives.getSelectedIndices()));
  • trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySpecification.java

    r9841 r10378  
    1515 * </ul>
    1616 */
    17 public class UploadStrategySpecification  {
     17public class UploadStrategySpecification {
    1818    /** indicates that the chunk size isn't specified */
    1919    public static final int UNSPECIFIED_CHUNK_SIZE = -1;
  • trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java

    r8836 r10378  
    134134     * @return the number of objects to upload
    135135     */
    136     public int  getNumObjectsToUpload() {
     136    public int getNumObjectsToUpload() {
    137137        return lstAdd.getModel().getSize()
    138138        + lstUpdate.getModel().getSize()
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java

    r10345 r10378  
    15291529                }
    15301530                Tile t2 = tempCornerTile(missed);
    1531                 LatLon topLeft2  = new LatLon(tileSource.tileXYToLatLon(missed));
     1531                LatLon topLeft2 = new LatLon(tileSource.tileXYToLatLon(missed));
    15321532                LatLon botRight2 = new LatLon(tileSource.tileXYToLatLon(t2));
    15331533                TileSet ts2 = new TileSet(topLeft2, botRight2, newzoom);
     
    16221622                continue;
    16231623            }
    1624             clickedTile  = t1;
     1624            clickedTile = t1;
    16251625            break;
    16261626        }
  • trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java

    r10304 r10378  
    338338        private static float[] KERNEL_SHARPEN = new float[] {
    339339            -.5f, -1f, -.5f,
    340              -1f,  7, -1f,
     340             -1f, 7, -1f,
    341341            -.5f, -1f, -.5f
    342342        };
     
    531531
    532532        private byte mix(int color, double luminosity) {
    533             int val = (int) (colorfulness * color +  (1 - colorfulness) * luminosity);
     533            int val = (int) (colorfulness * color + (1 - colorfulness) * luminosity);
    534534            if (val < 0) {
    535535                return 0;
  • trunk/src/org/openstreetmap/josm/gui/layer/Layer.java

    r10371 r10378  
    175175                memoryBytesRequired += layer.estimateMemoryUsage();
    176176            }
    177             if (memoryBytesRequired >  Runtime.getRuntime().maxMemory()) {
     177            if (memoryBytesRequired > Runtime.getRuntime().maxMemory()) {
    178178                throw new IllegalArgumentException(
    179179                        tr("To add another layer you need to allocate at least {0,number,#}MB memory to JOSM using -Xmx{0,number,#}M "
     
    336336    public void setVisible(boolean visible) {
    337337        boolean oldValue = isVisible();
    338         this.visible  = visible;
     338        this.visible = visible;
    339339        if (visible && opacity == 0) {
    340340            setOpacity(1);
  • trunk/src/org/openstreetmap/josm/gui/layer/NativeScaleLayer.java

    r10306 r10378  
    8080     * List of scales, may include intermediate steps between native resolutions
    8181     */
    82     class ScaleList  {
     82    class ScaleList {
    8383        private final List<Scale> scales = new ArrayList<>();
    8484
  • trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java

    r9983 r10378  
    3636 */
    3737public class WMSLayer extends AbstractCachedTileSourceLayer<TemplatedWMSTileSource> {
    38     private static final String PREFERENCE_PREFIX   = "imagery.wms.";
     38    private static final String PREFERENCE_PREFIX = "imagery.wms.";
    3939
    4040    /** default tile size for WMS Layer */
     
    108108        return supportedProjections == null || supportedProjections.isEmpty() || supportedProjections.contains(proj.toCode()) ||
    109109                (info.isEpsg4326To3857Supported() && supportedProjections.contains("EPSG:4326")
    110                         &&  "EPSG:3857".equals(Main.getProjection().toCode()));
     110                        && "EPSG:3857".equals(Main.getProjection().toCode()));
    111111    }
    112112
     
    170170
    171171    private boolean isReprojectionPossible() {
    172         return supportedProjections.contains("EPSG:4326") &&  "EPSG:3857".equals(Main.getProjection().toCode());
     172        return supportedProjections.contains("EPSG:4326") && "EPSG:3857".equals(Main.getProjection().toCode());
    173173    }
    174174}
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r10364 r10378  
    764764    private final transient StatusBarUpdater statusBarUpdaterWithRepaint = new StatusBarUpdater(true);
    765765
    766     private class StatusBarUpdater implements  DocumentListener, ItemListener, ActionListener {
     766    private class StatusBarUpdater implements DocumentListener, ItemListener, ActionListener {
    767767        private final boolean doRepaint;
    768768
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/DateFilterPanel.java

    r9243 r10378  
    2525    private final DateEditorWithSlider dateFrom = new DateEditorWithSlider(tr("From"));
    2626    private final DateEditorWithSlider dateTo = new DateEditorWithSlider(tr("To"));
    27     private final JCheckBox noTimestampCb  = new JCheckBox(tr("No timestamp"));
     27    private final JCheckBox noTimestampCb = new JCheckBox(tr("No timestamp"));
    2828    private final transient GpxLayer layer;
    2929
     
    7777
    7878    private final Timer t = new Timer(200, new ActionListener() {
    79         @Override  public void actionPerformed(ActionEvent e) {
     79        @Override public void actionPerformed(ActionEvent e) {
    8080            applyFilter();
    8181        }
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java

    r10364 r10378  
    156156                if (!mousePressedInButton)
    157157                    return;
    158                 mousePressed  = true;
     158                mousePressed = true;
    159159                if (isVisible()) {
    160160                    invalidate();
  • trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java

    r10308 r10378  
    197197            for (OsmPrimitive referrer : osm.getReferrers()) {
    198198                Relation r = (Relation) referrer;
    199                 if (!drawMultipolygon || !r.isMultipolygon()  || !r.isUsable()) {
     199                if (!drawMultipolygon || !r.isMultipolygon() || !r.isUsable()) {
    200200                    continue;
    201201                }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java

    r10374 r10378  
    9191        BasicStroke myLine = line, myDashLine = dashesLine;
    9292        if (realWidth > 0 && paintSettings.isUseRealWidth() && !showOrientation) {
    93             float myWidth = (int) (100 /  (float) (painter.getCircum() / realWidth));
     93            float myWidth = (int) (100 / (float) (painter.getCircum() / realWidth));
    9494            if (myWidth < line.getLineWidth()) {
    9595                myWidth = line.getLineWidth();
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/MapImage.java

    r9371 r10378  
    211211
    212212    private boolean mustRescale(Image image) {
    213         return autoRescale && width  == -1 && image.getWidth(null) > MAX_SIZE
     213        return autoRescale && width == -1 && image.getWidth(null) > MAX_SIZE
    214214             && height == -1 && image.getHeight(null) > MAX_SIZE;
    215215    }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/NodeElement.java

    r10305 r10378  
    6060                return false;
    6161            final Symbol other = (Symbol) obj;
    62             return  symbol == other.symbol &&
     62            return symbol == other.symbol &&
    6363                    size == other.size &&
    6464                    Objects.equals(stroke, other.stroke) &&
  • trunk/src/org/openstreetmap/josm/gui/oauth/AbstractAuthorizationUI.java

    r10189 r10378  
    9090     * @return the retrieved Access Token
    9191     */
    92     public  OAuthToken getAccessToken() {
     92    public OAuthToken getAccessToken() {
    9393        return accessToken;
    9494    }
  • trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java

    r10369 r10378  
    128128
    129129        // OAuth in a nutshell ...
    130         gc.gridy  = 1;
     130        gc.gridy = 1;
    131131        gc.insets = new Insets(5, 0, 0, 5);
    132132        HtmlPanel pnlMessage = new HtmlPanel();
    133133        pnlMessage.setText("<html><body>"
    134134                + tr("With OAuth you grant JOSM the right to upload map data and GPS tracks "
    135                         + "on your behalf (<a href=\"{0}\">more info...</a>).",  "http://oauth.net/")
     135                        + "on your behalf (<a href=\"{0}\">more info...</a>).", "http://oauth.net/")
    136136                        + "</body></html>"
    137137        );
     
    140140
    141141        // the authorisation procedure
    142         gc.gridy  = 2;
     142        gc.gridy = 2;
    143143        gc.gridwidth = 1;
    144144        gc.weightx = 0.0;
  • trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java

    r10223 r10378  
    362362        } catch (IOException e) {
    363363            throw new OsmOAuthAuthorizationException(e);
    364         }  finally {
     364        } finally {
    365365            synchronized (this) {
    366366                connection = null;
  • trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java

    r10369 r10378  
    400400            );
    401401            executor.execute(task);
    402             Runnable r  = new Runnable() {
     402            Runnable r = new Runnable() {
    403403                @Override
    404404                public void run() {
     
    437437            );
    438438            executor.execute(task);
    439             Runnable r  = new Runnable() {
     439            Runnable r = new Runnable() {
    440440                @Override
    441441                public void run() {
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java

    r10362 r10378  
    545545
    546546    @SuppressWarnings("unchecked")
    547     public <T>  T getSetting(Class<? extends T> clazz) {
     547    public <T> T getSetting(Class<? extends T> clazz) {
    548548        for (PreferenceSetting setting:settings) {
    549549            if (clazz.isAssignableFrom(setting.getClass()))
  • trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

    r10212 r10378  
    398398    }
    399399
    400     private class ToolbarPopupMenu extends JPopupMenu  {
     400    private class ToolbarPopupMenu extends JPopupMenu {
    401401        private transient ActionDefinition act;
    402402
     
    11371137        long paramCode = 0;
    11381138        if (action.hasParameters()) {
    1139             paramCode =  action.parameters.hashCode();
     1139            paramCode = action.parameters.hashCode();
    11401140        }
    11411141
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java

    r10217 r10378  
    6060    private final JRadioButton colorTypeTime = new JRadioButton(tr("Track date"));
    6161    private final JRadioButton colorTypeNone = new JRadioButton(tr("Single Color (can be customized for named layers)"));
    62     private final JRadioButton colorTypeGlobal  = new JRadioButton(tr("Use global settings"));
     62    private final JRadioButton colorTypeGlobal = new JRadioButton(tr("Use global settings"));
    6363    private final JosmComboBox<String> colorTypeVelocityTune = new JosmComboBox<>(new String[] {tr("Car"), tr("Bicycle"), tr("Foot")});
    6464    private final JCheckBox makeAutoMarkers = new JCheckBox(tr("Create markers when reading GPX"));
     
    359359            int colorType = Main.pref.getInteger("draw.rawgps.colors", layerName, 0);
    360360            switch (colorType) {
    361             case 0: colorTypeNone.setSelected(true);   break;
    362             case 1: colorTypeVelocity.setSelected(true);  break;
    363             case 2: colorTypeDilution.setSelected(true);  break;
     361            case 0: colorTypeNone.setSelected(true); break;
     362            case 1: colorTypeVelocity.setSelected(true); break;
     363            case 2: colorTypeDilution.setSelected(true); break;
    364364            case 3: colorTypeDirection.setSelected(true); break;
    365             case 4: colorTypeTime.setSelected(true);  break;
     365            case 4: colorTypeTime.setSelected(true); break;
    366366            default: Main.warn("Unknown color type: " + colorType);
    367367            }
     
    397397        } else {
    398398            if (layerName == null || !locLayer) {
    399                 Main.pref.put("draw.rawgps.lines" +  layerNameDot, drawRawGpsLinesAll.isSelected());
     399                Main.pref.put("draw.rawgps.lines" + layerNameDot, drawRawGpsLinesAll.isSelected());
    400400                Main.pref.put("draw.rawgps.max-line-length" + layerNameDot, drawRawGpsMaxLineLength.getText());
    401401            }
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java

    r10114 r10378  
    101101                                errorMessage = tr("<html>Tagging preset source {0} can be loaded but it contains errors. " +
    102102                                        "Do you really want to use it?<br><br><table width=600>Error is: {1}</table></html>",
    103                                         source,  e.getMessage());
     103                                        source, e.getMessage());
    104104                            } else {
    105105                                errorMessage = tr("<html>Unable to parse tagging preset source: {0}. " +
     
    127127                sources.removeSources(sourcesToRemove);
    128128                return true;
    129             }  else {
     129            } else {
    130130                return true;
    131131            }
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java

    r10137 r10378  
    198198        JPanel pnl = new JPanel(new BorderLayout());
    199199        pnl.add(buildSearchFieldPanel(), BorderLayout.NORTH);
    200         model  = new PluginPreferencesModel();
     200        model = new PluginPreferencesModel();
    201201        pnlPluginPreferences = new PluginListPanel(model);
    202202        spPluginPreferences = GuiHelper.embedInVerticalScrollPane(pnlPluginPreferences);
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java

    r10179 r10378  
    147147            }
    148148            model.fireContentsChanged();
    149             int idx =  filteredData.indexOf(lastCode);
     149            int idx = filteredData.indexOf(lastCode);
    150150            if (idx == -1) {
    151151                selectionList.clearSelection();
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java

    r8510 r10378  
    1515 */
    1616public class OAuthAccessTokenHolder {
    17     private  static OAuthAccessTokenHolder instance;
     17    private static OAuthAccessTokenHolder instance;
    1818
    1919    /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java

    r10294 r10378  
    8585        gc.weightx = 1.0;
    8686        gc.insets = new Insets(0, 0, 0, 0);
    87         gc.gridwidth  = 4;
     87        gc.gridwidth = 4;
    8888        add(buildDefaultServerUrlPanel(), gc);
    8989
     
    124124     */
    125125    public void initFromPreferences() {
    126         String url =  OsmApi.getOsmApi().getServerUrl();
     126        String url = OsmApi.getOsmApi().getServerUrl();
    127127        tfOsmServerUrl.setPossibleItems(SERVER_URL_HISTORY.get());
    128128        if (OsmApi.DEFAULT_API_URL.equals(url.trim())) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java

    r10134 r10378  
    6666    private static final String SHIFT = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A,
    6767            KeyEvent.SHIFT_DOWN_MASK).getModifiers());
    68     private static final String CTRL  = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A,
     68    private static final String CTRL = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A,
    6969            KeyEvent.CTRL_DOWN_MASK).getModifiers());
    70     private static final String ALT   = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A,
     70    private static final String ALT = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A,
    7171            KeyEvent.ALT_DOWN_MASK).getModifiers());
    72     private static final String META  = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A,
     72    private static final String META = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A,
    7373            KeyEvent.META_DOWN_MASK).getModifiers());
    7474
     
    246246    private JPanel buildFilterPanel() {
    247247        // copied from PluginPreference
    248         JPanel pnl  = new JPanel(new GridBagLayout());
     248        JPanel pnl = new JPanel(new GridBagLayout());
    249249        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    250250        GridBagConstraints gc = new GridBagConstraints();
  • trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreference.java

    r9506 r10378  
    144144            List<ExtendedSourceEntry> def = new ArrayList<>();
    145145
     146            // CHECKSTYLE.OFF: SingleSpaceSeparator
    146147            addDefault(def, "addresses",    tr("Addresses"),           tr("Checks for errors on addresses"));
    147148            addDefault(def, "combinations", tr("Tag combinations"),    tr("Checks for missing tag or suspicious combinations"));
     
    155156            addDefault(def, "unnecessary",  tr("Unnecessary tags"),    tr("Checks for unnecessary tags"));
    156157            addDefault(def, "wikipedia",    tr("Wikipedia"),           tr("Checks for wrong wikipedia tags"));
     158            // CHECKSTYLE.ON: SingleSpaceSeparator
    157159
    158160            return def;
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagCellRenderer.java

    r9078 r10378  
    1919 *
    2020 */
    21 public class TagCellRenderer extends JLabel implements TableCellRenderer  {
     21public class TagCellRenderer extends JLabel implements TableCellRenderer {
    2222    private final Font fontStandard;
    2323    private final Font fontItalic;
     
    5454        } else if (tag.getValueCount() == 1) {
    5555            setText(tag.getValues().get(0));
    56         } else if (tag.getValueCount() >  1) {
     56        } else if (tag.getValueCount() > 1) {
    5757            setText(tr("multiple"));
    5858            setFont(fontItalic);
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java

    r10369 r10378  
    4949 * @since 1762
    5050 */
    51 public class TagTable extends JosmTable  {
     51public class TagTable extends JosmTable {
    5252    /** the table cell editor used by this table */
    5353    private TagCellEditor editor;
     
    7070     *   last cell in the table</li>
    7171     * </ul>
    72      *
    73      */
    74     class SelectNextColumnCellAction extends AbstractAction  {
     72     */
     73    class SelectNextColumnCellAction extends AbstractAction {
    7574        @Override
    7675        public void actionPerformed(ActionEvent e) {
     
    116115     * Action to be run when the user navigates to the previous cell in the table,
    117116     * for instance by pressing Shift-TAB
    118      *
    119      */
    120     class SelectPreviousColumnCellAction extends AbstractAction  {
     117     */
     118    class SelectPreviousColumnCellAction extends AbstractAction {
    121119
    122120        @Override
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionItemPriority.java

    r10228 r10378  
    3333     * Indicates that this is a value from a selected object.
    3434     */
    35     public static final AutoCompletionItemPriority  IS_IN_SELECTION = new AutoCompletionItemPriority(false, false, true);
     35    public static final AutoCompletionItemPriority IS_IN_SELECTION = new AutoCompletionItemPriority(false, false, true);
    3636
    3737    /** Unknown priority. This is the lowest priority. */
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionListItem.java

    r8510 r10378  
    2020
    2121    /** the pritority of this item */
    22     private  AutoCompletionItemPriority priority;
     22    private AutoCompletionItemPriority priority;
    2323    /** the value of this item */
    2424    private String value;
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReader.java

    r10254 r10378  
    357357    public static Collection<TaggingPreset> readAll(Collection<String> sources, boolean validate, boolean displayErrMsg) {
    358358        HashSetWithLast<TaggingPreset> allPresets = new HashSetWithLast<>();
    359         for (String source : sources)  {
     359        for (String source : sources) {
    360360            try {
    361361                readAll(source, validate, allPresets);
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java

    r10300 r10378  
    6262
    6363    private static final BooleanProperty SEARCH_IN_TAGS = new BooleanProperty("taggingpreset.dialog.search-in-tags", true);
    64     private static final BooleanProperty ONLY_APPLICABLE  = new BooleanProperty("taggingpreset.dialog.only-applicable-to-selection", true);
     64    private static final BooleanProperty ONLY_APPLICABLE = new BooleanProperty("taggingpreset.dialog.only-applicable-to-selection", true);
    6565
    6666    private final JCheckBox ckOnlyApplicable;
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java

    r9996 r10378  
    8080        }
    8181        if (usage.unused()) {
    82             if (auto_increment_selected != 0  && auto_increment != null) {
     82            if (auto_increment_selected != 0 && auto_increment != null) {
    8383                try {
    8484                    textField.setText(Integer.toString(Integer.parseInt(
  • trunk/src/org/openstreetmap/josm/gui/util/AdjustmentSynchronizer.java

    r10217 r10378  
    115115     * @throws IllegalArgumentException if adjustable is null
    116116     */
    117     public void adapt(final JCheckBox view, final Adjustable adjustable)  {
     117    public void adapt(final JCheckBox view, final Adjustable adjustable) {
    118118        CheckParameterUtil.ensureParameterNotNull(adjustable, "adjustable");
    119119        CheckParameterUtil.ensureParameterNotNull(view, "view");
  • trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java

    r9231 r10378  
    3434public abstract class AbstractTextComponentValidator implements ActionListener, FocusListener, DocumentListener, PropertyChangeListener {
    3535    private static final Border ERROR_BORDER = BorderFactory.createLineBorder(Color.RED, 1);
    36     private static final Color ERROR_BACKGROUND =  new Color(255, 224, 224);
     36    private static final Color ERROR_BACKGROUND = new Color(255, 224, 224);
    3737
    3838    private JTextComponent tc;
  • trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java

    r10308 r10378  
    399399
    400400                if (!splitChildren.hasNext()) {
    401                     double newWidth =  Math.max(minSplitChildWidth, bounds.getMaxX() - x);
     401                    double newWidth = Math.max(minSplitChildWidth, bounds.getMaxX() - x);
    402402                    Rectangle newSplitChildBounds = boundsWithXandWidth(bounds, x, newWidth);
    403403                    layout2(splitChild, newSplitChildBounds);
     
    446446                if (!splitChildren.hasNext()) {
    447447                    double oldHeight = splitChildBounds.getHeight();
    448                     double newHeight =  Math.max(minSplitChildHeight, bounds.getMaxY() - y);
     448                    double newHeight = Math.max(minSplitChildHeight, bounds.getMaxY() - y);
    449449                    Rectangle newSplitChildBounds = boundsWithYandHeight(bounds, y, newHeight);
    450450                    layout2(splitChild, newSplitChildBounds);
  • trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java

    r10173 r10378  
    241241                dragOffsetX = mx - initialDividerBounds.x;
    242242                dragOffsetY = my - initialDividerBounds.y;
    243                 dragDivider  = divider;
     243                dragDivider = divider;
    244244                Rectangle prevNodeBounds = prevNode.getBounds();
    245245                Rectangle nextNodeBounds = nextNode.getBounds();
     
    336336            MultiSplitLayout.Divider divider = getMultiSplitLayout().dividerAt(x, y);
    337337            if (divider != null) {
    338                 cursorID  = divider.isVertical() ?
     338                cursorID = divider.isVertical() ?
    339339                    Cursor.E_RESIZE_CURSOR :
    340340                    Cursor.N_RESIZE_CURSOR;
  • trunk/src/org/openstreetmap/josm/gui/widgets/TextContextualPopupMenu.java

    r10358 r10378  
    174174    }
    175175
    176     protected void addMenuEntry(JTextComponent component,  String label, String actionName, String iconName) {
     176    protected void addMenuEntry(JTextComponent component, String label, String actionName, String iconName) {
    177177        Action action = component.getActionMap().get(actionName);
    178178        if (action != null) {
  • trunk/src/org/openstreetmap/josm/io/Capabilities.java

    r8510 r10378  
    131131            }
    132132        } else {
    133             if (!capabilities.containsKey(element))  {
     133            if (!capabilities.containsKey(element)) {
    134134                Map<String, String> h = new HashMap<>();
    135135                capabilities.put(element, h);
  • trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java

    r10300 r10378  
    157157        CheckParameterUtil.ensureParameterNotNull(min, "min");
    158158        CheckParameterUtil.ensureParameterNotNull(max, "max");
    159         this.bounds  = new Bounds(min, max);
     159        this.bounds = new Bounds(min, max);
    160160        return this;
    161161    }
     
    215215     */
    216216    public ChangesetQuery beingOpen(boolean isOpen) {
    217         this.open =  isOpen;
     217        this.open = isOpen;
    218218        return this;
    219219    }
     
    474474
    475475        protected Map<String, String> createMapFromQueryString(String query) {
    476             Map<String, String> queryParams  = new HashMap<>();
     476            Map<String, String> queryParams = new HashMap<>();
    477477            String[] keyValuePairs = query.split("&");
    478478            for (String keyValuePair: keyValuePairs) {
  • trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java

    r9078 r10378  
    9797            return 0;
    9898        }
    99         if (port <= 0 || port >  65535) {
     99        if (port <= 0 || port > 65535) {
    100100            Main.error(tr("Illegal port number in preference ''{0}''. Got {1}.", property, port));
    101101            Main.error(tr("The proxy will not be used."));
  • trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java

    r9078 r10378  
    3232import org.xml.sax.helpers.DefaultHandler;
    3333
    34 public class DiffResultProcessor  {
     34public class DiffResultProcessor {
    3535
    3636    private static class DiffResultEntry {
     
    7676     *
    7777     */
    78     public  void parse(String diffUploadResponse, ProgressMonitor progressMonitor) throws XmlParsingException {
     78    public void parse(String diffUploadResponse, ProgressMonitor progressMonitor) throws XmlParsingException {
    7979        if (progressMonitor == null) {
    8080            progressMonitor = NullProgressMonitor.INSTANCE;
     
    168168                case "way":
    169169                case "relation":
    170                     PrimitiveId id  = new SimplePrimitiveId(
     170                    PrimitiveId id = new SimplePrimitiveId(
    171171                            Long.parseLong(atts.getValue("old_id")),
    172172                            OsmPrimitiveType.fromApiTypeName(qName)
  • trunk/src/org/openstreetmap/josm/io/GpxReader.java

    r10216 r10378  
    504504
    505505        @Override
    506         public void endDocument() throws SAXException  {
     506        public void endDocument() throws SAXException {
    507507            if (!states.empty())
    508508                throw new SAXException(tr("Parse error: invalid document structure for GPX document."));
  • trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java

    r10217 r10378  
    314314        final String baseUrl = getBaseUrl();
    315315        switch (type) {
     316            // CHECKSTYLE.OFF: SingleSpaceSeparator
    316317            case NODE:     msg = tr("Fetching a package of nodes from ''{0}''",     baseUrl); break;
    317318            case WAY:      msg = tr("Fetching a package of ways from ''{0}''",      baseUrl); break;
    318319            case RELATION: msg = tr("Fetching a package of relations from ''{0}''", baseUrl); break;
     320            // CHECKSTYLE.ON: SingleSpaceSeparator
    319321            default: throw new AssertionError();
    320322        }
     
    584586                    String msg;
    585587                    switch (type) {
     588                        // CHECKSTYLE.OFF: SingleSpaceSeparator
    586589                        case NODE:     msg = tr("Fetching node with id {0} from ''{1}''",     id, baseUrl); break;
    587590                        case WAY:      msg = tr("Fetching way with id {0} from ''{1}''",      id, baseUrl); break;
    588591                        case RELATION: msg = tr("Fetching relation with id {0} from ''{1}''", id, baseUrl); break;
     592                        // CHECKSTYLE.ON: SingleSpaceSeparator
    589593                        default: throw new AssertionError();
    590594                    }
  • trunk/src/org/openstreetmap/josm/io/NoteReader.java

    r10216 r10378  
    194194
    195195        @Override
    196         public void endDocument() throws SAXException  {
     196        public void endDocument() throws SAXException {
    197197            parsedNotes = notes;
    198198        }
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r10373 r10378  
    133133     * @throws IllegalArgumentException if serverUrl is null
    134134     */
    135     protected OsmApi(String serverUrl)  {
     135    protected OsmApi(String serverUrl) {
    136136        CheckParameterUtil.ensureParameterNotNull(serverUrl, "serverUrl");
    137137        this.serverUrl = serverUrl;
  • trunk/src/org/openstreetmap/josm/io/OsmChangeImporter.java

    r8895 r10378  
    4444    }
    4545
    46     protected void importData(InputStream in, final File associatedFile, ProgressMonitor  progressMonitor) throws IllegalDataException {
     46    protected void importData(InputStream in, final File associatedFile, ProgressMonitor progressMonitor) throws IllegalDataException {
    4747        final DataSet dataSet = OsmChangeReader.parseDataSet(in, progressMonitor);
    4848        final OsmDataLayer layer = new OsmDataLayer(dataSet, associatedFile.getName(), associatedFile);
  • trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java

    r10212 r10378  
    9898     * @throws IllegalArgumentException if type is null
    9999     */
    100     public OsmServerBackreferenceReader(long id, OsmPrimitiveType type, boolean readFull)  {
     100    public OsmServerBackreferenceReader(long id, OsmPrimitiveType type, boolean readFull) {
    101101        this(id, type);
    102102        this.readFull = readFull;
     
    202202            }
    203203            if (isReadFull()) {
    204                 Collection<Relation> relationsToCheck  = new ArrayList<>(ds.getRelations());
     204                Collection<Relation> relationsToCheck = new ArrayList<>(ds.getRelations());
    205205                for (Relation relation: relationsToCheck) {
    206206                    if (!relation.isNew() && relation.hasIncompleteMembers()) {
  • trunk/src/org/openstreetmap/josm/io/OsmServerReader.java

    r10212 r10378  
    4141     * @throws OsmTransferException if data transfer errors occur
    4242     */
    43     protected InputStream getInputStream(String urlStr, ProgressMonitor progressMonitor) throws OsmTransferException  {
     43    protected InputStream getInputStream(String urlStr, ProgressMonitor progressMonitor) throws OsmTransferException {
    4444        return getInputStream(urlStr, progressMonitor, null);
    4545    }
     
    5555     * @throws OsmTransferException if data transfer errors occur
    5656     */
    57     protected InputStream getInputStream(String urlStr, ProgressMonitor progressMonitor, String reason) throws OsmTransferException  {
     57    protected InputStream getInputStream(String urlStr, ProgressMonitor progressMonitor, String reason) throws OsmTransferException {
    5858        try {
    5959            api.initialize(progressMonitor);
  • trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java

    r10308 r10378  
    2020        if (requestorType == null)
    2121            return null;
    22         PasswordAuthentication credentials =  lookup(requestorType, host);
     22        PasswordAuthentication credentials = lookup(requestorType, host);
    2323        final String username = (credentials == null || credentials.getUserName() == null) ? "" : credentials.getUserName();
    2424        final String password = (credentials == null || credentials.getPassword() == null) ? "" : String.valueOf(credentials.getPassword());
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java

    r10308 r10378  
    150150            ExistingValues old = new ExistingValues(key);
    151151            for (OsmPrimitive osm : sel) {
    152                 oldValue  = osm.get(key);
     152                oldValue = osm.get(key);
    153153                if (oldValue != null) {
    154154                    old.addValue(oldValue);
     
    209209        propertyTable.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_MASK), "shiftenter");
    210210        propertyTable.getActionMap().put("shiftenter", new AbstractAction() {
    211             @Override  public void actionPerformed(ActionEvent e) {
     211            @Override public void actionPerformed(ActionEvent e) {
    212212                buttonAction(1, e); // add all tags on Shift-Enter
    213213            }
     
    242242    protected void buttonAction(int buttonIndex, ActionEvent evt) {
    243243        // if layer all layers were closed, ignore all actions
    244         if (Main.main.getCurrentDataSet() != null  && buttonIndex != 2) {
     244        if (Main.main.getCurrentDataSet() != null && buttonIndex != 2) {
    245245            TableModel tm = propertyTable.getModel();
    246246            for (int i = 0; i < tm.getRowCount(); i++) {
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r10300 r10378  
    368368                + "</html>";
    369369            togglePreferenceKey = "pluginmanager.version-based-update.policy";
    370         }  else {
     370        } else {
    371371            long tim = System.currentTimeMillis();
    372372            long last = Main.pref.getLong("pluginmanager.lastupdate", 0);
     
    725725                        + "Delete from preferences?</html>", plugin.name, plugin.className);
    726726            }
    727         }  catch (RuntimeException e) {
     727        } catch (RuntimeException e) {
    728728            pluginLoadingExceptions.put(plugin.name, e);
    729729            Main.error(e);
  • trunk/src/org/openstreetmap/josm/tools/ColorScale.java

    r9796 r10378  
    3737    public static ColorScale createCyclicScale(int count) {
    3838        ColorScale sc = new ColorScale();
    39         //                    red   yellow  green   blue    red
    40         int[] h = new int[] {0,    59,     127,    244,    360};
     39        // CHECKSTYLE.OFF: SingleSpaceSeparator
     40        //                   red  yellow  green   blue    red
     41        int[] h = new int[] {0,    59,     127,    244,   360};
    4142        int[] s = new int[] {100,  84,     99,     100};
    4243        int[] b = new int[] {90,   93,     74,     83};
     44        // CHECKSTYLE.ON: SingleSpaceSeparator
    4345
    4446        sc.colors = new Color[count];
     
    166168        for (int i = 0; i <= intervalCount; i++) {
    167169            g.setColor(colors[(int) (1.0*i*n/intervalCount-1e-10)]);
    168             final double val =  min+i*(max-min)/intervalCount;
     170            final double val = min+i*(max-min)/intervalCount;
    169171            final String txt = String.format("%.3f", val*valueScale);
    170172            if (w < h) {
  • trunk/src/org/openstreetmap/josm/tools/Diff.java

    r10308 r10378  
    327327    static class ReverseScript implements ScriptBuilder {
    328328        @Override
    329         public  Change build_script(
     329        public Change build_script(
    330330                final boolean[] changed0, int len0,
    331331                final boolean[] changed1, int len1) {
     
    828828        private final int bufferedLines;
    829829
    830         /** Vector, indexed by line number, containing an equivalence code for
    831            each line.  It is this vector that is actually compared with that
    832            of another file to generate differences. */
    833         private final int[]     equivs;
    834 
    835         /** Vector, like the previous one except that
    836            the elements for discarded lines have been squeezed out.  */
    837         private final int[]    undiscarded;
    838 
    839         /** Vector mapping virtual line numbers (not counting discarded lines)
    840            to real ones (counting those lines).  Both are origin-0.  */
    841         private final int[]    realindexes;
     830        /** Vector, indexed by line number, containing an equivalence code for each line.
     831         * It is this vector that is actually compared with that of another file to generate differences. */
     832        private final int[] equivs;
     833
     834        /** Vector, like the previous one except that the elements for discarded lines have been squeezed out. */
     835        private final int[] undiscarded;
     836
     837        /** Vector mapping virtual line numbers (not counting discarded lines) to real ones (counting those lines).
     838         * Both are origin-0.  */
     839        private final int[] realindexes;
    842840
    843841        /** Total number of nondiscarded lines. */
    844         private int         nondiscardedLines;
    845 
    846         /** Array, indexed by real origin-1 line number,
    847            containing true for a line that is an insertion or a deletion.
    848            The results of comparison are stored here.  */
    849         private boolean[]       changedFlag;
     842        private int nondiscardedLines;
     843
     844        /** Array, indexed by real origin-1 line number, containing true for a line that is an insertion or a deletion.
     845           The results of comparison are stored here. */
     846        private boolean[] changedFlag;
    850847    }
    851848}
  • trunk/src/org/openstreetmap/josm/tools/ExifReader.java

    r10212 r10378  
    179179    }
    180180
    181     private static double readAxis(GpsDirectory dirGps, int gpsTag, int gpsTagRef, char cRef) throws MetadataException  {
     181    private static double readAxis(GpsDirectory dirGps, int gpsTag, int gpsTagRef, char cRef) throws MetadataException {
    182182        double value;
    183183        Rational[] components = dirGps.getRationalArray(gpsTag);
     
    205205     * Returns a Transform that fixes the image orientation.
    206206     *
    207      * Only orientation 1, 3, 6 and 8 are supported. Everything else is treated
    208      * as 1.
     207     * Only orientation 1, 3, 6 and 8 are supported. Everything else is treated as 1.
    209208     * @param orientation the exif-orientation of the image
    210209     * @param width the original width of the image
  • trunk/src/org/openstreetmap/josm/tools/Geometry.java

    r9952 r10378  
    789789
    790790        BigDecimal d = new BigDecimal(3, MathContext.DECIMAL128); // 1/2 * 6 = 3
    791         area  = area.multiply(d, MathContext.DECIMAL128);
     791        area = area.multiply(d, MathContext.DECIMAL128);
    792792        if (area.compareTo(BigDecimal.ZERO) != 0) {
    793793            north = north.divide(area, MathContext.DECIMAL128);
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r10362 r10378  
    102102public class ImageProvider {
    103103
     104    // CHECKSTYLE.OFF: SingleSpaceSeparator
    104105    private static final String HTTP_PROTOCOL  = "http://";
    105106    private static final String HTTPS_PROTOCOL = "https://";
    106107    private static final String WIKI_PROTOCOL  = "wiki://";
     108    // CHECKSTYLE.ON: SingleSpaceSeparator
    107109
    108110    /**
  • trunk/src/org/openstreetmap/josm/tools/MultikeyShortcutAction.java

    r8674 r10378  
    2727                return '0';
    2828            else
    29                 return (char) ('A' +  index - 10);
     29                return (char) ('A' + index - 10);
    3030        }
    3131
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r10308 r10378  
    232232    public static String getPackageDetails(String ... packageNames) {
    233233        try {
     234            // CHECKSTYLE.OFF: SingleSpaceSeparator
    234235            boolean dpkg = Files.exists(Paths.get("/usr/bin/dpkg-query"));
    235236            boolean eque = Files.exists(Paths.get("/usr/bin/equery"));
    236237            boolean rpm  = Files.exists(Paths.get("/bin/rpm"));
     238            // CHECKSTYLE.ON: SingleSpaceSeparator
    237239            if (dpkg || rpm || eque) {
    238240                for (String packageName : packageNames) {
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java

    r10337 r10378  
    7979        (byte) 0xfc, (byte) 0xf1, 0x7f, 0x73, (byte) 0xa7, (byte) 0x9d, (byte) 0xde, (byte) 0xc7, (byte) 0x88, 0x57, 0x51,
    8080        (byte) 0x84, (byte) 0xed, (byte) 0x96, (byte) 0xfb, (byte) 0xe1, 0x38, (byte) 0xef, 0x08, 0x2b, (byte) 0xf3,
    81         (byte) 0xc7, (byte) 0xc3,  0x5d, (byte) 0xfe, (byte) 0xf9, 0x51, (byte) 0xe6, 0x29, (byte) 0xfc, (byte) 0xe5, 0x0d,
     81        (byte) 0xc7, (byte) 0xc3, 0x5d, (byte) 0xfe, (byte) 0xf9, 0x51, (byte) 0xe6, 0x29, (byte) 0xfc, (byte) 0xe5, 0x0d,
    8282        (byte) 0xa1, 0x0d, (byte) 0xa8, (byte) 0xb4, (byte) 0xae, 0x26, 0x18, 0x19, 0x4d, 0x6c, 0x0c, 0x3b, 0x12, (byte) 0xba,
    8383        (byte) 0xbc, 0x5f, 0x32, (byte) 0xb3, (byte) 0xbe, (byte) 0x9d, 0x17, 0x0d, 0x4d, 0x2f, 0x1a, 0x48, (byte) 0xb7,
  • trunk/src/org/openstreetmap/josm/tools/Shortcut.java

    r10339 r10378  
    221221     */
    222222    public void setMnemonic(AbstractButton button) {
    223         if (assignedModifier == getGroupModifier(MNEMONIC)  && getKeyStroke() != null && KeyEvent.getKeyText(assignedKey).length() == 1) {
     223        if (assignedModifier == getGroupModifier(MNEMONIC) && getKeyStroke() != null && KeyEvent.getKeyText(assignedKey).length() == 1) {
    224224            button.setMnemonic(KeyEvent.getKeyText(assignedKey).charAt(0)); //getKeyStroke().getKeyChar() seems not to work here
    225225        }
     
    231231     */
    232232    public void setFocusAccelerator(JTextComponent component) {
    233         if (assignedModifier == getGroupModifier(MNEMONIC)  && getKeyStroke() != null && KeyEvent.getKeyText(assignedKey).length() == 1) {
     233        if (assignedModifier == getGroupModifier(MNEMONIC) && getKeyStroke() != null && KeyEvent.getKeyText(assignedKey).length() == 1) {
    234234            component.setFocusAccelerator(KeyEvent.getKeyText(assignedKey).charAt(0));
    235235        }
  • trunk/src/org/openstreetmap/josm/tools/TextTagParser.java

    r10308 r10378  
    125125            while (pos < n) {
    126126                c = data.charAt(pos);
    127                 if (c == '\t' || c == '\n'  || c == ' ') {
     127                if (c == '\t' || c == '\n' || c == ' ') {
    128128                    pos++;
    129129                } else if (c == '=') {
     
    177177         String k;
    178178         String v;
    179          for (String  line: lines) {
     179         for (String line: lines) {
    180180            if (line.trim().isEmpty()) continue; // skip empty lines
    181181            Matcher m = p.matcher(line);
     
    195195         if (!tags.isEmpty()) {
    196196            return tags;
    197          }  else {
     197         } else {
    198198            return null;
    199199         }
  • trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java

    r10242 r10378  
    5858     * @param window the window
    5959     */
    60     public WindowGeometry(Window window)  {
     60    public WindowGeometry(Window window) {
    6161        this(window.getLocationOnScreen(), window.getSize());
    6262    }
     
    165165     * @param window the window
    166166     */
    167     public void fixScreen(Window window)  {
     167    public void fixScreen(Window window) {
    168168        Rectangle oldScreen = getScreenInfo(getRectangle());
    169169        Rectangle newScreen = getScreenInfo(new Rectangle(window.getLocationOnScreen(), window.getSize()));
     
    402402            Rectangle bounds = gc.getBounds();
    403403            Insets insets = component.getToolkit().getScreenInsets(gc);
    404             result.width  = bounds.width - insets.left - insets.right;
     404            result.width = bounds.width - insets.left - insets.right;
    405405            result.height = bounds.height - insets.top - insets.bottom;
    406406        }
  • trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java

    r10212 r10378  
    106106            } else if (mapping.containsKey(qname) && characters != null && !current.isEmpty()) {
    107107                setValue(mapping.get(qname), qname, characters.toString().trim());
    108                 characters  = new StringBuilder(64);
     108                characters = new StringBuilder(64);
    109109            }
    110110        }
     
    117117        private void report() {
    118118            queue.add(current.pop());
    119             characters  = new StringBuilder(64);
     119            characters = new StringBuilder(64);
    120120        }
    121121
  • trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateParser.java

    r8926 r10378  
    108108
    109109            Token token = tokenizer.lookAhead();
    110             if (token.getType()  == TokenType.END) {
     110            if (token.getType() == TokenType.END) {
    111111                tokenizer.nextToken();
    112112                return result;
  • trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTestFT.java

    r9546 r10378  
    3232
    3333    public static void main(String[] args) {
    34         TagMergerTestFT test  = new TagMergerTestFT();
     34        TagMergerTestFT test = new TagMergerTestFT();
    3535        test.setSize(600, 600);
    3636        test.setVisible(true);
  • trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java

    r10222 r10378  
    138138        ds.adjustRelationUploadOrder();
    139139        OsmServerWriter writer = new OsmServerWriter();
    140         Changeset cs  = new Changeset();
     140        Changeset cs = new Changeset();
    141141        writer.uploadOsm(
    142142                new UploadStrategySpecification().setStrategy(UploadStrategy.SINGLE_REQUEST_STRATEGY),
  • trunk/test/functional/org/openstreetmap/josm/io/UploadStrategySelectionPanelTest.java

    r10222 r10378  
    2222    protected UploadStrategySelectionPanel uploadStrategySelectionPanel;
    2323
    24     protected void build()  {
     24    protected void build() {
    2525        getContentPane().setLayout(new BorderLayout());
    2626        uploadStrategySelectionPanel = new UploadStrategySelectionPanel();
  • trunk/test/unit/org/openstreetmap/josm/actions/OrthogonalizeActionTest.java

    r10052 r10378  
    9696    void verifyRectangleClockwise(final Way way) {
    9797        for (int i = 1; i < way.getNodesCount() - 1; i++) {
    98             assertEquals(-Math.PI / 2,  Geometry.getCornerAngle(
     98            assertEquals(-Math.PI / 2, Geometry.getCornerAngle(
    9999                    way.getNode(i - 1).getEastNorth(), way.getNode(i).getEastNorth(), way.getNode(i + 1).getEastNorth()), 1e-6);
    100100        }
  • trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java

    r10222 r10378  
    7979     */
    8080    @Test
    81     public void testStatusCodes() throws IOException, InterruptedException  {
     81    public void testStatusCodes() throws IOException, InterruptedException {
    8282        doTestStatusCode(200);
    8383        // can't test for 3xx, as httpstat.us redirects finally to 200 page
  • trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java

    r10334 r10378  
    3333    @SuppressFBWarnings(value = "MS_PKGPROTECT")
    3434    public static final double[] SAMPLE_VALUES = new double[]{
     35            // CHECKSTYLE.OFF: SingleSpaceSeparator
    3536            -180.0, -179.9, -179.6, -179.5, -179.4, -179.1, -179.0, -100.0, -99.9, -10.0, -9.9, -1.0, -0.1,
    36             180.0,  179.9,  179.6,  179.5,  179.4,  179.1,  179.0,  100.0,  99.9,  10.0,  9.9,  1.0,  0.1,
     37             180.0,  179.9,  179.6,  179.5,  179.4,  179.1,  179.0,  100.0,  99.9,  10.0,  9.9,  1.0,  0.1,
    3738            0.12, 0.123, 0.1234, 0.12345, 0.123456, 0.1234567,
    3839            1.12, 1.123, 1.1234, 1.12345, 1.123456, 1.1234567,
    3940            10.12, 10.123, 10.1234, 10.12345, 10.123456, 10.1234567,
    4041            100.12, 100.123, 100.1234, 100.12345, 100.123456, 100.1234567
     42            // CHECKSTYLE.ON: SingleSpaceSeparator
    4143           };
    4244
     
    5456        assertEquals(LatLon.roundToOsmPrecision(-0.0), 0.0, 0);
    5557
     58        // CHECKSTYLE.OFF: SingleSpaceSeparator
    5659        assertEquals(LatLon.roundToOsmPrecision(0.12345678),  0.1234568, 0);
    5760        assertEquals(LatLon.roundToOsmPrecision(0.123456789), 0.1234568, 0);
     
    6568        assertEquals(LatLon.roundToOsmPrecision(100.12345678),  100.1234568, 0);
    6669        assertEquals(LatLon.roundToOsmPrecision(100.123456789), 100.1234568, 0);
     70        // CHECKSTYLE.ON: SingleSpaceSeparator
    6771
    68         assertEquals(LatLon.roundToOsmPrecision(100.00000001),  100.0000000, 0);
    69         assertEquals(LatLon.roundToOsmPrecision(100.000000001),  100.0000000, 0);
    70         assertEquals(LatLon.roundToOsmPrecision(100.0000000001),  100.0000000, 0);
    71         assertEquals(LatLon.roundToOsmPrecision(100.00000000001),  100.0000000, 0);
    72         assertEquals(LatLon.roundToOsmPrecision(100.000000000001),  100.0000000, 0);
    73         assertEquals(LatLon.roundToOsmPrecision(100.0000000000001),  100.0000000, 0);
    74         assertEquals(LatLon.roundToOsmPrecision(100.00000000000001),  100.0000000, 0);
    75         assertEquals(LatLon.roundToOsmPrecision(100.000000000000001),  100.0000000, 0);
    76         assertEquals(LatLon.roundToOsmPrecision(100.0000000000000001),  100.0000000, 0);
    77         assertEquals(LatLon.roundToOsmPrecision(100.00000000000000001),  100.0000000, 0);
    78         assertEquals(LatLon.roundToOsmPrecision(100.000000000000000001),  100.0000000, 0);
    79         assertEquals(LatLon.roundToOsmPrecision(100.0000000000000000001),  100.0000000, 0);
    80         assertEquals(LatLon.roundToOsmPrecision(100.00000000000000000001),  100.0000000, 0);
     72        assertEquals(LatLon.roundToOsmPrecision(100.00000001), 100.0000000, 0);
     73        assertEquals(LatLon.roundToOsmPrecision(100.000000001), 100.0000000, 0);
     74        assertEquals(LatLon.roundToOsmPrecision(100.0000000001), 100.0000000, 0);
     75        assertEquals(LatLon.roundToOsmPrecision(100.00000000001), 100.0000000, 0);
     76        assertEquals(LatLon.roundToOsmPrecision(100.000000000001), 100.0000000, 0);
     77        assertEquals(LatLon.roundToOsmPrecision(100.0000000000001), 100.0000000, 0);
     78        assertEquals(LatLon.roundToOsmPrecision(100.00000000000001), 100.0000000, 0);
     79        assertEquals(LatLon.roundToOsmPrecision(100.000000000000001), 100.0000000, 0);
     80