From 323623632411e3f61ce0016d38b8c5ac236f416e Mon Sep 17 00:00:00 2001 From: leventov Date: Sat, 27 Dec 2014 17:46:25 +0700 Subject: [PATCH] Optimized imports --- .../openhft/chronicle/hash/StatelessClientConfig.java | 2 -- .../net/openhft/chronicle/hash/hashing/Accesses.java | 1 - .../net/openhft/chronicle/hash/hashing/UnsafeAccess.java | 4 +--- .../hash/serialization/internal/ByteArrayMarshaller.java | 2 +- .../hash/serialization/internal/ByteableMarshaller.java | 6 ++++-- .../hash/serialization/internal/BytesBytesInterop.java | 2 +- .../hash/serialization/internal/CharArrayMarshaller.java | 2 +- .../hash/serialization/internal/DoubleMarshaller.java | 2 +- .../hash/serialization/internal/IntegerMarshaller.java | 4 +++- .../hash/serialization/internal/LongMarshaller.java | 2 +- .../hash/serialization/internal/VoidMarshaller.java | 1 - .../net/openhft/chronicle/map/ChronicleMapBuilder.java | 5 ++++- .../java/net/openhft/chronicle/map/MultiMapFactory.java | 4 +--- .../net/openhft/chronicle/map/SerializationBuilder.java | 1 - src/test/java/eg/BigData.java | 1 - src/test/java/eg/TestMain.java | 2 -- .../chronicle/map/ChronicleMapImportExportTest.java | 2 -- .../openhft/chronicle/map/ConstantSizeBySampleTest.java | 1 - src/test/java/net/openhft/chronicle/map/Issue42Test.java | 2 +- .../openhft/chronicle/map/NoTcpReplicationSoakTest.java | 9 +++++++-- .../chronicle/map/TcpTimeBasedReplicationSoakTest.java | 5 ++++- .../chronicle/map/fromdocs/BondVOInterface$$Heap.java | 7 +++---- .../map/fromdocs/BondVOInterface$MarketPx$$Heap.java | 5 +++-- 23 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/main/java/net/openhft/chronicle/hash/StatelessClientConfig.java b/src/main/java/net/openhft/chronicle/hash/StatelessClientConfig.java index 38add9b6a..9f24fc72f 100644 --- a/src/main/java/net/openhft/chronicle/hash/StatelessClientConfig.java +++ b/src/main/java/net/openhft/chronicle/hash/StatelessClientConfig.java @@ -18,10 +18,8 @@ package net.openhft.chronicle.hash; import net.openhft.chronicle.map.ChronicleMap; import net.openhft.chronicle.set.ChronicleSet; -import org.jetbrains.annotations.NotNull; import java.io.IOException; -import java.net.InetSocketAddress; import java.util.concurrent.TimeUnit; /** diff --git a/src/main/java/net/openhft/chronicle/hash/hashing/Accesses.java b/src/main/java/net/openhft/chronicle/hash/hashing/Accesses.java index d9b71abd5..ac67cf2ea 100644 --- a/src/main/java/net/openhft/chronicle/hash/hashing/Accesses.java +++ b/src/main/java/net/openhft/chronicle/hash/hashing/Accesses.java @@ -19,7 +19,6 @@ package net.openhft.chronicle.hash.hashing; import net.openhft.lang.io.Bytes; import java.nio.ByteBuffer; -import java.nio.ByteOrder; /** * Static methods returning useful {@link Access} implementations. diff --git a/src/main/java/net/openhft/chronicle/hash/hashing/UnsafeAccess.java b/src/main/java/net/openhft/chronicle/hash/hashing/UnsafeAccess.java index 36d54a1cb..b135be6e9 100644 --- a/src/main/java/net/openhft/chronicle/hash/hashing/UnsafeAccess.java +++ b/src/main/java/net/openhft/chronicle/hash/hashing/UnsafeAccess.java @@ -21,9 +21,7 @@ import sun.misc.Unsafe; import java.lang.reflect.Field; import java.nio.ByteOrder; -import static net.openhft.chronicle.hash.hashing.Primitives.unsignedByte; -import static net.openhft.chronicle.hash.hashing.Primitives.unsignedInt; -import static net.openhft.chronicle.hash.hashing.Primitives.unsignedShort; +import static net.openhft.chronicle.hash.hashing.Primitives.*; enum UnsafeAccess implements Access { INSTANCE; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/internal/ByteArrayMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/internal/ByteArrayMarshaller.java index d92787fbb..767df0abd 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/internal/ByteArrayMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/internal/ByteArrayMarshaller.java @@ -18,9 +18,9 @@ package net.openhft.chronicle.hash.serialization.internal; +import net.openhft.chronicle.hash.hashing.Hasher; import net.openhft.chronicle.hash.serialization.BytesInterop; import net.openhft.chronicle.hash.serialization.BytesReader; -import net.openhft.chronicle.hash.hashing.Hasher; import net.openhft.lang.io.Bytes; public enum ByteArrayMarshaller implements BytesInterop, BytesReader { diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/internal/ByteableMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/internal/ByteableMarshaller.java index 29a1c5623..b6350cca5 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/internal/ByteableMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/internal/ByteableMarshaller.java @@ -19,11 +19,13 @@ package net.openhft.chronicle.hash.serialization.internal; import net.openhft.chronicle.hash.hashing.Hasher; -import net.openhft.chronicle.hash.serialization.*; +import net.openhft.chronicle.hash.serialization.BytesInterop; +import net.openhft.chronicle.hash.serialization.DeserializationFactoryConfigurableBytesReader; +import net.openhft.chronicle.hash.serialization.SizeMarshaller; import net.openhft.lang.io.Bytes; import net.openhft.lang.io.MultiStoreBytes; import net.openhft.lang.io.NativeBytes; -import net.openhft.lang.io.serialization.*; +import net.openhft.lang.io.serialization.ObjectFactory; import net.openhft.lang.model.Byteable; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/internal/BytesBytesInterop.java b/src/main/java/net/openhft/chronicle/hash/serialization/internal/BytesBytesInterop.java index c8cb5ea3d..6c5a59174 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/internal/BytesBytesInterop.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/internal/BytesBytesInterop.java @@ -16,8 +16,8 @@ package net.openhft.chronicle.hash.serialization.internal; -import net.openhft.chronicle.hash.serialization.BytesInterop; import net.openhft.chronicle.hash.hashing.Hasher; +import net.openhft.chronicle.hash.serialization.BytesInterop; import net.openhft.lang.io.Bytes; public enum BytesBytesInterop implements BytesInterop { diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/internal/CharArrayMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/internal/CharArrayMarshaller.java index 9e646beaf..bdcf3d220 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/internal/CharArrayMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/internal/CharArrayMarshaller.java @@ -18,9 +18,9 @@ package net.openhft.chronicle.hash.serialization.internal; +import net.openhft.chronicle.hash.hashing.Hasher; import net.openhft.chronicle.hash.serialization.BytesInterop; import net.openhft.chronicle.hash.serialization.BytesReader; -import net.openhft.chronicle.hash.hashing.Hasher; import net.openhft.lang.io.Bytes; public enum CharArrayMarshaller implements BytesInterop, BytesReader { diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/internal/DoubleMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/internal/DoubleMarshaller.java index 20fb35773..6df3b6c79 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/internal/DoubleMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/internal/DoubleMarshaller.java @@ -18,9 +18,9 @@ package net.openhft.chronicle.hash.serialization.internal; +import net.openhft.chronicle.hash.hashing.Hasher; import net.openhft.chronicle.hash.serialization.BytesInterop; import net.openhft.chronicle.hash.serialization.BytesReader; -import net.openhft.chronicle.hash.hashing.Hasher; import net.openhft.chronicle.hash.serialization.SizeMarshaller; import net.openhft.lang.io.Bytes; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/internal/IntegerMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/internal/IntegerMarshaller.java index eb0f05da5..759c9608c 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/internal/IntegerMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/internal/IntegerMarshaller.java @@ -19,7 +19,9 @@ package net.openhft.chronicle.hash.serialization.internal; import net.openhft.chronicle.hash.hashing.Hasher; -import net.openhft.chronicle.hash.serialization.*; +import net.openhft.chronicle.hash.serialization.BytesInterop; +import net.openhft.chronicle.hash.serialization.BytesReader; +import net.openhft.chronicle.hash.serialization.SizeMarshaller; import net.openhft.lang.io.Bytes; public enum IntegerMarshaller diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/internal/LongMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/internal/LongMarshaller.java index c3dde401a..635028206 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/internal/LongMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/internal/LongMarshaller.java @@ -18,9 +18,9 @@ package net.openhft.chronicle.hash.serialization.internal; +import net.openhft.chronicle.hash.hashing.Hasher; import net.openhft.chronicle.hash.serialization.BytesInterop; import net.openhft.chronicle.hash.serialization.BytesReader; -import net.openhft.chronicle.hash.hashing.Hasher; import net.openhft.chronicle.hash.serialization.SizeMarshaller; import net.openhft.lang.io.Bytes; diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/internal/VoidMarshaller.java b/src/main/java/net/openhft/chronicle/hash/serialization/internal/VoidMarshaller.java index e7b19b335..7d75f8e1d 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/internal/VoidMarshaller.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/internal/VoidMarshaller.java @@ -18,7 +18,6 @@ package net.openhft.chronicle.hash.serialization.internal; -import net.openhft.chronicle.hash.hashing.Hasher; import net.openhft.chronicle.hash.serialization.BytesInterop; import net.openhft.chronicle.hash.serialization.BytesReader; import net.openhft.chronicle.hash.serialization.SizeMarshaller; diff --git a/src/main/java/net/openhft/chronicle/map/ChronicleMapBuilder.java b/src/main/java/net/openhft/chronicle/map/ChronicleMapBuilder.java index 81d845abf..f5a51af34 100755 --- a/src/main/java/net/openhft/chronicle/map/ChronicleMapBuilder.java +++ b/src/main/java/net/openhft/chronicle/map/ChronicleMapBuilder.java @@ -43,7 +43,10 @@ import org.slf4j.LoggerFactory; import java.io.*; import java.lang.reflect.Constructor; import java.net.InetSocketAddress; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/src/main/java/net/openhft/chronicle/map/MultiMapFactory.java b/src/main/java/net/openhft/chronicle/map/MultiMapFactory.java index 49fcaf1ba..5e3349f54 100644 --- a/src/main/java/net/openhft/chronicle/map/MultiMapFactory.java +++ b/src/main/java/net/openhft/chronicle/map/MultiMapFactory.java @@ -24,9 +24,7 @@ import net.openhft.lang.io.DirectStore; import net.openhft.lang.io.NativeBytes; import static net.openhft.lang.Maths.isPowerOf2; -import static net.openhft.lang.MemoryUnit.BITS; -import static net.openhft.lang.MemoryUnit.BYTES; -import static net.openhft.lang.MemoryUnit.LONGS; +import static net.openhft.lang.MemoryUnit.*; /** * Created by peter on 09/11/14. diff --git a/src/main/java/net/openhft/chronicle/map/SerializationBuilder.java b/src/main/java/net/openhft/chronicle/map/SerializationBuilder.java index e91bec845..ac1f597b5 100644 --- a/src/main/java/net/openhft/chronicle/map/SerializationBuilder.java +++ b/src/main/java/net/openhft/chronicle/map/SerializationBuilder.java @@ -21,7 +21,6 @@ package net.openhft.chronicle.map; import net.openhft.chronicle.hash.serialization.*; import net.openhft.chronicle.hash.serialization.internal.*; import net.openhft.chronicle.hash.serialization.internal.ByteBufferMarshaller; -import net.openhft.lang.MemoryUnit; import net.openhft.lang.io.ByteBufferBytes; import net.openhft.lang.io.Bytes; import net.openhft.lang.io.serialization.BytesMarshallable; diff --git a/src/test/java/eg/BigData.java b/src/test/java/eg/BigData.java index 8c8fe917f..177b1059f 100644 --- a/src/test/java/eg/BigData.java +++ b/src/test/java/eg/BigData.java @@ -20,7 +20,6 @@ package eg; import net.openhft.affinity.AffinitySupport; import net.openhft.chronicle.map.ChronicleMapBuilder; -import net.openhft.chronicle.map.ChronicleMapBuilder; import net.openhft.lang.io.Bytes; import java.io.*; diff --git a/src/test/java/eg/TestMain.java b/src/test/java/eg/TestMain.java index 00beb1945..1f92e89c4 100644 --- a/src/test/java/eg/TestMain.java +++ b/src/test/java/eg/TestMain.java @@ -1,7 +1,5 @@ package eg; -import com.sun.tools.internal.xjc.generator.bean.BeanGenerator; - import java.beans.BeanInfo; import java.beans.IntrospectionException; import java.beans.Introspector; diff --git a/src/test/java/net/openhft/chronicle/map/ChronicleMapImportExportTest.java b/src/test/java/net/openhft/chronicle/map/ChronicleMapImportExportTest.java index ba8742488..ddde2e047 100644 --- a/src/test/java/net/openhft/chronicle/map/ChronicleMapImportExportTest.java +++ b/src/test/java/net/openhft/chronicle/map/ChronicleMapImportExportTest.java @@ -4,10 +4,8 @@ import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver; import net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig; import net.openhft.chronicle.map.fromdocs.BondVOInterface; -import net.openhft.lang.model.DataValueClasses; import net.openhft.lang.values.LongValue; import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; import java.io.File; diff --git a/src/test/java/net/openhft/chronicle/map/ConstantSizeBySampleTest.java b/src/test/java/net/openhft/chronicle/map/ConstantSizeBySampleTest.java index a570ecd07..8cd0a1357 100644 --- a/src/test/java/net/openhft/chronicle/map/ConstantSizeBySampleTest.java +++ b/src/test/java/net/openhft/chronicle/map/ConstantSizeBySampleTest.java @@ -19,7 +19,6 @@ package net.openhft.chronicle.map; import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; import java.io.*; diff --git a/src/test/java/net/openhft/chronicle/map/Issue42Test.java b/src/test/java/net/openhft/chronicle/map/Issue42Test.java index 494b7b1b6..89aa015f6 100755 --- a/src/test/java/net/openhft/chronicle/map/Issue42Test.java +++ b/src/test/java/net/openhft/chronicle/map/Issue42Test.java @@ -18,8 +18,8 @@ package net.openhft.chronicle.map; - import org.junit.Assert; import net.openhft.lang.Jvm; +import org.junit.Assert; import org.junit.Test; import java.io.IOException; diff --git a/src/test/java/net/openhft/chronicle/map/NoTcpReplicationSoakTest.java b/src/test/java/net/openhft/chronicle/map/NoTcpReplicationSoakTest.java index cc33273d2..e8194356e 100644 --- a/src/test/java/net/openhft/chronicle/map/NoTcpReplicationSoakTest.java +++ b/src/test/java/net/openhft/chronicle/map/NoTcpReplicationSoakTest.java @@ -5,12 +5,17 @@ import net.openhft.lang.io.ByteBufferBytes; import net.openhft.lang.model.Byteable; import net.openhft.lang.model.DataValueClasses; import net.openhft.lang.values.IntValue; -import org.junit.*; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; import java.io.Closeable; import java.io.IOException; import java.nio.ByteBuffer; -import java.util.*; +import java.util.Random; +import java.util.Set; +import java.util.TreeMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicInteger; diff --git a/src/test/java/net/openhft/chronicle/map/TcpTimeBasedReplicationSoakTest.java b/src/test/java/net/openhft/chronicle/map/TcpTimeBasedReplicationSoakTest.java index 216903eb2..e7fc7872d 100644 --- a/src/test/java/net/openhft/chronicle/map/TcpTimeBasedReplicationSoakTest.java +++ b/src/test/java/net/openhft/chronicle/map/TcpTimeBasedReplicationSoakTest.java @@ -6,7 +6,10 @@ import net.openhft.lang.io.ByteBufferBytes; import net.openhft.lang.model.Byteable; import net.openhft.lang.model.DataValueClasses; import net.openhft.lang.values.IntValue; -import org.junit.*; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; import org.mockito.Mockito; import java.io.Closeable; diff --git a/src/test/java/net/openhft/chronicle/map/fromdocs/BondVOInterface$$Heap.java b/src/test/java/net/openhft/chronicle/map/fromdocs/BondVOInterface$$Heap.java index 3db5fc71a..b3d97d526 100644 --- a/src/test/java/net/openhft/chronicle/map/fromdocs/BondVOInterface$$Heap.java +++ b/src/test/java/net/openhft/chronicle/map/fromdocs/BondVOInterface$$Heap.java @@ -16,14 +16,13 @@ package net.openhft.chronicle.map.fromdocs; -import static net.openhft.lang.Compare.*; -import java.io.IOException; -import net.openhft.chronicle.map.fromdocs.BondVOInterface; -import net.openhft.chronicle.map.fromdocs.BondVOInterface.MarketPx; import net.openhft.lang.io.Bytes; import net.openhft.lang.io.serialization.BytesMarshallable; import net.openhft.lang.model.Copyable; +import static net.openhft.lang.Compare.calcLongHashCode; +import static net.openhft.lang.Compare.isEqual; + public class BondVOInterface$$Heap implements BondVOInterface, BytesMarshallable, Copyable { private double _coupon; private long _issueDate; diff --git a/src/test/java/net/openhft/chronicle/map/fromdocs/BondVOInterface$MarketPx$$Heap.java b/src/test/java/net/openhft/chronicle/map/fromdocs/BondVOInterface$MarketPx$$Heap.java index cd7839302..38c81c894 100644 --- a/src/test/java/net/openhft/chronicle/map/fromdocs/BondVOInterface$MarketPx$$Heap.java +++ b/src/test/java/net/openhft/chronicle/map/fromdocs/BondVOInterface$MarketPx$$Heap.java @@ -16,13 +16,14 @@ package net.openhft.chronicle.map.fromdocs; -import static net.openhft.lang.Compare.*; -import java.io.IOException; import net.openhft.chronicle.map.fromdocs.BondVOInterface.MarketPx; import net.openhft.lang.io.Bytes; import net.openhft.lang.io.serialization.BytesMarshallable; import net.openhft.lang.model.Copyable; +import static net.openhft.lang.Compare.calcLongHashCode; +import static net.openhft.lang.Compare.isEqual; + public class BondVOInterface$MarketPx$$Heap implements MarketPx, BytesMarshallable, Copyable { private double _askPx; private double _bidPx;