Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Sep 7, 2022
1 parent 743c062 commit 1e941a9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -808,12 +808,14 @@ private static boolean isFinal(Symbol symbol) {
}

/**
* Flag for a record class, its canonical constructor and components. Can be replaced by {@code
* Flag for a record class and its canonical constructor. Can be replaced by {@code
* com.sun.tools.javac.code.Flags.RECORD} once the minimum JDK version is 14.
*/
private static final long RECORD_FLAG = 1L << 61;

/** Returns true if the given {@link Symbol} is a record. */
/**
* Returns true if the given {@link Symbol} is a record or the canonical constructor of a record.
*/
public static boolean isRecord(Symbol symbol) {
return (symbol.flags() & RECORD_FLAG) == RECORD_FLAG;
}
Expand Down

0 comments on commit 1e941a9

Please sign in to comment.