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

sonar - fb-contrib:SEO_SUBOPTIMAL_EXPRESSION_ORDER - Performance - Method orders expressions in a conditional in a sub optimal way

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java

    r11435 r11452  
    296296        if (changesetId < 0)
    297297            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' >= 0 expected, got {1}", "changesetId", changesetId));
    298         if (isNew() && changesetId > 0)
     298        if (changesetId > 0 && isNew())
    299299            throw new IllegalStateException(tr("Cannot assign a changesetId > 0 to a new primitive. Value of changesetId is {0}", changesetId));
    300300
     
    380380    @Override
    381381    public void setVisible(boolean visible) {
    382         if (isNew() && !visible)
     382        if (!visible && isNew())
    383383            throw new IllegalStateException(tr("A primitive with ID = 0 cannot be invisible."));
    384384        updateFlags(FLAG_VISIBLE, visible);
Note: See TracChangeset for help on using the changeset viewer.