From 87f7820407f0b4cd3b80a5d18af79e659e2958ca Mon Sep 17 00:00:00 2001 From: Peter Lawrey Date: Fri, 25 Sep 2020 13:32:02 +0100 Subject: [PATCH] Fix @NotNull annotations --- .../chronicle/hash/impl/HashSplitting.java | 1 + .../serialization/impl/BooleanMarshaller.java | 1 + .../impl/ByteArraySizedReader.java | 1 + .../impl/ByteBufferSizedReader.java | 1 + .../impl/CharSequenceBytesReader.java | 1 + .../impl/CharSequenceBytesWriter.java | 1 + .../impl/CharSequenceSizedReader.java | 1 + .../impl/CharSequenceSizedWriter.java | 1 + .../serialization/impl/DoubleMarshaller.java | 1 + .../serialization/impl/IntegerMarshaller.java | 1 + .../serialization/impl/LongMarshaller.java | 1 + .../impl/StopBitSizeMarshaller.java | 2 ++ .../impl/StringBuilderSizedReader.java | 1 + .../chronicle/map/AbstractChronicleMap.java | 2 ++ .../chronicle/map/ReplicatedChronicleMap.java | 2 +- .../chronicle/map/SelectedSelectionKeySet.java | 3 +++ .../chronicle/map/VanillaChronicleMap.java | 3 +-- .../map/impl/stage/data/ZeroBytesStore.java | 15 +++++++++++++++ .../chronicle/set/DummyValueMarshaller.java | 1 + .../net/openhft/chronicle/set/SetFromMap.java | 18 ++++++++++-------- .../map/DeflatorStringMarshaller.java | 1 + .../net/openhft/chronicle/map/Issue43Test.java | 1 + .../net/openhft/chronicle/map/Issue58.java | 1 + .../chronicle/map/ReplicationCheckingMap.java | 11 ++++++----- .../example/PointListSerializationTest.java | 1 + .../CharSequenceArrayBytesMarshaller.java | 1 + .../map/fromdocs/PointListSizedMarshaller.java | 1 + .../chronicle/map/jsr166/JSR166TestCase.java | 3 ++- 28 files changed, 61 insertions(+), 17 deletions(-) diff --git a/src/main/java/net/openhft/chronicle/hash/impl/HashSplitting.java b/src/main/java/net/openhft/chronicle/hash/impl/HashSplitting.java index 5b90cdb3b..f9078cea0 100644 --- a/src/main/java/net/openhft/chronicle/hash/impl/HashSplitting.java +++ b/src/main/java/net/openhft/chronicle/hash/impl/HashSplitting.java @@ -56,6 +56,7 @@ public interface HashSplitting extends Marshallable { return hash; } + @NotNull @Override public ForSingleSegment readResolve() { return INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/BooleanMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/BooleanMarshaller.java index ba55610d4..1ede88dd8 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/BooleanMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/BooleanMarshaller.java @@ -59,6 +59,7 @@ public final class BooleanMarshaller out.writeByte((byte) (toWrite ? 'Y' : 0)); } + @NotNull @Override public BooleanMarshaller readResolve() { return INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteArraySizedReader.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteArraySizedReader.java index b591b4730..9709e4a4c 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteArraySizedReader.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteArraySizedReader.java @@ -44,6 +44,7 @@ public final class ByteArraySizedReader return using; } + @NotNull @Override public ByteArraySizedReader readResolve() { return INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteBufferSizedReader.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteBufferSizedReader.java index c66bcd5d9..78b45c4a8 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteBufferSizedReader.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteBufferSizedReader.java @@ -48,6 +48,7 @@ public final class ByteBufferSizedReader return using; } + @NotNull @Override public ByteBufferSizedReader readResolve() { return INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceBytesReader.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceBytesReader.java index 8517dac12..958ab21c0 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceBytesReader.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceBytesReader.java @@ -60,6 +60,7 @@ public final class CharSequenceBytesReader implements BytesReader, return INSTANCE; } + @NotNull @Override public CharSequenceBytesReader readResolve() { return INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceBytesWriter.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceBytesWriter.java index 9108a1719..dbb9cb053 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceBytesWriter.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceBytesWriter.java @@ -44,6 +44,7 @@ public final class CharSequenceBytesWriter out.writeUtf8(toWrite); } + @NotNull @Override public CharSequenceBytesWriter readResolve() { return INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceSizedReader.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceSizedReader.java index c728e78ba..ffd5c6ce8 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceSizedReader.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceSizedReader.java @@ -73,6 +73,7 @@ public class CharSequenceSizedReader implements SizedReader, // no fields to write } + @NotNull @Override public CharSequenceSizedReader readResolve() { return INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceSizedWriter.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceSizedWriter.java index 885a6c26e..c1696cf5a 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceSizedWriter.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/CharSequenceSizedWriter.java @@ -46,6 +46,7 @@ public final class CharSequenceSizedWriter BytesUtil.appendUtf8(out, toWrite); } + @NotNull @Override public CharSequenceSizedWriter readResolve() { return INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/DoubleMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/DoubleMarshaller.java index 2e995ae68..135d2aae7 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/DoubleMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/DoubleMarshaller.java @@ -61,6 +61,7 @@ public final class DoubleMarshaller out.writeDouble(toWrite); } + @NotNull @Override public DoubleMarshaller readResolve() { return INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/IntegerMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/IntegerMarshaller.java index 3b7164ca0..c674eabc4 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/IntegerMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/IntegerMarshaller.java @@ -61,6 +61,7 @@ public final class IntegerMarshaller out.writeInt(toWrite); } + @NotNull @Override public IntegerMarshaller readResolve() { return INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/LongMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/LongMarshaller.java index c9648e528..d9f02f669 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/LongMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/LongMarshaller.java @@ -61,6 +61,7 @@ public final class LongMarshaller out.writeLong(toWrite); } + @NotNull @Override public LongMarshaller readResolve() { return INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/StopBitSizeMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/StopBitSizeMarshaller.java index c9021dc3c..225025393 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/StopBitSizeMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/StopBitSizeMarshaller.java @@ -19,6 +19,7 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.Bytes; import net.openhft.chronicle.bytes.BytesUtil; import net.openhft.chronicle.hash.serialization.SizeMarshaller; +import org.jetbrains.annotations.NotNull; import static java.lang.Math.max; import static java.lang.Math.min; @@ -78,6 +79,7 @@ public final class StopBitSizeMarshaller return BytesUtil.readStopBit(in); } + @NotNull @Override public StopBitSizeMarshaller readResolve() { return INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/StringBuilderSizedReader.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/StringBuilderSizedReader.java index 3a9f1e6e8..80b0683fe 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/StringBuilderSizedReader.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/StringBuilderSizedReader.java @@ -45,6 +45,7 @@ public final class StringBuilderSizedReader return using; } + @NotNull @Override public StringBuilderSizedReader readResolve() { return INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/map/AbstractChronicleMap.java b/src/main/java/net/openhft/chronicle/map/AbstractChronicleMap.java index d195894a9..4ab2297a5 100644 --- a/src/main/java/net/openhft/chronicle/map/AbstractChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/AbstractChronicleMap.java @@ -90,6 +90,7 @@ interface AbstractChronicleMap extends ChronicleMap { default Collection values() { // todo cache view object return new AbstractCollection() { + @NotNull @Override public Iterator iterator() { return new Iterator() { @@ -144,6 +145,7 @@ interface AbstractChronicleMap extends ChronicleMap { default Set keySet() { // todo cache view object return new AbstractSet() { + @NotNull @Override public Iterator iterator() { return new ChronicleMapIterator.OfKeys<>(AbstractChronicleMap.this); diff --git a/src/main/java/net/openhft/chronicle/map/ReplicatedChronicleMap.java b/src/main/java/net/openhft/chronicle/map/ReplicatedChronicleMap.java index cc004d1c6..558cfda2a 100644 --- a/src/main/java/net/openhft/chronicle/map/ReplicatedChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/ReplicatedChronicleMap.java @@ -194,7 +194,7 @@ public class ReplicatedChronicleMap extends VanillaChronicleMap builder) { + void initTransientsFromBuilder(@NotNull ChronicleMapBuilder builder) { super.initTransientsFromBuilder(builder); this.localIdentifier = builder.replicationIdentifier; //noinspection unchecked diff --git a/src/main/java/net/openhft/chronicle/map/SelectedSelectionKeySet.java b/src/main/java/net/openhft/chronicle/map/SelectedSelectionKeySet.java index 3ad39a695..a37f7941e 100644 --- a/src/main/java/net/openhft/chronicle/map/SelectedSelectionKeySet.java +++ b/src/main/java/net/openhft/chronicle/map/SelectedSelectionKeySet.java @@ -16,6 +16,8 @@ package net.openhft.chronicle.map; +import org.jetbrains.annotations.NotNull; + import java.nio.channels.SelectionKey; import java.util.AbstractSet; import java.util.Iterator; @@ -103,6 +105,7 @@ final class SelectedSelectionKeySet extends AbstractSet { return false; } + @NotNull @Override public Iterator iterator() { throw new UnsupportedOperationException(); diff --git a/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java b/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java index dcbda00b2..21afbe74c 100755 --- a/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java @@ -22,14 +22,12 @@ import net.openhft.chronicle.bytes.Bytes; import net.openhft.chronicle.bytes.BytesStore; import net.openhft.chronicle.bytes.PointerBytesStore; import net.openhft.chronicle.core.Jvm; -import net.openhft.chronicle.hash.Beta; import net.openhft.chronicle.hash.ChronicleHashClosedException; import net.openhft.chronicle.hash.ChronicleHashCorruption; import net.openhft.chronicle.hash.Data; import net.openhft.chronicle.hash.impl.*; import net.openhft.chronicle.hash.impl.stage.entry.LocksInterface; import net.openhft.chronicle.hash.impl.stage.hash.ChainingInterface; -import net.openhft.chronicle.hash.impl.util.Objects; import net.openhft.chronicle.hash.impl.util.Throwables; import net.openhft.chronicle.hash.serialization.DataAccess; import net.openhft.chronicle.hash.serialization.SizeMarshaller; @@ -347,6 +345,7 @@ public class VanillaChronicleMap return name; } + @NotNull @Override public String toIdentityString() { throwExceptionIfClosed(); diff --git a/src/main/java/net/openhft/chronicle/map/impl/stage/data/ZeroBytesStore.java b/src/main/java/net/openhft/chronicle/map/impl/stage/data/ZeroBytesStore.java index 655b3a8b5..ebd138cd3 100755 --- a/src/main/java/net/openhft/chronicle/map/impl/stage/data/ZeroBytesStore.java +++ b/src/main/java/net/openhft/chronicle/map/impl/stage/data/ZeroBytesStore.java @@ -20,6 +20,7 @@ import net.openhft.chronicle.bytes.BytesStore; import net.openhft.chronicle.bytes.RandomDataInput; import net.openhft.chronicle.core.OS; import net.openhft.chronicle.core.io.ReferenceOwner; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.nio.BufferOverflowException; @@ -183,66 +184,79 @@ public enum ZeroBytesStore implements BytesStore { return 0; } + @NotNull @Override public ZeroBytesStore writeByte(long l, byte b) { throw new UnsupportedOperationException(); } + @NotNull @Override public ZeroBytesStore writeShort(long l, short i) { throw new UnsupportedOperationException(); } + @NotNull @Override public ZeroBytesStore writeInt(long l, int i) { throw new UnsupportedOperationException(); } + @NotNull @Override public ZeroBytesStore writeOrderedInt(long l, int i) { throw new UnsupportedOperationException(); } + @NotNull @Override public ZeroBytesStore writeLong(long l, long l1) { throw new UnsupportedOperationException(); } + @NotNull @Override public ZeroBytesStore writeOrderedLong(long l, long l1) { throw new UnsupportedOperationException(); } + @NotNull @Override public ZeroBytesStore writeFloat(long l, float v) { throw new UnsupportedOperationException(); } + @NotNull @Override public ZeroBytesStore writeDouble(long l, double v) { throw new UnsupportedOperationException(); } + @NotNull @Override public ZeroBytesStore writeVolatileByte(long l, byte b) { throw new UnsupportedOperationException(); } + @NotNull @Override public ZeroBytesStore writeVolatileShort(long l, short i) { throw new UnsupportedOperationException(); } + @NotNull @Override public ZeroBytesStore writeVolatileInt(long l, int i) { throw new UnsupportedOperationException(); } + @NotNull @Override public ZeroBytesStore writeVolatileLong(long l, long l1) { throw new UnsupportedOperationException(); } + @NotNull @Override public ZeroBytesStore write(long l, byte[] bytes, int i, int i1) { throw new UnsupportedOperationException(); @@ -253,6 +267,7 @@ public enum ZeroBytesStore implements BytesStore { throw new UnsupportedOperationException(); } + @NotNull @Override public ZeroBytesStore write(long l, RandomDataInput randomDataInput, long l1, long l2) { throw new UnsupportedOperationException(); diff --git a/src/main/java/net/openhft/chronicle/set/DummyValueMarshaller.java b/src/main/java/net/openhft/chronicle/set/DummyValueMarshaller.java index 3d22d9acd..db16c6522 100644 --- a/src/main/java/net/openhft/chronicle/set/DummyValueMarshaller.java +++ b/src/main/java/net/openhft/chronicle/set/DummyValueMarshaller.java @@ -52,6 +52,7 @@ final class DummyValueMarshaller implements DataAccess, SizedReader< return DummyValue.DUMMY_VALUE; } + @NotNull @Override public DummyValueMarshaller readResolve() { return INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/set/SetFromMap.java b/src/main/java/net/openhft/chronicle/set/SetFromMap.java index edadc8f7a..c0cb6deef 100644 --- a/src/main/java/net/openhft/chronicle/set/SetFromMap.java +++ b/src/main/java/net/openhft/chronicle/set/SetFromMap.java @@ -86,10 +86,11 @@ class SetFromMap extends AbstractSet implements ChronicleSet { return m.putIfAbsent(e, DUMMY_VALUE) == null; } + @NotNull public Iterator iterator() { throwExceptionIfClosed(); - return s.iterator(); + return s.iterator(); } public Object[] toArray() { @@ -106,11 +107,12 @@ class SetFromMap extends AbstractSet implements ChronicleSet { return s.toString(); } + @NotNull @Override public String toIdentityString() { throwExceptionIfClosed(); - return "ChronicleSet{" + + return "ChronicleSet{" + "name=" + name() + ", file=" + file() + ", identityHashCode=" + System.identityHashCode(this) + @@ -129,22 +131,22 @@ class SetFromMap extends AbstractSet implements ChronicleSet { return o == this || s.equals(o); } - public boolean containsAll(Collection c) { + public boolean containsAll(@NotNull Collection c) { throwExceptionIfClosed(); - return s.containsAll(c); + return s.containsAll(c); } - public boolean removeAll(Collection c) { + public boolean removeAll(@NotNull Collection c) { throwExceptionIfClosed(); - return s.removeAll(c); + return s.removeAll(c); } - public boolean retainAll(Collection c) { + public boolean retainAll(@NotNull Collection c) { throwExceptionIfClosed(); - return s.retainAll(c); + return s.retainAll(c); } // addAll is the only inherited implementation diff --git a/src/test/java/net/openhft/chronicle/map/DeflatorStringMarshaller.java b/src/test/java/net/openhft/chronicle/map/DeflatorStringMarshaller.java index f7292332a..cb61b3ffe 100644 --- a/src/test/java/net/openhft/chronicle/map/DeflatorStringMarshaller.java +++ b/src/test/java/net/openhft/chronicle/map/DeflatorStringMarshaller.java @@ -118,6 +118,7 @@ public final class DeflatorStringMarshaller implements BytesReader } } + @NotNull @Override public DeflatorStringMarshaller readResolve() { return INSTANCE; diff --git a/src/test/java/net/openhft/chronicle/map/Issue43Test.java b/src/test/java/net/openhft/chronicle/map/Issue43Test.java index d76e84d47..bdc361c94 100644 --- a/src/test/java/net/openhft/chronicle/map/Issue43Test.java +++ b/src/test/java/net/openhft/chronicle/map/Issue43Test.java @@ -76,6 +76,7 @@ public class Issue43Test { throw new UnsupportedOperationException("Not supported yet."); } + @NotNull @Override public ArrayMarshaller readResolve() { return INSTANCE; diff --git a/src/test/java/net/openhft/chronicle/map/Issue58.java b/src/test/java/net/openhft/chronicle/map/Issue58.java index 0209a755e..9b97dd439 100644 --- a/src/test/java/net/openhft/chronicle/map/Issue58.java +++ b/src/test/java/net/openhft/chronicle/map/Issue58.java @@ -145,6 +145,7 @@ public class Issue58 { return new UUID(bytes.readLong(), bytes.readLong()); } + @NotNull @Override public UuidMarshaller readResolve() { return INSTANCE; diff --git a/src/test/java/net/openhft/chronicle/map/ReplicationCheckingMap.java b/src/test/java/net/openhft/chronicle/map/ReplicationCheckingMap.java index 910662f8d..1e4531518 100644 --- a/src/test/java/net/openhft/chronicle/map/ReplicationCheckingMap.java +++ b/src/test/java/net/openhft/chronicle/map/ReplicationCheckingMap.java @@ -46,22 +46,22 @@ public class ReplicationCheckingMap implements ChronicleMap { } @Override - public V putIfAbsent(K key, V value) { + public V putIfAbsent(@NotNull K key, V value) { return map1.putIfAbsent(key, value); } @Override - public boolean remove(Object key, Object value) { + public boolean remove(@NotNull Object key, Object value) { return map1.remove(key, value); } @Override - public boolean replace(K key, V oldValue, V newValue) { + public boolean replace(@NotNull K key, @NotNull V oldValue, @NotNull V newValue) { return map1.replace(key, oldValue, newValue); } @Override - public V replace(final K key, final V value) { + public V replace(@NotNull final K key, @NotNull final V value) { return check(new Call() { @Override public Object method(ConcurrentMap map) { @@ -164,7 +164,7 @@ public class ReplicationCheckingMap implements ChronicleMap { } @Override - public void putAll(Map m) { + public void putAll(@NotNull Map m) { map1.putAll(m); } @@ -320,6 +320,7 @@ public class ReplicationCheckingMap implements ChronicleMap { throw new UnsupportedOperationException(); } + @NotNull @Override public String toIdentityString() { throw new UnsupportedOperationException(); diff --git a/src/test/java/net/openhft/chronicle/map/example/PointListSerializationTest.java b/src/test/java/net/openhft/chronicle/map/example/PointListSerializationTest.java index 547faa8db..0f60f6181 100644 --- a/src/test/java/net/openhft/chronicle/map/example/PointListSerializationTest.java +++ b/src/test/java/net/openhft/chronicle/map/example/PointListSerializationTest.java @@ -101,6 +101,7 @@ public class PointListSerializationTest { return using; } + @NotNull @Override public AMarshaller readResolve() { return INSTANCE; diff --git a/src/test/java/net/openhft/chronicle/map/fromdocs/CharSequenceArrayBytesMarshaller.java b/src/test/java/net/openhft/chronicle/map/fromdocs/CharSequenceArrayBytesMarshaller.java index a9a618b69..d2b2c2020 100644 --- a/src/test/java/net/openhft/chronicle/map/fromdocs/CharSequenceArrayBytesMarshaller.java +++ b/src/test/java/net/openhft/chronicle/map/fromdocs/CharSequenceArrayBytesMarshaller.java @@ -81,6 +81,7 @@ public final class CharSequenceArrayBytesMarshaller // no fields to read } + @NotNull @Override public CharSequenceArrayBytesMarshaller readResolve() { return INSTANCE; diff --git a/src/test/java/net/openhft/chronicle/map/fromdocs/PointListSizedMarshaller.java b/src/test/java/net/openhft/chronicle/map/fromdocs/PointListSizedMarshaller.java index bc8f3d6be..e1ad9ffa1 100644 --- a/src/test/java/net/openhft/chronicle/map/fromdocs/PointListSizedMarshaller.java +++ b/src/test/java/net/openhft/chronicle/map/fromdocs/PointListSizedMarshaller.java @@ -99,6 +99,7 @@ public final class PointListSizedMarshaller // no fields to read } + @NotNull @Override public PointListSizedMarshaller readResolve() { return INSTANCE; diff --git a/src/test/java/net/openhft/chronicle/map/jsr166/JSR166TestCase.java b/src/test/java/net/openhft/chronicle/map/jsr166/JSR166TestCase.java index f545012b3..d64bd247d 100644 --- a/src/test/java/net/openhft/chronicle/map/jsr166/JSR166TestCase.java +++ b/src/test/java/net/openhft/chronicle/map/jsr166/JSR166TestCase.java @@ -18,6 +18,7 @@ package net.openhft.chronicle.map.jsr166; import junit.framework.AssertionFailedError; import net.openhft.chronicle.core.Jvm; +import org.jetbrains.annotations.NotNull; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -891,7 +892,7 @@ public class JSR166TestCase { * For use as ThreadFactory in constructors */ public static class SimpleThreadFactory implements ThreadFactory { - public Thread newThread(Runnable r) { + public Thread newThread(@NotNull Runnable r) { return new Thread(r); } }