Remove throws IORuntimeException everywhere as redundant and deprecated

This commit is contained in:
leventov
2015-12-11 16:23:45 +03:00
parent c79b078c36
commit 7a5c799a28
29 changed files with 32 additions and 54 deletions
@@ -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();
}
@@ -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<K,
}
@Override
public void readMarshallable(@NotNull WireIn wire) throws IORuntimeException {
public void readMarshallable(@NotNull WireIn wire) {
readMarshallableFields(wire);
initTransients();
}
protected void readMarshallableFields(@NotNull WireIn wireIn) throws IORuntimeException {
protected void readMarshallableFields(@NotNull WireIn wireIn) {
// Previously assignment of these values was done in default field initializers, but
// with Wire serialization VanillaChronicleMap instance is created with
// unsafe.allocateInstance(), that doesn't guarantee (?) to initialize fields with default
@@ -24,7 +24,7 @@ import org.jetbrains.annotations.NotNull;
import java.io.Serializable;
/**
* External version on {@link ReadBytesMarshallable}, could be used as lambda.
* External version on {@link ReadBytesMarshallable}.
*
* @param <T> type of objects deserialized
* @see BytesWriter
@@ -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 <T> the type of objects serialized
* @see BytesReader
@@ -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<T>
}
@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();
}
@@ -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<K, V>
}
@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();
@@ -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<T>
}
@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();
@@ -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<byte[]> implements DataAcc
}
@Override
public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException {
public void readMarshallable(@NotNull WireIn wireIn) {
// no fields to read
initTransients();
}
@@ -120,7 +120,7 @@ public class ByteBufferDataAccess extends AbstractData<ByteBuffer>
}
@Override
public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException {
public void readMarshallable(@NotNull WireIn wireIn) {
// no fields to read
initTransients();
}
@@ -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;
@@ -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<T>
}
@Override
public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException {
public void readMarshallable(@NotNull WireIn wireIn) {
reader = wireIn.read(() -> "reader").typedMarshallable();
}
@@ -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<T extends BytesMarshallable>
}
@Override
public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException {
public void readMarshallable(@NotNull WireIn wireIn) {
super.readMarshallable(wireIn);
initTransients();
}
@@ -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();
}
@@ -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();
}
@@ -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<E extends Enum<E>> extends Marshallable, ReadResolvable<E> {
@Override
default void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException {
default void readMarshallable(@NotNull WireIn wireIn) {
// shouldn't read fields, anyway readResolved later
}
@@ -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<T> 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();
@@ -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<T extends Externalizable> extends Serializ
}
@Override
public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException {
public void readMarshallable(@NotNull WireIn wireIn) {
tClass = wireIn.read(() -> "tClass").typeLiteral();
initTransients();
}
@@ -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<T> 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();
}
@@ -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<T extends Serializable> extends AbstractData
}
@Override
public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException {
public void readMarshallable(@NotNull WireIn wireIn) {
// no fields to read
initTransients();
}
@@ -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<T extends Serializable>
}
@Override
public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException {
public void readMarshallable(@NotNull WireIn wireIn) {
// no fields to read
}
@@ -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<T> extends InstanceCreatingMarshaller<T
}
@Override
public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException {
public void readMarshallable(@NotNull WireIn wireIn) {
super.readMarshallable(wireIn);
sizedReader = wireIn.read(() -> "sizedReader").typedMarshallable();
sizedWriter = wireIn.read(() -> "sizedWriter").typedMarshallable();
@@ -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();
}
@@ -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<String>, StatefulCopyable<
}
@Override
public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException {
public void readMarshallable(@NotNull WireIn wireIn) {
// no fields to read
initTransients();
}
@@ -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<T> extends AbstractData<T> implements DataAccess<T>
}
@Override
public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException {
public void readMarshallable(@NotNull WireIn wireIn) {
valueType = wireIn.read(() -> "valueType").typeLiteral();
initTransients();
}
@@ -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<T>
}
@Override
public void readMarshallable(@NotNull WireIn wireIn) throws IORuntimeException {
public void readMarshallable(@NotNull WireIn wireIn) {
valueType = wireIn.read(() -> "valueType").typeLiteral();
initTransients();
}
@@ -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<K, V, R>
}
@Override
protected void readMarshallableFields(@NotNull WireIn wireIn) throws IORuntimeException {
protected void readMarshallableFields(@NotNull WireIn wireIn) {
super.readMarshallableFields(wireIn);
valueClass = wireIn.read(() -> "valueClass").typeLiteral();
@@ -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<ZeroBytesStore, Void> {
@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();
}