Commits

Jan Lahoda  committed 6a2db6d

Must support compiler.warn in addition to compiler.err.

  • Participants
  • Parent commits 4cf8fea

Comments (0)

Files changed (1)

File analysis/test/j1/tutorial/javac/analysis/api/RuleTest.java

         List<String> warnings = new ArrayList<>();
         
         for (Diagnostic<? extends JavaFileObject> d : dc.getDiagnostics()) {
-            if (!"compiler.err.proc.messager".equals(d.getCode())) continue;
+            if (   !"compiler.err.proc.messager".equals(d.getCode())
+                && !"compiler.warn.proc.messager".equals(d.getCode())) continue;
             warnings.add(d.getSource().getName() + ":" + d.getStartPosition() + "-" + d.getEndPosition() + ":" + d.getMessage(Locale.ENGLISH));
         }