Merge branch 'develop' into trialMerge
[jalview.git] / src / jalview / analysis / scoremodels / FeatureDistanceModel.java
index bfecd65..0aa77fa 100644 (file)
@@ -58,7 +58,7 @@ public class FeatureDistanceModel extends DistanceScoreModel
     FeatureDistanceModel instance;
     try
     {
-      instance = this.getClass().newInstance();
+      instance = this.getClass().getDeclaredConstructor().newInstance();
       instance.configureFromAlignmentView(view);
       return instance;
     } catch (InstantiationException | IllegalAccessException e)
@@ -66,6 +66,9 @@ public class FeatureDistanceModel extends DistanceScoreModel
       System.err.println("Error in " + getClass().getName()
               + ".getInstance(): " + e.getMessage());
       return null;
+    } catch (ReflectiveOperationException roe)
+    {
+      return null;
     }
   }