Skip to content

Commit

Permalink
Fix an error with JDK 21 EA
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 529232720
  • Loading branch information
cushon authored and Error Prone Team committed May 3, 2023
1 parent be4e826 commit 379fc7f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2547,10 +2547,13 @@ public static ErrorProneScope scope(Scope scope) {
}

public static EnumSet<Flags.Flag> asFlagSet(long flags) {
flags &= ~(Flags.ANONCONSTR_BASED | Flags.POTENTIALLY_AMBIGUOUS);
flags &= ~(Flags.ANONCONSTR_BASED | POTENTIALLY_AMBIGUOUS);
return Flags.asFlagSet(flags);
}

// Removed in JDK 21 by JDK-8026369
public static final long POTENTIALLY_AMBIGUOUS = 1L << 48;

/** Returns true if the given source code contains comments. */
public static boolean stringContainsComments(CharSequence source, Context context) {
JavaTokenizer tokenizer =
Expand Down

0 comments on commit 379fc7f

Please # to comment.