Ignore:
Timestamp:
2016-05-14T02:38:41+02:00 (3 years ago)
Author:
Don-vip
Message:

see #11924 - Java 9 - JDK-6850612 deprecates Class.newInstance() ==> replace it by Class.getConstructor().newInstance()

File:
1 edited

Legend:

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

    r9067 r10208  
    99    private final Class<? extends Proj> projClass;
    1010
     11    /**
     12     * Constructs a new {@code ClassProjFactory}.
     13     * @param projClass projection class
     14     */
    1115    public ClassProjFactory(Class<? extends Proj> projClass) {
    1216        this.projClass = projClass;
     
    1721        Proj proj = null;
    1822        try {
    19             proj = projClass.newInstance();
    20         } catch (InstantiationException | IllegalAccessException e) {
     23            proj = projClass.getConstructor().newInstance();
     24        } catch (ReflectiveOperationException e) {
    2125            throw new RuntimeException(e);
    2226        }
Note: See TracChangeset for help on using the changeset viewer.