aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/moazs/scheme
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-10-30 15:54:56 +0100
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-10-30 16:04:03 +0100
commitfca03ea334be5eb34e919a5cc7ca8bc25d79a564 (patch)
tree6566a09b7a51ee4bf0aef3a828ba15e55d5c0166 /src/main/java/at/gv/egiz/moazs/scheme
parent5a28668a1db53cd5fe54b65aeaf88b241918c01b (diff)
downloadmoa-zs-fca03ea334be5eb34e919a5cc7ca8bc25d79a564.tar.gz
moa-zs-fca03ea334be5eb34e919a5cc7ca8bc25d79a564.tar.bz2
moa-zs-fca03ea334be5eb34e919a5cc7ca8bc25d79a564.zip
Remove JAXB Class Not Found Fix
- Problem: Apparently I used the wrong executor when supplying the backend tasks via CompletableFuture.supplyAsync(). This method relies on ForkJoinPool.commonPool(), and threads in this pool are not configured correctly? - Solution: Use spring-boots auto-configured TaskExecutor. - More Information on this issue can be found here: https://issues.apache.org/jira/browse/CXF-8100#
Diffstat (limited to 'src/main/java/at/gv/egiz/moazs/scheme')
-rw-r--r--src/main/java/at/gv/egiz/moazs/scheme/Marshaller.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/scheme/Marshaller.java b/src/main/java/at/gv/egiz/moazs/scheme/Marshaller.java
index 3c144d4..8722cf4 100644
--- a/src/main/java/at/gv/egiz/moazs/scheme/Marshaller.java
+++ b/src/main/java/at/gv/egiz/moazs/scheme/Marshaller.java
@@ -30,8 +30,6 @@ import java.io.InputStream;
import java.io.StringWriter;
import java.util.HashMap;
-import static at.gv.egiz.moazs.util.JAXBClassNotFoundFix.runInTheadWithClassClassLoader;
-
/**
* @author xerx593
* Source: https://stackoverflow.com/questions/44676532/how-to-use-spring-to-marshal-and-unmarshal-xml
@@ -63,14 +61,11 @@ public class Marshaller {
StringWriter sw = new StringWriter();
Result result = new StreamResult(sw);
- return runInTheadWithClassClassLoader(() -> {
- jaxbMarshaller.marshal(obj, result);
- return sw.toString();
- });
+ jaxbMarshaller.marshal(obj, result);
+ return sw.toString();
}
public <T> T unmarshallXml(final InputStream xml) {
- return runInTheadWithClassClassLoader(
- () -> (T) jaxbMarshaller.unmarshal(new StreamSource(xml)));
+ return (T) jaxbMarshaller.unmarshal(new StreamSource(xml));
}
}