Sonar fixes

- a few complexities
- final method calls from ctor
- raw exception throwing
- useless overrides
- loss of stack trace
This commit is contained in:
Gary Russell
2019-04-29 16:34:39 -04:00
committed by Artem Bilan
parent 7569d0ad79
commit 36c33bb5ab
45 changed files with 134 additions and 114 deletions

View File

@@ -29,6 +29,7 @@ import org.springframework.xml.DocumentBuilderFactoryUtils;
/**
* @author Jonas Partner
* @author Artem Bilan
* @author Gary Russell
*/
public class DomResultFactory implements ResultFactory {
@@ -46,13 +47,14 @@ public class DomResultFactory implements ResultFactory {
}
@Override
public synchronized Result createResult(Object payload) {
try {
return new DOMResult(getNewDocumentBuilder().newDocument());
}
catch (ParserConfigurationException e) {
throw new MessagingException("failed to create Result for payload type [" +
payload.getClass().getName() + "]");
payload.getClass().getName() + "]", e);
}
}