We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11ca019 commit 0b2d209Copy full SHA for 0b2d209
owner/src/main/java/org/aeonbits/owner/loaders/XMLLoader.java
@@ -38,15 +38,11 @@ public class XMLLoader implements Loader {
38
private static final long serialVersionUID = -894351666332018767L;
39
private transient SAXParserFactory factory = null;
40
41
- private SAXParserFactory factory() {
+ private synchronized SAXParserFactory factory() {
42
if (factory == null) {
43
- synchronized (this) {
44
- if (factory == null) {
45
- factory = SAXParserFactory.newInstance();
46
- factory.setValidating(true);
47
- factory.setNamespaceAware(true);
48
- }
49
+ factory = SAXParserFactory.newInstance();
+ factory.setValidating(true);
+ factory.setNamespaceAware(true);
50
}
51
return factory;
52
0 commit comments