From af56889e72f0ce9551f8e7d198796a74775083a1 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Mon, 24 Jul 2017 14:12:50 +0200 Subject: [PATCH] DATACMNS-1123 - Upgraded to XmlBeam 1.4.12 and tweaked HttpMessageConverter implementation. XmlBeam 1.4.11 accidentally removed ProjectionFactory as public interface. Adapted our HttpMessageConverter implementation to make sure we still work on those versions. Related ticket: https://github.com/SvenEwald/xmlbeam/issues/45 --- pom.xml | 2 +- .../springframework/data/web/XmlBeamHttpMessageConverter.java | 3 +-- .../config/SpringDataWebConfigurationIntegrationTests.java | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 032112212..ea13c4f42 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 2.0.4 0.9.0 2.11.7 - 1.4.8 + 1.4.12 diff --git a/src/main/java/org/springframework/data/web/XmlBeamHttpMessageConverter.java b/src/main/java/org/springframework/data/web/XmlBeamHttpMessageConverter.java index 3c291188f..9f6107d6c 100644 --- a/src/main/java/org/springframework/data/web/XmlBeamHttpMessageConverter.java +++ b/src/main/java/org/springframework/data/web/XmlBeamHttpMessageConverter.java @@ -30,7 +30,6 @@ import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.HttpMessageNotReadableException; import org.springframework.http.converter.HttpMessageNotWritableException; import org.springframework.util.ConcurrentReferenceHashMap; -import org.xmlbeam.ProjectionFactory; import org.xmlbeam.XBProjector; /** @@ -43,7 +42,7 @@ import org.xmlbeam.XBProjector; */ public class XmlBeamHttpMessageConverter extends AbstractHttpMessageConverter { - private final ProjectionFactory projectionFactory; + private final XBProjector projectionFactory; private final Map, Boolean> supportedTypesCache = new ConcurrentReferenceHashMap<>(); /** diff --git a/src/test/java/org/springframework/data/web/config/SpringDataWebConfigurationIntegrationTests.java b/src/test/java/org/springframework/data/web/config/SpringDataWebConfigurationIntegrationTests.java index 4347ac044..f4205eb13 100644 --- a/src/test/java/org/springframework/data/web/config/SpringDataWebConfigurationIntegrationTests.java +++ b/src/test/java/org/springframework/data/web/config/SpringDataWebConfigurationIntegrationTests.java @@ -27,7 +27,7 @@ import org.springframework.data.classloadersupport.HidingClassLoader; import org.springframework.data.web.ProjectingJackson2HttpMessageConverter; import org.springframework.data.web.XmlBeamHttpMessageConverter; import org.springframework.http.converter.HttpMessageConverter; -import org.xmlbeam.ProjectionFactory; +import org.xmlbeam.XBProjector; import com.fasterxml.jackson.databind.ObjectMapper; import com.jayway.jsonpath.DocumentContext; @@ -66,7 +66,7 @@ public class SpringDataWebConfigurationIntegrationTests { List> converters = new ArrayList>(); - ClassLoader classLoader = HidingClassLoader.hide(ProjectionFactory.class); + ClassLoader classLoader = HidingClassLoader.hide(XBProjector.class); createConfigWithClassLoader(classLoader).extendMessageConverters(converters); assertThat(converters).areNot(instanceWithClassName(XmlBeamHttpMessageConverter.class));