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.
71
71
* @param <V> data type
72
72
*/
73
73
public abstract class EventDataHandler <T , V extends EventData <T >> {
74
+ private final Object createLock = new Object ();
74
75
private final Object processLock = new Object ();
75
76
76
77
private final IEventDataCache <T , V > cache ;
@@ -97,8 +98,7 @@ public List<V> clear() {
97
98
98
99
public void register (IEvent event , IMetaInfo metaInfo ) {
99
100
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 ) {
102
102
data = factory .create (event , metaInfo );
103
103
}
104
104
if (data != null ) {
You can’t perform that action at this time.
0 commit comments