git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'task/JAL-3234_211_codesigning' into develop
[jalview.git]
/
src
/
jalview
/
analysis
/
scoremodels
/
FeatureDistanceModel.java
diff --git
a/src/jalview/analysis/scoremodels/FeatureDistanceModel.java
b/src/jalview/analysis/scoremodels/FeatureDistanceModel.java
index
e506be2
..
8545e94
100644
(file)
--- a/
src/jalview/analysis/scoremodels/FeatureDistanceModel.java
+++ b/
src/jalview/analysis/scoremodels/FeatureDistanceModel.java
@@
-58,7
+58,7
@@
public class FeatureDistanceModel extends DistanceScoreModel
FeatureDistanceModel instance;
try
{
FeatureDistanceModel instance;
try
{
- instance = this.getClass().newInstance();
+ instance = this.getClass().getDeclaredConstructor().newInstance();
instance.configureFromAlignmentView(view);
return instance;
} catch (InstantiationException | IllegalAccessException e)
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;
System.err.println("Error in " + getClass().getName()
+ ".getInstance(): " + e.getMessage());
return null;
+ } catch (ReflectiveOperationException roe)
+ {
+ return null;
}
}
}
}
@@
-188,7
+191,7
@@
public class FeatureDistanceModel extends DistanceScoreModel
protected Map<SeqCigar, Set<String>> findFeatureTypesAtColumn(
SeqCigar[] seqs, int columnPosition)
{
protected Map<SeqCigar, Set<String>> findFeatureTypesAtColumn(
SeqCigar[] seqs, int columnPosition)
{
- Map<SeqCigar, Set<String>> sfap = new HashMap<SeqCigar, Set<String>>();
+ Map<SeqCigar, Set<String>> sfap = new HashMap<>();
for (SeqCigar seq : seqs)
{
int spos = seq.findPosition(columnPosition);
for (SeqCigar seq : seqs)
{
int spos = seq.findPosition(columnPosition);
@@
-197,7
+200,7
@@
public class FeatureDistanceModel extends DistanceScoreModel
/*
* position is not a gap
*/
/*
* position is not a gap
*/
- Set<String> types = new HashSet<String>();
+ Set<String> types = new HashSet<>();
List<SequenceFeature> sfs = fr.findFeaturesAtResidue(
seq.getRefSeq(), spos);
for (SequenceFeature sf : sfs)
List<SequenceFeature> sfs = fr.findFeaturesAtResidue(
seq.getRefSeq(), spos);
for (SequenceFeature sf : sfs)