You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While if I provide my own DBF to DiffBuilder, above creation will be useless anyway due to override.
Since DOMDifferenceEngine is only used by DiffBuilder, I think it could be package private, and a constructor with DBF could be provided. (let DiffBuilder inject a DBF to it, either new or provided by caller).
Pretty much like the way to handle WhitespaceNormalizedSource.
I raise this issue because I observed some of my threads during LnP are running at below stack:
lang.Thread.State: RUNNABLE
at java.net.URLStreamHandler.parseURL(URLStreamHandler.java:255)
at java.net.URL.(URL.java:640)
at java.net.URL.(URL.java:508)
at sun.misc.URLClassPath$Loader.findResource(URLClassPath.java:701)
at sun.misc.URLClassPath.findResource(URLClassPath.java:225)
at java.net.URLClassLoader$2.run(URLClassLoader.java:572)
at java.net.URLClassLoader$2.run(URLClassLoader.java:570)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findResource(URLClassLoader.java:569)
at org.springframework.boot.loader.LaunchedURLClassLoader.findResource(LaunchedURLClassLoader.java:53)
at java.lang.ClassLoader.getResource(ClassLoader.java:1090)
at java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:233)
at org.apache.xerces.parsers.SecuritySupport$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.xerces.parsers.SecuritySupport.getResourceAsStream(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.DOMParser.(Unknown Source)
at org.apache.xerces.parsers.DOMParser.(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.setFeature(Unknown Source)
Which indicate DBF's creation is a heavy operation.
(I already have my own thread-local bases DBF passed into DiffBuilder)
Thanks in advance for looking into it.
Leon
The text was updated successfully, but these errors were encountered:
DOMDifferenceEngine and DiffBuilder live in separate packages, so package private is not an option. To me the builder API has always been an alternative API to creating DOMDifferenceEngine directly so it has to stay public anyway.
Back when I added setDocumentFactory I should have chosen a new constructor instead, I don't recall why I opted for the setter.
In DOMDifferenceEngine, we have:
While if I provide my own DBF to DiffBuilder, above creation will be useless anyway due to override.
Since DOMDifferenceEngine is only used by DiffBuilder, I think it could be package private, and a constructor with DBF could be provided. (let DiffBuilder inject a DBF to it, either new or provided by caller).
Pretty much like the way to handle WhitespaceNormalizedSource.
I raise this issue because I observed some of my threads during LnP are running at below stack:
lang.Thread.State: RUNNABLE
at java.net.URLStreamHandler.parseURL(URLStreamHandler.java:255)
at java.net.URL.(URL.java:640)
at java.net.URL.(URL.java:508)
at sun.misc.URLClassPath$Loader.findResource(URLClassPath.java:701)
at sun.misc.URLClassPath.findResource(URLClassPath.java:225)
at java.net.URLClassLoader$2.run(URLClassLoader.java:572)
at java.net.URLClassLoader$2.run(URLClassLoader.java:570)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findResource(URLClassLoader.java:569)
at org.springframework.boot.loader.LaunchedURLClassLoader.findResource(LaunchedURLClassLoader.java:53)
at java.lang.ClassLoader.getResource(ClassLoader.java:1090)
at java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:233)
at org.apache.xerces.parsers.SecuritySupport$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.xerces.parsers.SecuritySupport.getResourceAsStream(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.DOMParser.(Unknown Source)
at org.apache.xerces.parsers.DOMParser.(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.setFeature(Unknown Source)
Which indicate DBF's creation is a heavy operation.
(I already have my own thread-local bases DBF passed into DiffBuilder)
Thanks in advance for looking into it.
Leon
The text was updated successfully, but these errors were encountered: