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
safer retrieval of groovy scripts from URLs
[jalview.git]
/
src
/
jalview
/
datamodel
/
Mapping.java
diff --git
a/src/jalview/datamodel/Mapping.java
b/src/jalview/datamodel/Mapping.java
index
e54b53e
..
835400e
100644
(file)
--- a/
src/jalview/datamodel/Mapping.java
+++ b/
src/jalview/datamodel/Mapping.java
@@
-219,6
+219,11
@@
public class Mapping
if (map != null)
{
int[] frange = map.locateInFrom(f.getBegin(), f.getEnd());
if (map != null)
{
int[] frange = map.locateInFrom(f.getBegin(), f.getEnd());
+ if (frange==null)
+ {
+ // JBPNote - this isprobably not the right thing to doJBPHack
+ return null;
+ }
SequenceFeature[] vf = new SequenceFeature[frange.length / 2];
for (int i = 0, v = 0; i < frange.length; i += 2, v++)
{
SequenceFeature[] vf = new SequenceFeature[frange.length / 2];
for (int i = 0, v = 0; i < frange.length; i += 2, v++)
{
@@
-226,7
+231,7
@@
public class Mapping
vf[v].setBegin(frange[i]);
vf[v].setEnd(frange[i + 1]);
if (frange.length > 2)
vf[v].setBegin(frange[i]);
vf[v].setEnd(frange[i + 1]);
if (frange.length > 2)
- vf[v].setDescription(f.getDescription() + "\nPart " + v);
+ vf[v].setDescription(f.getDescription() + "\nPart " + (v+1));
}
return vf;
}
}
return vf;
}