From a4b7cea5836ba3551e8aa9e120922273c3f4f10a Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Wed, 25 Jan 2012 09:35:59 +0000 Subject: [PATCH] SWS-647 - PayloadValidatingInterceptor throws IllegalArgumentException when passed a schema collection --- .../springframework/xml/xsd/commons/CommonsXsdSchema.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xml/src/main/java/org/springframework/xml/xsd/commons/CommonsXsdSchema.java b/xml/src/main/java/org/springframework/xml/xsd/commons/CommonsXsdSchema.java index 0e1851a2..ebe0c5b6 100644 --- a/xml/src/main/java/org/springframework/xml/xsd/commons/CommonsXsdSchema.java +++ b/xml/src/main/java/org/springframework/xml/xsd/commons/CommonsXsdSchema.java @@ -1,11 +1,11 @@ /* - * Copyright 2005-2010 the original author or authors. + * Copyright 2005-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -95,8 +95,7 @@ public class CommonsXsdSchema implements XsdSchema { public Source getSource() { // try to use the the package-friendly XmlSchemaSerializer first, fall back to slower stream-based version try { - XmlSchemaSerializer serializer = (XmlSchemaSerializer) BeanUtils.instantiateClass(XmlSchemaSerializer.class) - ; + XmlSchemaSerializer serializer = BeanUtils.instantiateClass(XmlSchemaSerializer.class); if (collection != null) { serializer.setExtReg(collection.getExtReg()); }