From 92dd5b8b85fcecad6d40c524c62f6a5da1dfd69f Mon Sep 17 00:00:00 2001 From: nickreid Date: Thu, 6 Jun 2019 14:51:13 -0700 Subject: [PATCH] Suppress some rawtype and unchecked cast warnings. In theory these should be fixed but that would require a non-trival redesign in some cases. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=251932243 --- src/com/google/javascript/jscomp/graph/Annotatable.java | 4 ++-- .../google/javascript/jscomp/transpile/CachingTranspiler.java | 1 + test/com/google/javascript/jscomp/CompilerTestCase.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/google/javascript/jscomp/graph/Annotatable.java b/src/com/google/javascript/jscomp/graph/Annotatable.java index 60d7e66b40b..9de5ae2c2c9 100644 --- a/src/com/google/javascript/jscomp/graph/Annotatable.java +++ b/src/com/google/javascript/jscomp/graph/Annotatable.java @@ -31,8 +31,8 @@ public interface Annotatable { /** * Retrieves a piece of information that has been annotated. * - * @return The annotation or null if the object has not - * been annotated. + * @return The annotation or null if the object has not been annotated. */ + @SuppressWarnings("unchecked") A getAnnotation(); } diff --git a/src/com/google/javascript/jscomp/transpile/CachingTranspiler.java b/src/com/google/javascript/jscomp/transpile/CachingTranspiler.java index b0357a4a2a9..379e35a44fa 100644 --- a/src/com/google/javascript/jscomp/transpile/CachingTranspiler.java +++ b/src/com/google/javascript/jscomp/transpile/CachingTranspiler.java @@ -38,6 +38,7 @@ public final class CachingTranspiler implements Transpiler { private final LoadingCache cache; private final Supplier runtime; + @SuppressWarnings("unchecked") public CachingTranspiler( final Transpiler delegate, CacheBuilder builder) { checkNotNull(delegate); diff --git a/test/com/google/javascript/jscomp/CompilerTestCase.java b/test/com/google/javascript/jscomp/CompilerTestCase.java index 89b779df0e5..267f0597c07 100644 --- a/test/com/google/javascript/jscomp/CompilerTestCase.java +++ b/test/com/google/javascript/jscomp/CompilerTestCase.java @@ -1650,7 +1650,7 @@ private void testInternal( .that(externsDifference.entriesDiffering()) .isEmpty(); - MapDifference sourceDifference = + MapDifference sourceDifference = Maps.difference( compiler.getSourceGetterAndSetterProperties(), GatherGettersAndSetterProperties.gather(compiler, mainRoot));