X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FParseProperties.java;h=bfd4d6a9ee7b6585a284e0929bf5b1f94f98e2cc;hb=841485c28403b4a8e00c9bddae9caa9411667b8a;hp=629a8a3454d89144e211ebc3841e6591c65ee1a2;hpb=f4766a7bbcfae845fc95923b01fa14ff83d589ff;p=jalview.git diff --git a/src/jalview/analysis/ParseProperties.java b/src/jalview/analysis/ParseProperties.java index 629a8a3..bfd4d6a 100644 --- a/src/jalview/analysis/ParseProperties.java +++ b/src/jalview/analysis/ParseProperties.java @@ -23,6 +23,7 @@ package jalview.analysis; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceI; +import jalview.util.Platform; import com.stevesoft.pat.Regex; @@ -90,7 +91,7 @@ public class ParseProperties String[] ScoreDescriptions, String regex, boolean repeat) { int count = 0; - Regex pattern = new Regex(regex); + Regex pattern = Platform.newRegex(regex); if (pattern.numSubs() > ScoreNames.length) { // Check that we have enough labels and descriptions for any parsed @@ -134,7 +135,7 @@ public class ParseProperties double score = Double.NaN; try { - score = new Double(sstring).doubleValue(); + score = Double.valueOf(sstring).doubleValue(); } catch (Exception e) { // don't try very hard to parse if regex was wrong.