Skip to content

Commit 4de3869

Browse files
Fix PMD issue
1 parent 2c4ee6f commit 4de3869

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/lazy/SpringDataEclipseStoreLazy.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import java.lang.reflect.Field;
1919
import java.util.Objects;
20+
import java.util.concurrent.locks.ReentrantLock;
2021
import java.util.function.Consumer;
2122

2223
import org.eclipse.serializer.collections.HashEnum;
@@ -67,7 +68,7 @@ static <T> SpringDataEclipseStoreLazy.Default<T> buildWithLazy(final Lazy<T> laz
6768
*
6869
* @param <T> the type of the lazily referenced element
6970
*/
70-
@SuppressWarnings({"java:S2065"})
71+
@SuppressWarnings({"java:S2065", "PMD.AvoidSynchronizedStatement"})
7172
final class Default<T> implements SpringDataEclipseStoreLazy<T>
7273
{
7374
private T objectToBeWrapped;
@@ -76,6 +77,7 @@ final class Default<T> implements SpringDataEclipseStoreLazy<T>
7677
private transient ObjectSwizzling loader;
7778
private transient WorkingCopier<T> copier;
7879
private transient boolean isStored;
80+
private final transient ReentrantLock usageMarksLock = new ReentrantLock();
7981
private final transient HashEnum<Object> usageMarks = HashEnum.New();
8082

8183
private Default(final Lazy<T> lazySubject)

0 commit comments

Comments
 (0)