Remove unused code: nullability is only generated in declarations and the generated method copyWithZone: does not have a declaration.
Change on 2018/08/21 by antoniocortes
@@ -29,9 +29,7 @@ import com.google.devtools.j2objc.ast.TreeUtil;
import com.google.devtools.j2objc.ast.TypeDeclaration;
import com.google.devtools.j2objc.ast.UnitTreeVisitor;
import com.google.devtools.j2objc.types.ExecutablePair;
-import com.google.devtools.j2objc.types.GeneratedAnnotationMirror;
import com.google.devtools.j2objc.types.GeneratedExecutableElement;
-import com.google.devtools.j2objc.types.GeneratedTypeElement;
import com.google.devtools.j2objc.types.GeneratedVariableElement;
import com.google.devtools.j2objc.types.NativeType;
import com.google.devtools.j2objc.util.ElementUtil;
@@ -42,7 +40,6 @@ import com.google.devtools.j2objc.util.TypeUtil;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
-import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.TypeMirror;
/**
@@ -145,11 +142,6 @@ public class JavaToIOSMethodTranslator extends UnitTreeVisitor {
// Add NSZone *zone parameter.
GeneratedVariableElement zoneParam =
GeneratedVariableElement.newParameter("zone", NSZONE_TYPE, copyElement);
- if (options.nullability()) {
- DeclaredType annotationType = (DeclaredType)
- GeneratedTypeElement.newEmulatedInterface("javax.annotation.Nullable").asType();
- zoneParam.addAnnotationMirror(new GeneratedAnnotationMirror(annotationType));
- }
copyElement.addParameter(zoneParam);
copyDecl.addParameter(new SingleVariableDeclaration(zoneParam));
