Skip to content

Commit

Permalink
Avoid a dependency on javax.annotation.Generated
Browse files Browse the repository at this point in the history
java.annotations.common isn't provided by default in JDK 9, see
https://bugs.openjdk.java.net/browse/JDK-8152842

This helps with #448

RELNOTES: N/A

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155635468
  • Loading branch information
cushon authored and ronshapiro committed May 23, 2017
1 parent b1e77bd commit 8596dfb
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import javax.annotation.Generated;

/**
* Encapsulates the logic of handling suppressions, both via {@code @SuppressWarnings} and via
Expand Down Expand Up @@ -105,7 +104,7 @@ public SuppressionInfo extendSuppressionSets(
VisitorState state) {

boolean newInGeneratedCode =
inGeneratedCode || ASTHelpers.hasAnnotation(sym, Generated.class, state);
inGeneratedCode || ASTHelpers.hasAnnotation(sym, "javax.annotation.Generated", state);

/**
* Handle custom suppression annotations.
Expand Down

0 comments on commit 8596dfb

Please sign in to comment.