diff --git a/org.eclipse.xtext/src/org/eclipse/xtext/xtext/XtextDiagnosticConverter.java b/org.eclipse.xtext/src/org/eclipse/xtext/xtext/XtextDiagnosticConverter.java index c64d59e7063..89b5bf6cd91 100644 --- a/org.eclipse.xtext/src/org/eclipse/xtext/xtext/XtextDiagnosticConverter.java +++ b/org.eclipse.xtext/src/org/eclipse/xtext/xtext/XtextDiagnosticConverter.java @@ -86,10 +86,10 @@ protected Severity getSeverity(Diagnostic diagnostic) { } // group 1 matches the suffix in an issue code e.g. someCode from org.eclipse.xtext.Xtext.someCode - private final Pattern afterLastDot = Pattern.compile(".*\\W(\\w+)$"); + private static final Pattern afterLastDot = Pattern.compile(".*\\W(\\w+)$"); // group 1 matches the codes given in SuppressWarnings[code1, code2], e.g. "code1, code2" is returned - private final Pattern suppressWarnings = Pattern.compile("SuppressWarnings\\[([^]]*)\\]", Pattern.CASE_INSENSITIVE); - private final Splitter splitter = Splitter.on(',').trimResults().omitEmptyStrings(); + private static final Pattern suppressWarnings = Pattern.compile("SuppressWarnings\\[([^]]*)\\]", Pattern.CASE_INSENSITIVE); + private static final Splitter splitter = Splitter.on(',').trimResults().omitEmptyStrings(); private static final String ALL = "all"; protected boolean isMarkedAsIgnored(EObject object, String code) {