Skip to content

Commit 3297445

Browse files
authored
Merge pull request #194 from ericcaspole/valhalla-jep401
Valhalla JEP 401 compatibility, use bare Object instances as semaphore anchors rather than synchronizing on Integers, for better optimization.
2 parents 0a01a1f + c397184 commit 3297445

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

serializer/src/main/java/org/apache/xml/serializer/OutputPropertiesFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public final class OutputPropertiesFactory
183183
private static final int S_XALAN_PREFIX_LEN = S_XALAN_PREFIX.length();
184184

185185
/** Synchronization object for lazy initialization of the above tables. */
186-
private static Integer m_synch_object = new Integer(1);
186+
private static Object m_synch_object = new Object();
187187

188188
/** the directory in which the various method property files are located */
189189
private static final String PROP_DIR = SerializerBase.PKG_PATH+'/';

xalan/src/main/java/org/apache/xalan/transformer/TransformerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public class TransformerImpl extends Transformer
112112
// or reentry while the transform is going on.
113113

114114
/** NEEDSDOC Field m_reentryGuard */
115-
private Boolean m_reentryGuard = new Boolean(true);
115+
private Object m_reentryGuard = new Object();
116116

117117
/**
118118
* This is null unless we own the stream.

0 commit comments

Comments
 (0)