Fix a bunch of compiler warnings by adding to code generated by
@@ -21,6 +21,7 @@ import com.google.devtools.build.lib.skyframe.serialization.SerializationContext
import com.google.devtools.build.lib.skyframe.serialization.SerializationException;
import com.google.protobuf.CodedInputStream;
import com.google.protobuf.CodedOutputStream;
+import com.squareup.javapoet.AnnotationSpec;
import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.ParameterizedTypeName;
@@ -80,6 +81,10 @@ class AutoCodecUtil {
.addModifiers(Modifier.PUBLIC)
.returns(void.class)
.addAnnotation(Override.class)
+ .addAnnotation(
+ AnnotationSpec.builder(ClassName.get(SuppressWarnings.class))
+ .addMember("value", "$S", "unchecked")
+ .build())
.addException(SerializationException.class)
.addException(IOException.class)
.addParameter(SerializationContext.class, "context")
