We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1eb5a71 commit 5cfd2ecCopy full SHA for 5cfd2ec
check_api/src/main/java/com/google/errorprone/JavacErrorDescriptionListener.java
@@ -32,6 +32,7 @@
32
import com.sun.tools.javac.util.Log;
33
import java.io.IOException;
34
import java.io.UncheckedIOException;
35
+import java.util.EnumSet;
36
import java.util.HashMap;
37
import java.util.List;
38
import java.util.Map;
@@ -119,7 +120,8 @@ public void onDescribed(Description description) {
119
120
factory.create(
121
type,
122
/* lintCategory */ null,
- DIAGNOSTIC_FLAGS,
123
+ // Make a defensive copy, as JDK at head mutates its arguments.
124
+ EnumSet.copyOf(DIAGNOSTIC_FLAGS),
125
log.currentSource(),
126
pos,
127
MESSAGE_BUNDLE_KEY,
0 commit comments