Changeset 11454 in josm


Ignore:
Timestamp:
2017-01-12T01:42:44+01:00 (7 years ago)
Author:
Don-vip
Message:

sonar - fb-contrib:NAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION - Performance - Method needlessly boxes a boolean constant

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

Legend:

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

    r10801 r11454  
    141141            try {
    142142                getClipboard().setContents(transferable, new DoNothingClipboardOwner());
    143                 return true;
     143                return Boolean.TRUE;
    144144            } catch (IllegalStateException ex) {
    145145                Main.error(ex);
    146                 return false;
     146                return Boolean.FALSE;
    147147            }
    148148        });
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactory.java

    r11374 r11454  
    197197                    testFloat = Float.parseFloat(test);
    198198                } catch (NumberFormatException e) {
    199                     return false;
     199                    return Boolean.FALSE;
    200200                }
    201201                float prototypeFloat = Float.parseFloat(prototype);
  • trunk/src/org/openstreetmap/josm/tools/RightAndLefthandTraffic.java

    r11427 r11454  
    157157             OsmWriter w = OsmWriterFactory.createOsmWriter(new PrintWriter(writer), false, ds.getVersion())
    158158            ) {
    159             w.header(false);
     159            w.header(Boolean.FALSE);
    160160            w.writeContent(ds);
    161161            w.footer();
  • trunk/src/org/openstreetmap/josm/tools/Shortcut.java

    r11397 r11454  
    404404        return shortcuts.stream()
    405405                .map(Shortcut::save)
    406                 .reduce(false, Boolean::logicalOr); // has changed
     406                .reduce(Boolean.FALSE, Boolean::logicalOr); // has changed
    407407    }
    408408
Note: See TracChangeset for help on using the changeset viewer.