Fix @NotNull annotations

This commit is contained in:
Peter Lawrey
2020-09-25 13:32:02 +01:00
parent 90bd3c527a
commit 87f7820407
28 changed files with 61 additions and 17 deletions
@@ -118,6 +118,7 @@ public final class DeflatorStringMarshaller implements BytesReader<CharSequence>
}
}
@NotNull
@Override
public DeflatorStringMarshaller readResolve() {
return INSTANCE;
@@ -76,6 +76,7 @@ public class Issue43Test {
throw new UnsupportedOperationException("Not supported yet.");
}
@NotNull
@Override
public ArrayMarshaller readResolve() {
return INSTANCE;
@@ -145,6 +145,7 @@ public class Issue58 {
return new UUID(bytes.readLong(), bytes.readLong());
}
@NotNull
@Override
public UuidMarshaller readResolve() {
return INSTANCE;
@@ -46,22 +46,22 @@ public class ReplicationCheckingMap<K, V> implements ChronicleMap<K, V> {
}
@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<K, V>() {
@Override
public Object method(ConcurrentMap<K, V> map) {
@@ -164,7 +164,7 @@ public class ReplicationCheckingMap<K, V> implements ChronicleMap<K, V> {
}
@Override
public void putAll(Map<? extends K, ? extends V> m) {
public void putAll(@NotNull Map<? extends K, ? extends V> m) {
map1.putAll(m);
}
@@ -320,6 +320,7 @@ public class ReplicationCheckingMap<K, V> implements ChronicleMap<K, V> {
throw new UnsupportedOperationException();
}
@NotNull
@Override
public String toIdentityString() {
throw new UnsupportedOperationException();
@@ -101,6 +101,7 @@ public class PointListSerializationTest {
return using;
}
@NotNull
@Override
public AMarshaller readResolve() {
return INSTANCE;
@@ -81,6 +81,7 @@ public final class CharSequenceArrayBytesMarshaller
// no fields to read
}
@NotNull
@Override
public CharSequenceArrayBytesMarshaller readResolve() {
return INSTANCE;
@@ -99,6 +99,7 @@ public final class PointListSizedMarshaller
// no fields to read
}
@NotNull
@Override
public PointListSizedMarshaller readResolve() {
return INSTANCE;
@@ -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);
}
}