Skip to content

Commit

Permalink
Refactor instanceof expressions to use new Java 21 name syntax.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 696022041
Change-Id: I6a2f6da83de603e481bacd8a22918b5193a428f6
  • Loading branch information
katre authored and copybara-github committed Nov 13, 2024
1 parent 254e134 commit 8906c97
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,7 @@ private void checkParameter(Element param, Param paramAnnot) {

// Reject generic types C<T> other than C<?>,
// since reflective calls check only the toplevel class.
if (paramType instanceof DeclaredType) {
DeclaredType declaredType = (DeclaredType) paramType;
if (paramType instanceof DeclaredType declaredType) {
for (TypeMirror typeArg : declaredType.getTypeArguments()) {
if (!(typeArg instanceof WildcardType)) {
errorf(
Expand Down

0 comments on commit 8906c97

Please sign in to comment.