Changeset 14524 in josm for trunk/test/unit/org


Ignore:
Timestamp:
2018-12-08T21:45:30+01:00 (6 years ago)
Author:
Don-vip
Message:

see #16073 - fix NPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java

    r14523 r14524  
    193193
    194194    private static Projection getProjection(ImageryInfo info) {
    195         return info.getServerProjections().isEmpty() ? ProjectionRegistry.getProjection() :
    196             Projections.getProjectionByCode(info.getServerProjections().get(0));
     195        if (!info.getServerProjections().isEmpty()) {
     196            Projection proj = Projections.getProjectionByCode(info.getServerProjections().get(0));
     197            if (proj != null) {
     198                return proj;
     199            }
     200        }
     201        return ProjectionRegistry.getProjection();
    197202    }
    198203
Note: See TracChangeset for help on using the changeset viewer.