aboutsummaryrefslogtreecommitdiff
path: root/factory
diff options
context:
space:
mode:
authorcushon <cushon@google.com>2018-01-31 16:22:44 -0800
committerRon Shapiro <shapiro.rd@gmail.com>2018-02-01 16:14:58 -0500
commit99af6e1a50af37739e717924877e4d6ece2d9b3a (patch)
tree136a8ccc738e7bbed7eee1afad11830beeb99485 /factory
parent53d1d2add95db44e034b1a4fc7d47fc214957066 (diff)
downloadauto-99af6e1a50af37739e717924877e4d6ece2d9b3a.tar.gz
Fix handling of @Generated in tests after 715b8eb505649a4acaaa5889d4f4b51a91dd8a91, 0383c1cf7472d7444463353aa2ac956c9471130a
RELNOTES=N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=184065172
Diffstat (limited to 'factory')
-rw-r--r--factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorTest.java b/factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorTest.java
index b3d977eb..293a9deb 100644
--- a/factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorTest.java
+++ b/factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorTest.java
@@ -29,6 +29,7 @@ import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.Collections;
import java.util.List;
+import javax.lang.model.SourceVersion;
import javax.tools.JavaFileObject;
import org.junit.Rule;
import org.junit.Test;
@@ -446,8 +447,7 @@ public class AutoFactoryProcessorTest {
}
private boolean isJavaxAnnotationProcessingGeneratedAvailable() {
- return compilationRule.getElements().getTypeElement("javax.annotation.processing.Generated")
- != null;
+ return SourceVersion.latestSupported().compareTo(SourceVersion.RELEASE_8) > 0;
}
private static void replaceGeneratedImport(List<String> sourceLines) {