SWS-921 Use varargs for XSD schemas

XML schema validation accepting multiple schemas currently uses arrays
of Resource objects. They would be a bit easier and more succinct to
use if the setters were switched to varargs. Such a change would be
backwards compatible.

This change includes:

 * change AbstractValidatingInterceptor#setSchemas to use varargs
 * change the CommonsXsdSchemaCollection constructor to use varargs
 * change CommonsXsdSchemaCollection.setXsds to use varargs
 * update the tests to use varargs

Issue: SWS-921
https://jira.spring.io/browse/SWS-921
This commit is contained in:
Philippe Marschall
2015-10-16 08:28:30 +02:00
committed by Greg Turnquist
parent 35f3fb9102
commit 3c7a6b9911
8 changed files with 32 additions and 33 deletions

View File

@@ -87,7 +87,7 @@ public class CommonsXsdSchemaCollection implements XsdSchemaCollection, Initiali
*
* @param resources the schema resources to load
*/
public CommonsXsdSchemaCollection(Resource[] resources) {
public CommonsXsdSchemaCollection(Resource... resources) {
this.xsdResources = resources;
}
@@ -96,7 +96,7 @@ public class CommonsXsdSchemaCollection implements XsdSchemaCollection, Initiali
*
* @param xsdResources the schema resources to be loaded
*/
public void setXsds(Resource[] xsdResources) {
public void setXsds(Resource... xsdResources) {
this.xsdResources = xsdResources;
}