File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
kernel/src/main/java/com/itextpdf/kernel/counter/data Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ This file is part of the iText (R) project.
7171 * @param <V> data type
7272 */
7373public abstract class EventDataHandler <T , V extends EventData <T >> {
74+ private final Object createLock = new Object ();
7475 private final Object processLock = new Object ();
7576
7677 private final IEventDataCache <T , V > cache ;
@@ -97,8 +98,7 @@ public List<V> clear() {
9798
9899 public void register (IEvent event , IMetaInfo metaInfo ) {
99100 V data ;
100- //Synchronization is left here mostly in consistency with cache and process, but factories are usually not thread safe anyway.
101- synchronized (factory ) {
101+ synchronized (createLock ) {
102102 data = factory .create (event , metaInfo );
103103 }
104104 if (data != null ) {
You can’t perform that action at this time.
0 commit comments