From 8596dfb9f6dfc7bb5789bc6c3ba3f8b81b13b749 Mon Sep 17 00:00:00 2001 From: cushon Date: Wed, 10 May 2017 09:14:29 -0700 Subject: [PATCH] Avoid a dependency on javax.annotation.Generated 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 --- .../src/main/java/com/google/errorprone/SuppressionHelper.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/check_api/src/main/java/com/google/errorprone/SuppressionHelper.java b/check_api/src/main/java/com/google/errorprone/SuppressionHelper.java index 2e14f409343..aa06af9c8fa 100644 --- a/check_api/src/main/java/com/google/errorprone/SuppressionHelper.java +++ b/check_api/src/main/java/com/google/errorprone/SuppressionHelper.java @@ -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 @@ -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.