From 3ed2912dc6d73589f477424fc9c06378763dfdde Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Fri, 2 Aug 2019 11:39:13 -0700 Subject: [PATCH] Use javax.lang.model APIs instead of javac implementation classes --- .../litho/specmodels/processor/TestTargetExtractor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litho-processor/src/main/java/com/facebook/litho/specmodels/processor/TestTargetExtractor.java b/litho-processor/src/main/java/com/facebook/litho/specmodels/processor/TestTargetExtractor.java index 698896c5a9..2adc3e30a1 100644 --- a/litho-processor/src/main/java/com/facebook/litho/specmodels/processor/TestTargetExtractor.java +++ b/litho-processor/src/main/java/com/facebook/litho/specmodels/processor/TestTargetExtractor.java @@ -17,9 +17,9 @@ package com.facebook.litho.specmodels.processor; import com.facebook.litho.annotations.TestSpec; -import com.sun.tools.javac.code.Type; import javax.annotation.Nullable; import javax.lang.model.element.TypeElement; +import javax.lang.model.type.DeclaredType; import javax.lang.model.type.MirroredTypeException; import javax.lang.model.type.TypeMirror; @@ -31,7 +31,7 @@ public static TypeElement getTestSpecValue(TypeElement element) { element.getAnnotation(TestSpec.class).value(); } catch (MirroredTypeException e) { final TypeMirror typeMirror = e.getTypeMirror(); - return (TypeElement) ((Type.ClassType) typeMirror).asElement(); + return (TypeElement) ((DeclaredType) typeMirror).asElement(); } return null;