Changeset 18030 in josm


Ignore:
Timestamp:
2021-07-15T10:22:07+02:00 (2 months ago)
Author:
Don-vip
Message:

Make Projections.getProjectionByCode null-safe

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/Projections.java

    r18028 r18030  
    362362     */
    363363    public static Projection getProjectionByCode(String code) {
    364         return projectionsByCodeCache.computeIfAbsent(code, Projections::computeProjectionByCode);
     364        return code != null ? projectionsByCodeCache.computeIfAbsent(code, Projections::computeProjectionByCode) : null;
    365365    }
    366366
Note: See TracChangeset for help on using the changeset viewer.