Ignore:
Timestamp:
2016-03-12T23:18:04+01:00 (8 years ago)
Author:
Don-vip
Message:

sonar - remove useless parentheses

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java

    r9918 r9970  
    230230
    231231        if (msg instanceof String) {
    232             msg = new JMultilineLabel(((String) msg), true);
     232            msg = new JMultilineLabel((String) msg, true);
    233233        }
    234234
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r9969 r9970  
    991991                if (nextKeyIndex == rows[rows.length-1]) {
    992992                    // no gap found, pick next or previous key in list
    993                     nextKeyIndex = (nextKeyIndex + 1 < rowCount ? nextKeyIndex + 1 : rows[0] - 1);
     993                    nextKeyIndex = nextKeyIndex + 1 < rowCount ? nextKeyIndex + 1 : rows[0] - 1;
    994994                } else {
    995995                    // gap found
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java

    r9246 r9970  
    7777                if (!RelationSortUtils.isOneway(m) && lastWct != null) {
    7878                    wct.direction = determineDirection(i-1, lastWct.direction, i);
    79                     wct.linkPrev = (wct.direction != NONE);
     79                    wct.linkPrev = wct.direction != NONE;
    8080                }
    8181            }
  • trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java

    r9231 r9970  
    388388                Rectangle splitChildBounds = splitChild.getBounds();
    389389                double minSplitChildWidth = minimumNodeSize(splitChild).getWidth();
    390                 double splitChildWeight = (onlyShrinkWeightedComponents)
     390                double splitChildWeight = onlyShrinkWeightedComponents
    391391                ? splitChild.getWeight()
    392392                        : (splitChildBounds.getWidth() / totalWidth);
     
    434434                Rectangle splitChildBounds = splitChild.getBounds();
    435435                double minSplitChildHeight = minimumNodeSize(splitChild).getHeight();
    436                 double splitChildWeight = (onlyShrinkWeightedComponents)
     436                double splitChildWeight = onlyShrinkWeightedComponents
    437437                ? splitChild.getWeight()
    438438                        : (splitChildBounds.getHeight() / totalHeight);
     
    499499                    layout2(splitChild, newSplitChildBounds);
    500500                } else if ((availableWidth > 0.0) && (splitChildWeight > 0.0)) {
    501                     double allocatedWidth = (splitChild.equals(lastWeightedChild))
     501                    double allocatedWidth = splitChild.equals(lastWeightedChild)
    502502                    ? availableWidth
    503503                            : Math.rint(splitChildWeight * extraWidth);
     
    537537                    layout2(splitChild, newSplitChildBounds);
    538538                } else if ((availableHeight > 0.0) && (splitChildWeight > 0.0)) {
    539                     double allocatedHeight = (splitChild.equals(lastWeightedChild))
     539                    double allocatedHeight = splitChild.equals(lastWeightedChild)
    540540                    ? availableHeight
    541541                            : Math.rint(splitChildWeight * extraHeight);
     
    616616                    Node splitChild = splitChildren.next();
    617617                    Divider dividerChild =
    618                         (splitChildren.hasNext()) ? (Divider) (splitChildren.next()) : null;
     618                        splitChildren.hasNext() ? (Divider) (splitChildren.next()) : null;
    619619
    620620                    double childWidth = 0.0;
     
    650650                    Node splitChild = splitChildren.next();
    651651                    Divider dividerChild =
    652                         (splitChildren.hasNext()) ? (Divider) (splitChildren.next()) : null;
     652                        splitChildren.hasNext() ? (Divider) splitChildren.next() : null;
    653653
    654654                        double childHeight = 0.0;
     
    762762        if (root instanceof Divider) {
    763763            Divider divider = (Divider) root;
    764             return (divider.getBounds().contains(x, y)) ? divider : null;
     764            return divider.getBounds().contains(x, y) ? divider : null;
    765765        } else if (root instanceof Split) {
    766766            Split split = (Split) root;
  • trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java

    r8840 r9970  
    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;
Note: See TracChangeset for help on using the changeset viewer.