Changeset 5087 in josm for trunk


Ignore:
Timestamp:
2012-03-15T09:35:04+01:00 (8 years ago)
Author:
simon04
Message:

fix #7507 - NullPointerException in AlphanumComparator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/AlphanumComparator.java

    r5083 r5087  
    7171    @Override
    7272    public int compare(String s1, String s2) {
     73        if (s1 == null && s2 == null) {
     74            return 0;
     75        } else if (s1 == null) {
     76            return -1;
     77        } else if (s2 == null) {
     78            return 1;
     79        }
     80
    7381        int thisMarker = 0;
    7482        int thatMarker = 0;
Note: See TracChangeset for help on using the changeset viewer.