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/SystemOfMeasurement.java

    r11100 r11452  
    225225    public String getDistText(final double dist, final NumberFormat format, final double threshold) {
    226226        double a = dist / aValue;
    227         if (!Main.pref.getBoolean("system_of_measurement.use_only_lower_unit", false) && a > bValue / aValue)
     227        if (a > bValue / aValue && !Main.pref.getBoolean("system_of_measurement.use_only_lower_unit", false))
    228228            return formatText(dist / bValue, bName, format);
    229229        else if (a < threshold)
Note: See TracChangeset for help on using the changeset viewer.