checkstyle HideUtilityClassConstructor

https://sonar.spring.io/issues/search#componentRoots=org.springframework.integration%3Aspring-integration|createdAt=2016-04-01T10%3A00%3A36%2B0000|sort=UPDATE_DATE|asc=false
This commit is contained in:
Gary Russell
2016-04-01 10:30:25 -04:00
committed by Artem Bilan
parent b363bdb15e
commit 43af472c3a
34 changed files with 226 additions and 79 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2010 the original author or authors.
* Copyright 2002-2016 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.
@@ -17,7 +17,11 @@
package org.springframework.integration.xml.config;
public class TestXmlApplicationContextHelper {
private TestXmlApplicationContextHelper() {
super();
}
public static TestXmlApplicationContext getTestAppContext(String xmlFragment) {
String xml = header + xmlFragment + footer;
TestXmlApplicationContext ctx = new TestXmlApplicationContext(xml);
@@ -30,7 +34,7 @@ public class TestXmlApplicationContextHelper {
+ "xmlns:si='http://www.springframework.org/schema/integration' "
+ "xmlns:util='http://www.springframework.org/schema/util' "
+ "xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' "
+ "xmlns:context='http://www.springframework.org/schema/context' "
+ "xmlns:context='http://www.springframework.org/schema/context' "
+ "xsi:schemaLocation="
+ "'http://www.springframework.org/schema/beans "
+ "http://www.springframework.org/schema/beans/spring-beans.xsd "

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2016 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.
@@ -25,21 +25,26 @@ import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.dom.DOMSource;
import org.springframework.xml.transform.StringResult;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.springframework.xml.transform.StringResult;
/**
* Utility class for XML related testing
*
*
* @author Jonas Partner
*/
public class XmlTestUtil {
private XmlTestUtil() {
super();
}
public static Document getDocumentForString(String strDoc) throws Exception {
DocumentBuilderFactory builder = DocumentBuilderFactory.newInstance();
builder.setNamespaceAware(true);
return builder.newDocumentBuilder().parse(
new InputSource(new StringReader(strDoc)));
}
@@ -68,8 +73,8 @@ public class XmlTestUtil {
transform(source, stringResult);
return stringResult.toString();
}
public static void transform(Source source, Result res) throws Exception {
TransformerFactory.newInstance().newTransformer().transform(source, res);
}