From 7a5c799a2824162df8812bbac4ddb8837a5ddd9a Mon Sep 17 00:00:00 2001 From: leventov Date: Fri, 11 Dec 2015 16:23:45 +0300 Subject: [PATCH] Remove `throws IORuntimeException` everywhere as redundant and deprecated --- .../java/net/openhft/chronicle/hash/impl/HashSplitting.java | 5 ++--- .../openhft/chronicle/hash/impl/VanillaChronicleHash.java | 5 ++--- .../openhft/chronicle/hash/serialization/BytesReader.java | 2 +- .../openhft/chronicle/hash/serialization/BytesWriter.java | 2 +- .../openhft/chronicle/hash/serialization/ListMarshaller.java | 3 +-- .../openhft/chronicle/hash/serialization/MapMarshaller.java | 3 +-- .../openhft/chronicle/hash/serialization/SetMarshaller.java | 3 +-- .../hash/serialization/impl/ByteArrayDataAccess.java | 3 +-- .../hash/serialization/impl/ByteBufferDataAccess.java | 2 +- .../hash/serialization/impl/ByteableDataAccess.java | 1 - .../hash/serialization/impl/BytesAsSizedReader.java | 3 +-- .../hash/serialization/impl/BytesMarshallableDataAccess.java | 3 +-- .../hash/serialization/impl/CharSequenceSizedReader.java | 3 +-- .../hash/serialization/impl/ConstantSizeMarshaller.java | 3 +-- .../chronicle/hash/serialization/impl/EnumMarshallable.java | 3 +-- .../impl/ExternalBytesMarshallableDataAccess.java | 3 +-- .../hash/serialization/impl/ExternalizableDataAccess.java | 3 +-- .../hash/serialization/impl/InstanceCreatingMarshaller.java | 3 +-- .../hash/serialization/impl/SerializableDataAccess.java | 3 +-- .../hash/serialization/impl/SerializableReader.java | 3 +-- .../hash/serialization/impl/SizedMarshallableDataAccess.java | 3 +-- .../chronicle/hash/serialization/impl/StringBytesReader.java | 3 +-- .../chronicle/hash/serialization/impl/StringSizedReader.java | 3 +-- .../chronicle/hash/serialization/impl/ValueDataAccess.java | 3 +-- .../chronicle/hash/serialization/impl/ValueReader.java | 3 +-- .../java/net/openhft/chronicle/map/VanillaChronicleMap.java | 3 +-- .../chronicle/map/impl/stage/data/ZeroBytesStore.java | 5 ++--- .../net/openhft/chronicle/map/DeflatorStringMarshaller.java | 3 ++- src/test/java/net/openhft/chronicle/map/Issue43Test.java | 1 + 29 files changed, 32 insertions(+), 54 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 436540d8b..0b37cff52 100644 --- a/src/main/java/net/openhft/chronicle/hash/impl/HashSplitting.java +++ b/src/main/java/net/openhft/chronicle/hash/impl/HashSplitting.java @@ -16,7 +16,6 @@ package net.openhft.chronicle.hash.impl; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.hash.serialization.impl.EnumMarshallable; import net.openhft.chronicle.wire.Marshallable; import net.openhft.chronicle.wire.WireIn; @@ -84,7 +83,7 @@ public interface HashSplitting extends Serializable, Marshallable { } @Override - public void readMarshallable(@NotNull WireIn wire) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wire) { mask = wire.read(() -> "mask").int32(); bits = wire.read(() -> "bits").int32(); } @@ -120,7 +119,7 @@ public interface HashSplitting extends Serializable, Marshallable { } @Override - public void readMarshallable(@NotNull WireIn wire) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wire) { segments = wire.read(() -> "segments").int32(); } diff --git a/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java b/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java index 394dbed06..438ec63cf 100644 --- a/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java +++ b/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java @@ -19,7 +19,6 @@ package net.openhft.chronicle.hash.impl; import net.openhft.chronicle.algo.bytes.Access; import net.openhft.chronicle.algo.locks.*; import net.openhft.chronicle.bytes.BytesStore; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.bytes.MappedBytesStoreFactory; import net.openhft.chronicle.bytes.NativeBytesStore; import net.openhft.chronicle.core.Maths; @@ -220,12 +219,12 @@ public abstract class VanillaChronicleHash type of objects deserialized * @see BytesWriter diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/BytesWriter.java b/src/main/java/net/openhft/chronicle/hash/serialization/BytesWriter.java index 0c488d335..095667d9e 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/BytesWriter.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/BytesWriter.java @@ -24,7 +24,7 @@ import org.jetbrains.annotations.NotNull; import java.io.Serializable; /** - * External version of {@link WriteBytesMarshallable}, could be used as lambda. + * External version of {@link WriteBytesMarshallable}. * * @param the type of objects serialized * @see BytesReader diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/ListMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/ListMarshaller.java index 2e4183f3d..6c26ed76d 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/ListMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/ListMarshaller.java @@ -17,7 +17,6 @@ package net.openhft.chronicle.hash.serialization; import net.openhft.chronicle.bytes.Bytes; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.wire.WireIn; import net.openhft.chronicle.wire.WireOut; import org.jetbrains.annotations.NotNull; @@ -109,7 +108,7 @@ public final class ListMarshaller } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { elementReader = wireIn.read(() -> "elementReader").typedMarshallable(); elementWriter = wireIn.read(() -> "elementWriter").typedMarshallable(); } diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/MapMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/MapMarshaller.java index ec1ef01e7..f5f7a54ac 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/MapMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/MapMarshaller.java @@ -17,7 +17,6 @@ package net.openhft.chronicle.hash.serialization; import net.openhft.chronicle.bytes.Bytes; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.wire.WireIn; import net.openhft.chronicle.wire.WireOut; import org.jetbrains.annotations.NotNull; @@ -125,7 +124,7 @@ public final class MapMarshaller } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { keyReader = wireIn.read(() -> "keyReader").typedMarshallable(); keyWriter = wireIn.read(() -> "keyWriter").typedMarshallable(); valueReader = wireIn.read(() -> "valueReader").typedMarshallable(); diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/SetMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/SetMarshaller.java index 7c6d69dd9..3fd2e84ca 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/SetMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/SetMarshaller.java @@ -17,7 +17,6 @@ package net.openhft.chronicle.hash.serialization; import net.openhft.chronicle.bytes.Bytes; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.wire.WireIn; import net.openhft.chronicle.wire.WireOut; import org.jetbrains.annotations.NotNull; @@ -115,7 +114,7 @@ public final class SetMarshaller } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { elementReader = wireIn.read(() -> "elementReader").typedMarshallable(); elementWriter = wireIn.read(() -> "elementWriter").typedMarshallable(); initTransients(); diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteArrayDataAccess.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteArrayDataAccess.java index 0e8f113da..2390223ae 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteArrayDataAccess.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteArrayDataAccess.java @@ -17,7 +17,6 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.HeapBytesStore; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.bytes.RandomDataInput; import net.openhft.chronicle.hash.AbstractData; import net.openhft.chronicle.hash.Data; @@ -98,7 +97,7 @@ public class ByteArrayDataAccess extends AbstractData implements DataAcc } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { // no fields to read initTransients(); } diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteBufferDataAccess.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteBufferDataAccess.java index 0f532e07e..86d3a8dae 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteBufferDataAccess.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteBufferDataAccess.java @@ -120,7 +120,7 @@ public class ByteBufferDataAccess extends AbstractData } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { // no fields to read initTransients(); } diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteableDataAccess.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteableDataAccess.java index 24a39323b..393ee4b95 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteableDataAccess.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ByteableDataAccess.java @@ -17,7 +17,6 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.Byteable; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.bytes.RandomDataInput; import net.openhft.chronicle.hash.Data; import net.openhft.chronicle.hash.serialization.DataAccess; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/BytesAsSizedReader.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/BytesAsSizedReader.java index 316d34bb4..87a45db70 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/BytesAsSizedReader.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/BytesAsSizedReader.java @@ -17,7 +17,6 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.Bytes; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.hash.serialization.BytesReader; import net.openhft.chronicle.hash.serialization.SizedReader; import net.openhft.chronicle.hash.serialization.StatefulCopyable; @@ -52,7 +51,7 @@ public class BytesAsSizedReader } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { reader = wireIn.read(() -> "reader").typedMarshallable(); } diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/BytesMarshallableDataAccess.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/BytesMarshallableDataAccess.java index 723e387ae..641abc413 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/BytesMarshallableDataAccess.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/BytesMarshallableDataAccess.java @@ -18,7 +18,6 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.Bytes; import net.openhft.chronicle.bytes.BytesMarshallable; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.bytes.RandomDataInput; import net.openhft.chronicle.hash.Data; import net.openhft.chronicle.hash.serialization.DataAccess; @@ -44,7 +43,7 @@ public class BytesMarshallableDataAccess } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { super.readMarshallable(wireIn); initTransients(); } 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 f772e3ea7..cdd2003c8 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 @@ -18,7 +18,6 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.Bytes; import net.openhft.chronicle.bytes.BytesUtil; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.hash.serialization.SizedReader; import net.openhft.chronicle.hash.serialization.StatefulCopyable; import net.openhft.chronicle.wire.WireIn; @@ -75,7 +74,7 @@ public class CharSequenceSizedReader } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { // no fields to read initTransients(); } diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ConstantSizeMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ConstantSizeMarshaller.java index b03991b3a..e94885070 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ConstantSizeMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ConstantSizeMarshaller.java @@ -17,7 +17,6 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.Bytes; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.hash.serialization.SizeMarshaller; import net.openhft.chronicle.wire.WireIn; import net.openhft.chronicle.wire.WireOut; @@ -68,7 +67,7 @@ public final class ConstantSizeMarshaller implements SizeMarshaller { } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { constantSize = wireIn.read(() -> "constantSize").int64(); } diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/EnumMarshallable.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/EnumMarshallable.java index 107bdd0ca..527617861 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/EnumMarshallable.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/EnumMarshallable.java @@ -16,7 +16,6 @@ package net.openhft.chronicle.hash.serialization.impl; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.core.util.ReadResolvable; import net.openhft.chronicle.wire.Marshallable; import net.openhft.chronicle.wire.WireIn; @@ -26,7 +25,7 @@ import org.jetbrains.annotations.NotNull; public interface EnumMarshallable> extends Marshallable, ReadResolvable { @Override - default void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + default void readMarshallable(@NotNull WireIn wireIn) { // shouldn't read fields, anyway readResolved later } diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ExternalBytesMarshallableDataAccess.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ExternalBytesMarshallableDataAccess.java index f1dd3d277..84a8783a8 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ExternalBytesMarshallableDataAccess.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ExternalBytesMarshallableDataAccess.java @@ -17,7 +17,6 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.Bytes; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.bytes.RandomDataInput; import net.openhft.chronicle.hash.Data; import net.openhft.chronicle.hash.serialization.BytesWriter; @@ -127,7 +126,7 @@ public class ExternalBytesMarshallableDataAccess extends InstanceCreatingMars } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { super.readMarshallable(wireIn); reader = wireIn.read(() -> "reader").typedMarshallable(); writer = wireIn.read(() -> "writer").typedMarshallable(); diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ExternalizableDataAccess.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ExternalizableDataAccess.java index 7f2bbb85b..7321ddbd2 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ExternalizableDataAccess.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ExternalizableDataAccess.java @@ -16,7 +16,6 @@ package net.openhft.chronicle.hash.serialization.impl; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.hash.Data; import net.openhft.chronicle.hash.serialization.DataAccess; import net.openhft.chronicle.wire.WireIn; @@ -84,7 +83,7 @@ public class ExternalizableDataAccess extends Serializ } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { tClass = wireIn.read(() -> "tClass").typeLiteral(); initTransients(); } diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/InstanceCreatingMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/InstanceCreatingMarshaller.java index 979dcd6a6..a2a0690da 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/InstanceCreatingMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/InstanceCreatingMarshaller.java @@ -16,7 +16,6 @@ package net.openhft.chronicle.hash.serialization.impl; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.hash.Data; import net.openhft.chronicle.hash.serialization.DataAccess; import net.openhft.chronicle.hash.serialization.SizedReader; @@ -80,7 +79,7 @@ public abstract class InstanceCreatingMarshaller implements Serializable, Mar } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { //noinspection unchecked tClass = wireIn.read(() -> "tClass").typeLiteral(); } diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/SerializableDataAccess.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/SerializableDataAccess.java index 8ba64d27d..b3deb1159 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/SerializableDataAccess.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/SerializableDataAccess.java @@ -17,7 +17,6 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.Bytes; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.bytes.RandomDataInput; import net.openhft.chronicle.hash.AbstractData; import net.openhft.chronicle.hash.Data; @@ -112,7 +111,7 @@ public class SerializableDataAccess extends AbstractData } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { // no fields to read initTransients(); } diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/SerializableReader.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/SerializableReader.java index 9741899c2..4928d817a 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/SerializableReader.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/SerializableReader.java @@ -17,7 +17,6 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.Bytes; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.hash.serialization.BytesReader; import net.openhft.chronicle.hash.serialization.SizedReader; import net.openhft.chronicle.wire.WireIn; @@ -49,7 +48,7 @@ public class SerializableReader } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { // no fields to read } diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/SizedMarshallableDataAccess.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/SizedMarshallableDataAccess.java index f123b5682..4a0b5b2fb 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/SizedMarshallableDataAccess.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/SizedMarshallableDataAccess.java @@ -17,7 +17,6 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.Bytes; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.bytes.RandomDataInput; import net.openhft.chronicle.hash.Data; import net.openhft.chronicle.hash.serialization.DataAccess; @@ -135,7 +134,7 @@ public class SizedMarshallableDataAccess extends InstanceCreatingMarshaller "sizedReader").typedMarshallable(); sizedWriter = wireIn.read(() -> "sizedWriter").typedMarshallable(); diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/StringBytesReader.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/StringBytesReader.java index fb7f148e2..d8dc2bb61 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/StringBytesReader.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/StringBytesReader.java @@ -17,7 +17,6 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.Bytes; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.hash.serialization.BytesReader; import net.openhft.chronicle.hash.serialization.ListMarshaller; import net.openhft.chronicle.hash.serialization.SetMarshaller; @@ -71,7 +70,7 @@ public class StringBytesReader } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { // no fields to read initTransients(); } diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/StringSizedReader.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/StringSizedReader.java index 7a7ec6379..0cf36ecc7 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/StringSizedReader.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/StringSizedReader.java @@ -18,7 +18,6 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.Bytes; import net.openhft.chronicle.bytes.BytesUtil; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.hash.serialization.SizedReader; import net.openhft.chronicle.hash.serialization.StatefulCopyable; import net.openhft.chronicle.wire.WireIn; @@ -63,7 +62,7 @@ public class StringSizedReader implements SizedReader, StatefulCopyable< } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { // no fields to read initTransients(); } diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ValueDataAccess.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ValueDataAccess.java index 6fa03d318..05fe8f0f2 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ValueDataAccess.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ValueDataAccess.java @@ -17,7 +17,6 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.Byteable; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.bytes.RandomDataInput; import net.openhft.chronicle.hash.AbstractData; import net.openhft.chronicle.hash.Data; @@ -138,7 +137,7 @@ public class ValueDataAccess extends AbstractData implements DataAccess } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { valueType = wireIn.read(() -> "valueType").typeLiteral(); initTransients(); } diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ValueReader.java b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ValueReader.java index fe4ff38fd..66cb66d1c 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/impl/ValueReader.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/impl/ValueReader.java @@ -18,7 +18,6 @@ package net.openhft.chronicle.hash.serialization.impl; import net.openhft.chronicle.bytes.Byteable; import net.openhft.chronicle.bytes.Bytes; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.hash.serialization.BytesReader; import net.openhft.chronicle.hash.serialization.SizedReader; import net.openhft.chronicle.hash.serialization.StatefulCopyable; @@ -110,7 +109,7 @@ public class ValueReader } @Override - public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException { + public void readMarshallable(@NotNull WireIn wireIn) { valueType = wireIn.read(() -> "valueType").typeLiteral(); initTransients(); } diff --git a/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java b/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java index 6432e72a7..981c78b6a 100755 --- a/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java @@ -17,7 +17,6 @@ package net.openhft.chronicle.map; import net.openhft.chronicle.bytes.Bytes; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.core.io.Closeable; import net.openhft.chronicle.hash.Data; import net.openhft.chronicle.hash.impl.VanillaChronicleHash; @@ -104,7 +103,7 @@ public class VanillaChronicleMap } @Override - protected void readMarshallableFields(@NotNull WireIn wireIn) throws IORuntimeException { + protected void readMarshallableFields(@NotNull WireIn wireIn) { super.readMarshallableFields(wireIn); valueClass = wireIn.read(() -> "valueClass").typeLiteral(); 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 54311f394..df49a303a 100644 --- 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 @@ -17,7 +17,6 @@ package net.openhft.chronicle.map.impl.stage.data; import net.openhft.chronicle.bytes.BytesStore; -import net.openhft.chronicle.bytes.IORuntimeException; import net.openhft.chronicle.bytes.RandomDataInput; import net.openhft.chronicle.core.OS; import org.jetbrains.annotations.Nullable; @@ -86,13 +85,13 @@ public enum ZeroBytesStore implements BytesStore { @Override public boolean compareAndSwapInt(long offset, int expected, int value) - throws BufferOverflowException, IllegalArgumentException, IORuntimeException { + throws BufferOverflowException, IllegalArgumentException { throw new UnsupportedOperationException(); } @Override public boolean compareAndSwapLong(long offset, long expected, long value) - throws BufferOverflowException, IllegalArgumentException, IORuntimeException { + throws BufferOverflowException, IllegalArgumentException { throw new UnsupportedOperationException(); } diff --git a/src/test/java/net/openhft/chronicle/map/DeflatorStringMarshaller.java b/src/test/java/net/openhft/chronicle/map/DeflatorStringMarshaller.java index d89a6d0c6..a298ca204 100644 --- a/src/test/java/net/openhft/chronicle/map/DeflatorStringMarshaller.java +++ b/src/test/java/net/openhft/chronicle/map/DeflatorStringMarshaller.java @@ -17,7 +17,7 @@ package net.openhft.chronicle.map; import net.openhft.chronicle.bytes.Bytes; -import net.openhft.chronicle.bytes.IORuntimeException; +import net.openhft.chronicle.core.io.IORuntimeException; import net.openhft.chronicle.hash.serialization.BytesReader; import net.openhft.chronicle.hash.serialization.BytesWriter; import net.openhft.chronicle.hash.serialization.impl.EnumMarshallable; @@ -83,6 +83,7 @@ public enum DeflatorStringMarshaller implements BytesReader, out.writeInt(position, (int) (out.writePosition() - position - 4)); } + @NotNull @Override public CharSequence read(Bytes bytes, @Nullable CharSequence ignored) { long size = bytes.readStopBit(); diff --git a/src/test/java/net/openhft/chronicle/map/Issue43Test.java b/src/test/java/net/openhft/chronicle/map/Issue43Test.java index d102259a8..de3039537 100644 --- a/src/test/java/net/openhft/chronicle/map/Issue43Test.java +++ b/src/test/java/net/openhft/chronicle/map/Issue43Test.java @@ -67,6 +67,7 @@ public class Issue43Test { } } + @NotNull @Override public ValueWrapper read(Bytes in, ValueWrapper using) { throw new UnsupportedOperationException("Not supported yet.");