Skip to content

Commit a43b009

Browse files
committed
Squash warnings
1 parent 34e2a9b commit a43b009

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/main/java/com/jpetrak/gate/stringannotation/regexp/JavaRegexpAnnotator.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,7 @@ protected void annotateMatch(PatternRule rule, AnnotationSet outputAS, TextChunk
501501

502502
protected List<PatternRule> loadRulesList(ResourceReference patternFile) throws UnsupportedEncodingException, IOException, ResourceInstantiationException {
503503
try (BufferedReader reader = new BomStrippingInputStreamReader(patternFile.openStream(), "UTF-8")) {
504-
List<PatternRule> patternrules = new ArrayList<>();
505-
patternrules = loadRulesList(reader);
504+
List<PatternRule> patternrules = loadRulesList(reader);
506505
return patternrules;
507506
} catch (IOException ex) {
508507
throw new GateRuntimeException("Problem while reading rules", ex);
@@ -614,7 +613,7 @@ protected List<PatternRule> loadRulesList(BufferedReader reader) throws IOExcept
614613
if (groupfeatures == null) {
615614
groupfeatures = new HashMap<>();
616615
}
617-
groupfeatures.put(key, new Integer(value.substring(1)));
616+
groupfeatures.put(key, Integer.valueOf(value.substring(1)));
618617
} else if (value.matches("^\"[^\"]*\"$")) {
619618
value = value.substring(1, value.length() - 1);
620619
if (constantfeatures == null) {

0 commit comments

Comments
 (0)