Skip to content
This repository was archived by the owner on Jun 26, 2021. It is now read-only.

Commit e7d28b2

Browse files
committed
Make ResourceProperty inherit the abstract BeanProperty.Std instead of implementing the interface, to avoid incompatibility with jackson 2.6.0
1 parent b027276 commit e7d28b2

1 file changed

Lines changed: 10 additions & 54 deletions

File tree

emfjson-jackson/src/main/java/org/emfjson/jackson/databind/deser/ResourceProperty.java

Lines changed: 10 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,28 @@
1111
*/
1212
package org.emfjson.jackson.databind.deser;
1313

14-
import com.fasterxml.jackson.databind.*;
15-
import com.fasterxml.jackson.databind.introspect.AnnotatedMember;
16-
import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonObjectFormatVisitor;
14+
import com.fasterxml.jackson.databind.BeanProperty;
15+
import com.fasterxml.jackson.databind.JavaType;
16+
import com.fasterxml.jackson.databind.PropertyMetadata;
17+
import com.fasterxml.jackson.databind.PropertyName;
18+
import com.fasterxml.jackson.databind.introspect.AnnotationMap;
1719
import com.fasterxml.jackson.databind.type.SimpleType;
1820
import org.eclipse.emf.ecore.EObject;
1921
import org.eclipse.emf.ecore.resource.Resource;
2022
import org.eclipse.emf.ecore.resource.ResourceSet;
2123
import org.emfjson.common.ReferenceEntries;
2224

23-
import java.lang.annotation.Annotation;
24-
25-
public class ResourceProperty implements BeanProperty {
25+
public class ResourceProperty extends BeanProperty.Std {
2626

2727
private final ResourceSet resourceSet;
2828
private final Resource resource;
2929
private final ReferenceEntries entries;
3030

31+
private static final JavaType type = SimpleType.construct(EObject.class);
32+
private static final PropertyName propertyName = PropertyName.construct("contents", "org.emfjson.resource");
33+
3134
public ResourceProperty(ResourceSet resourceSet, Resource resource, ReferenceEntries entries) {
35+
super(propertyName, type, propertyName, new AnnotationMap(), null, PropertyMetadata.STD_REQUIRED);
3236
this.resourceSet = resourceSet;
3337
this.resource = resource;
3438
this.entries = entries;
@@ -46,52 +50,4 @@ public ReferenceEntries getEntries() {
4650
return entries;
4751
}
4852

49-
@Override
50-
public String getName() {
51-
return "contents";
52-
}
53-
54-
@Override
55-
public PropertyName getFullName() {
56-
return PropertyName.construct("contents", "org.emfjson.resource");
57-
}
58-
59-
@Override
60-
public JavaType getType() {
61-
return SimpleType.construct(EObject.class);
62-
}
63-
64-
@Override
65-
public PropertyName getWrapperName() {
66-
return null;
67-
}
68-
69-
@Override
70-
public PropertyMetadata getMetadata() {
71-
return null;
72-
}
73-
74-
@Override
75-
public boolean isRequired() {
76-
return false;
77-
}
78-
79-
@Override
80-
public <A extends Annotation> A getAnnotation(Class<A> acls) {
81-
return null;
82-
}
83-
84-
@Override
85-
public <A extends Annotation> A getContextAnnotation(Class<A> acls) {
86-
return null;
87-
}
88-
89-
@Override
90-
public AnnotatedMember getMember() {
91-
return null;
92-
}
93-
94-
@Override
95-
public void depositSchemaProperty(JsonObjectFormatVisitor objectVisitor) throws JsonMappingException {}
96-
9753
}

0 commit comments

Comments
 (0)