From 8327b6f4ab2f7aae0a39d26c6ceb761c5e13afb8 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Wed, 16 Nov 2016 15:59:38 +0100 Subject: [PATCH] DATAREST-935 - Prepare 3.0 development. Upgraded version numbers and dependencies to Spring Data build parent, Commons and store modules. Fixed a compiler issue in DomainObjectReader. --- pom.xml | 18 +++++++++--------- spring-data-rest-core/pom.xml | 2 +- spring-data-rest-distribution/pom.xml | 2 +- spring-data-rest-hal-browser/pom.xml | 2 +- spring-data-rest-tests/pom.xml | 2 +- .../spring-data-rest-tests-core/pom.xml | 4 ++-- .../spring-data-rest-tests-gemfire/pom.xml | 4 ++-- .../spring-data-rest-tests-jpa/pom.xml | 4 ++-- .../spring-data-rest-tests-mongodb/pom.xml | 4 ++-- .../spring-data-rest-tests-security/pom.xml | 4 ++-- .../spring-data-rest-tests-shop/pom.xml | 2 +- .../spring-data-rest-tests-solr/pom.xml | 4 ++-- spring-data-rest-webmvc/pom.xml | 2 +- .../rest/webmvc/json/DomainObjectReader.java | 5 +++-- 14 files changed, 30 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index b4d9c03e7..a0fd07ce0 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-rest-parent - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT pom Spring Data REST @@ -13,7 +13,7 @@ org.springframework.data.build spring-data-parent - 1.9.0.BUILD-SNAPSHOT + 2.0.0.BUILD-SNAPSHOT @@ -28,13 +28,13 @@ multi spring-data-rest - 1.13.0.BUILD-SNAPSHOT - 1.11.0.BUILD-SNAPSHOT - 1.10.0.BUILD-SNAPSHOT - 1.9.0.BUILD-SNAPSHOT - 2.1.0.BUILD-SNAPSHOT - 1.5.0.BUILD-SNAPSHOT - 1.2.0.BUILD-SNAPSHOT + 2.0.0.BUILD-SNAPSHOT + 2.0.0.BUILD-SNAPSHOT + 2.0.0.BUILD-SNAPSHOT + 2.0.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT + 2.0.0.BUILD-SNAPSHOT + 2.0.0.BUILD-SNAPSHOT 4.3.10.Final 1.1.0 diff --git a/spring-data-rest-core/pom.xml b/spring-data-rest-core/pom.xml index e88b8b583..83423853e 100644 --- a/spring-data-rest-core/pom.xml +++ b/spring-data-rest-core/pom.xml @@ -11,7 +11,7 @@ org.springframework.data spring-data-rest-parent - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT ../pom.xml diff --git a/spring-data-rest-distribution/pom.xml b/spring-data-rest-distribution/pom.xml index 848042713..235e8ca17 100644 --- a/spring-data-rest-distribution/pom.xml +++ b/spring-data-rest-distribution/pom.xml @@ -13,7 +13,7 @@ org.springframework.data spring-data-rest-parent - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT ../pom.xml diff --git a/spring-data-rest-hal-browser/pom.xml b/spring-data-rest-hal-browser/pom.xml index 723dd8267..21c206287 100644 --- a/spring-data-rest-hal-browser/pom.xml +++ b/spring-data-rest-hal-browser/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-rest-parent - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT spring-data-rest-hal-browser diff --git a/spring-data-rest-tests/pom.xml b/spring-data-rest-tests/pom.xml index ef7461361..eed2c2e3e 100644 --- a/spring-data-rest-tests/pom.xml +++ b/spring-data-rest-tests/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-rest-parent - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT ../pom.xml diff --git a/spring-data-rest-tests/spring-data-rest-tests-core/pom.xml b/spring-data-rest-tests/spring-data-rest-tests-core/pom.xml index 3d2b89bac..8925d8b09 100644 --- a/spring-data-rest-tests/spring-data-rest-tests-core/pom.xml +++ b/spring-data-rest-tests/spring-data-rest-tests-core/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-rest-tests - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT ../pom.xml @@ -17,7 +17,7 @@ org.springframework.data spring-data-rest-webmvc - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-data-rest-tests/spring-data-rest-tests-gemfire/pom.xml b/spring-data-rest-tests/spring-data-rest-tests-gemfire/pom.xml index 5b3afdfb5..b2b3f4d21 100644 --- a/spring-data-rest-tests/spring-data-rest-tests-gemfire/pom.xml +++ b/spring-data-rest-tests/spring-data-rest-tests-gemfire/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-rest-tests - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT ../pom.xml @@ -17,7 +17,7 @@ org.springframework.data spring-data-rest-tests-core - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT test-jar diff --git a/spring-data-rest-tests/spring-data-rest-tests-jpa/pom.xml b/spring-data-rest-tests/spring-data-rest-tests-jpa/pom.xml index 9f3ca1b29..44a31b17c 100644 --- a/spring-data-rest-tests/spring-data-rest-tests-jpa/pom.xml +++ b/spring-data-rest-tests/spring-data-rest-tests-jpa/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-rest-tests - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT ../pom.xml @@ -21,7 +21,7 @@ org.springframework.data spring-data-rest-tests-core - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT test-jar diff --git a/spring-data-rest-tests/spring-data-rest-tests-mongodb/pom.xml b/spring-data-rest-tests/spring-data-rest-tests-mongodb/pom.xml index 389381ff5..4b03002bc 100644 --- a/spring-data-rest-tests/spring-data-rest-tests-mongodb/pom.xml +++ b/spring-data-rest-tests/spring-data-rest-tests-mongodb/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-rest-tests - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT ../pom.xml @@ -17,7 +17,7 @@ org.springframework.data spring-data-rest-tests-core - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT test-jar diff --git a/spring-data-rest-tests/spring-data-rest-tests-security/pom.xml b/spring-data-rest-tests/spring-data-rest-tests-security/pom.xml index a56b53786..b6ac9e93d 100644 --- a/spring-data-rest-tests/spring-data-rest-tests-security/pom.xml +++ b/spring-data-rest-tests/spring-data-rest-tests-security/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-rest-tests - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT ../pom.xml @@ -21,7 +21,7 @@ org.springframework.data spring-data-rest-tests-core - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT test-jar diff --git a/spring-data-rest-tests/spring-data-rest-tests-shop/pom.xml b/spring-data-rest-tests/spring-data-rest-tests-shop/pom.xml index 703dece1c..c33c1a1a7 100644 --- a/spring-data-rest-tests/spring-data-rest-tests-shop/pom.xml +++ b/spring-data-rest-tests/spring-data-rest-tests-shop/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-rest-tests - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT Spring Data REST Tests - Shop diff --git a/spring-data-rest-tests/spring-data-rest-tests-solr/pom.xml b/spring-data-rest-tests/spring-data-rest-tests-solr/pom.xml index 48779968d..6bbc815d7 100644 --- a/spring-data-rest-tests/spring-data-rest-tests-solr/pom.xml +++ b/spring-data-rest-tests/spring-data-rest-tests-solr/pom.xml @@ -4,7 +4,7 @@ org.springframework.data spring-data-rest-tests - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT Spring Data REST Tests - Solr @@ -15,7 +15,7 @@ org.springframework.data spring-data-rest-tests-core - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT test-jar diff --git a/spring-data-rest-webmvc/pom.xml b/spring-data-rest-webmvc/pom.xml index 452876350..a100e8936 100644 --- a/spring-data-rest-webmvc/pom.xml +++ b/spring-data-rest-webmvc/pom.xml @@ -12,7 +12,7 @@ org.springframework.data spring-data-rest-parent - 2.6.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT ../pom.xml diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/DomainObjectReader.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/DomainObjectReader.java index 507f202f5..a2955f9e7 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/DomainObjectReader.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/DomainObjectReader.java @@ -285,8 +285,9 @@ public class DomainObjectReader { } else if (child instanceof ArrayNode && sourceValue != null) { handleArrayNode((ArrayNode) child, asCollection(sourceValue), mapper); } else { - source.put(entry.getKey(), - mapper.treeToValue(child, sourceValue == null ? Object.class : sourceValue.getClass())); + + Class target = sourceValue == null ? Object.class : sourceValue.getClass(); + source.put(entry.getKey(), mapper.treeToValue(child, target)); } fields.remove();