Projects
home:Eustace:branches:Eulaceura:Factory
springframework-hateoas
_service:obs_scm:springframework-hateoas-0.16.0...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:springframework-hateoas-0.16.0-jackson2.7.patch of Package springframework-hateoas
diff -Nru spring-hateoas-0.16.0.RELEASE/src/main/java/org/springframework/hateoas/hal/Jackson2HalModule.java spring-hateoas-0.16.0.RELEASE.jackson/src/main/java/org/springframework/hateoas/hal/Jackson2HalModule.java --- spring-hateoas-0.16.0.RELEASE/src/main/java/org/springframework/hateoas/hal/Jackson2HalModule.java 2014-07-28 09:36:58.000000000 +0200 +++ spring-hateoas-0.16.0.RELEASE.jackson/src/main/java/org/springframework/hateoas/hal/Jackson2HalModule.java 2016-08-30 01:50:15.485305633 +0200 @@ -108,6 +108,8 @@ */ public static class HalLinkListSerializer extends ContainerSerializer<List<Link>> implements ContextualSerializer { + private static final long serialVersionUID = -1844788111509966406L; + private final BeanProperty property; private final CurieProvider curieProvider; @@ -117,7 +119,8 @@ public HalLinkListSerializer(BeanProperty property, CurieProvider curieProvider) { - super(List.class, false); + super(TypeFactory.defaultInstance().constructType(List.class)); + this.property = property; this.curieProvider = curieProvider; } @@ -236,6 +239,8 @@ */ public static class HalResourcesSerializer extends ContainerSerializer<Collection<?>> implements ContextualSerializer { + private static final long serialVersionUID = 8030706944344625390L; + private final BeanProperty property; private final RelProvider relProvider; private final boolean enforceEmbeddedCollections; @@ -246,7 +251,7 @@ public HalResourcesSerializer(BeanProperty property, RelProvider relProvider, boolean enforceEmbeddedCollections) { - super(Collection.class, false); + super(TypeFactory.defaultInstance().constructType(Collection.class)); this.property = property; this.relProvider = relProvider; @@ -314,6 +319,8 @@ public static class OptionalListJackson2Serializer extends ContainerSerializer<Object> implements ContextualSerializer { + private static final long serialVersionUID = 3700806118177419817L; + private final BeanProperty property; private final Map<Class<?>, JsonSerializer<Object>> serializers; @@ -328,7 +335,8 @@ */ public OptionalListJackson2Serializer(BeanProperty property) { - super(List.class, false); + super(TypeFactory.defaultInstance().constructType(List.class)); + this.property = property; this.serializers = new HashMap<Class<?>, JsonSerializer<Object>>(); } @@ -447,9 +455,8 @@ private static final long serialVersionUID = 6420432361123210955L; - @SuppressWarnings("deprecation") public HalLinkListDeserializer() { - super(List.class); + super(TypeFactory.defaultInstance().constructCollectionLikeType(List.class, Link.class)); } /* @@ -514,15 +521,14 @@ private JavaType contentType; public HalResourcesDeserializer() { - this(List.class, null); + this(TypeFactory.defaultInstance().constructCollectionLikeType(List.class, Object.class), null); } public HalResourcesDeserializer(JavaType vc) { this(null, vc); } - @SuppressWarnings("deprecation") - private HalResourcesDeserializer(Class<?> type, JavaType contentType) { + private HalResourcesDeserializer(JavaType type, JavaType contentType) { super(type); this.contentType = contentType; @@ -567,7 +573,6 @@ if (JsonToken.START_ARRAY.equals(jp.nextToken())) { while (!JsonToken.END_ARRAY.equals(jp.nextToken())) { object = deser.deserialize(jp, ctxt); - ; result.add(object); } } else { @@ -668,6 +673,8 @@ */ public static class TrueOnlyBooleanSerializer extends NonTypedScalarSerializerBase<Boolean> { + private static final long serialVersionUID = 5817795880782727569L; + public TrueOnlyBooleanSerializer() { super(Boolean.class); } diff -Nru spring-hateoas-0.16.0.RELEASE/src/main/java/org/springframework/hateoas/hal/ResourcesMixin.java spring-hateoas-0.16.0.RELEASE.jackson/src/main/java/org/springframework/hateoas/hal/ResourcesMixin.java --- spring-hateoas-0.16.0.RELEASE/src/main/java/org/springframework/hateoas/hal/ResourcesMixin.java 2014-07-28 09:36:58.000000000 +0200 +++ spring-hateoas-0.16.0.RELEASE.jackson/src/main/java/org/springframework/hateoas/hal/ResourcesMixin.java 2016-08-30 01:52:56.799240097 +0200 @@ -21,6 +21,8 @@ import org.springframework.hateoas.Resources; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; @@ -30,7 +32,8 @@ @Override @XmlElement(name = "embedded") @JsonProperty("_embedded") - @JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY, using = Jackson2HalModule.HalResourcesSerializer.class) + @JsonInclude(Include.NON_EMPTY) + @JsonSerialize(using = Jackson2HalModule.HalResourcesSerializer.class) @JsonDeserialize(using = Jackson2HalModule.HalResourcesDeserializer.class) public abstract Collection<T> getContent();
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2