Skip to content

Annotation type and annotation's creation method (create_XXXX) are missing #815

@chainans

Description

@chainans

We use the translated jackson-annotation and it seems that the translated code of the inner annotation does not generated correctly. (It was ok in earlier release) All inner annotation types becomes missing in translated code (in below example, value and name are missing from translated code). Also, the create_XXXX method (in this case, create_ComFasterxmlJacksonAnnotationJsonSubTypes_Type) also went missing. Here is a java file you can try to see the problem. (It is a modified version of original file from jackson-annotation lib to allow translation as single file) Also, I have attached a translated .h and .m translated with older release (with _old suffix) and the latest j2objc code (with _new suffix).

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE, ElementType.FIELD,
      ElementType.METHOD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface JsonSubTypes {
    public Type[] value();

    public @interface Type {
        public Class value();
        public String name() default "";
    }
}

JsonSubType.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions