git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6531440
)
JAL-741 (poss related JAL-971) - fix NPE raised when attempting to sort alignment...
author
Jim Procter
<jprocter@dundee.ac.uk>
Sat, 19 Apr 2014 12:56:18 +0000
(13:56 +0100)
committer
Jim Procter
<jprocter@dundee.ac.uk>
Mon, 21 Apr 2014 13:09:19 +0000
(14:09 +0100)
src/jalview/gui/FeatureSettings.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/FeatureSettings.java
b/src/jalview/gui/FeatureSettings.java
index
d7f05dc
..
9e0925b
100644
(file)
--- a/
src/jalview/gui/FeatureSettings.java
+++ b/
src/jalview/gui/FeatureSettings.java
@@
-1158,13
+1158,13
@@
public class FeatureSettings extends JPanel
private String[] getDisplayedFeatureGroups()
{
String[] gps = null;
private String[] getDisplayedFeatureGroups()
{
String[] gps = null;
+ ArrayList<String> _gps = new ArrayList<String>();
if (fr != null)
{
if (fr.featureGroups != null)
{
Iterator en = fr.featureGroups.keySet().iterator();
if (fr != null)
{
if (fr.featureGroups != null)
{
Iterator en = fr.featureGroups.keySet().iterator();
- gps = new String[fr.featureColours.size()];
int g = 0;
boolean valid = false;
while (en.hasNext())
int g = 0;
boolean valid = false;
while (en.hasNext())
@@
-1174,16
+1174,15
@@
public class FeatureSettings extends JPanel
if (on != null && on.booleanValue())
{
valid = true;
if (on != null && on.booleanValue())
{
valid = true;
- gps[g++] = gp;
+ _gps.add(gp);
}
}
}
}
- while (g < gps.length)
- {
- gps[g++] = null;
- }
if (!valid)
{
return null;
if (!valid)
{
return null;
+ } else {
+ gps = new String[_gps.size()];
+ _gps.toArray(gps);
}
}
}
}
}
}