diff --git a/core/src/main/java/ch/dissem/bitmessage/utils/Strings.java b/core/src/main/java/ch/dissem/bitmessage/utils/Strings.java index 5c1aae9..7c9e13f 100644 --- a/core/src/main/java/ch/dissem/bitmessage/utils/Strings.java +++ b/core/src/main/java/ch/dissem/bitmessage/utils/Strings.java @@ -16,8 +16,6 @@ package ch.dissem.bitmessage.utils; -import ch.dissem.bitmessage.entity.payload.ObjectType; - /** * Some utilities to handle strings. * TODO: Probably this should be split in a GUI related and an SQL related utility class. diff --git a/core/src/test/java/ch/dissem/bitmessage/SignatureTest.java b/core/src/test/java/ch/dissem/bitmessage/SignatureTest.java index 71b7d2a..3566a5f 100644 --- a/core/src/test/java/ch/dissem/bitmessage/SignatureTest.java +++ b/core/src/test/java/ch/dissem/bitmessage/SignatureTest.java @@ -22,7 +22,6 @@ import ch.dissem.bitmessage.entity.Plaintext; import ch.dissem.bitmessage.entity.payload.Msg; import ch.dissem.bitmessage.entity.payload.ObjectType; import ch.dissem.bitmessage.entity.payload.Pubkey; -import ch.dissem.bitmessage.entity.payload.V4Pubkey; import ch.dissem.bitmessage.entity.valueobject.PrivateKey; import ch.dissem.bitmessage.exception.DecryptionFailedException; import ch.dissem.bitmessage.utils.TestBase; @@ -30,7 +29,6 @@ import ch.dissem.bitmessage.utils.TestUtils; import org.junit.Test; import java.io.IOException; -import java.util.Date; import static org.junit.Assert.*; diff --git a/networking/src/main/java/ch/dissem/bitmessage/networking/ConnectionOrganizer.java b/networking/src/main/java/ch/dissem/bitmessage/networking/ConnectionOrganizer.java index 3f667e6..1163d1c 100644 --- a/networking/src/main/java/ch/dissem/bitmessage/networking/ConnectionOrganizer.java +++ b/networking/src/main/java/ch/dissem/bitmessage/networking/ConnectionOrganizer.java @@ -99,12 +99,12 @@ public class ConnectionOrganizer implements Runnable { networkHandler.startConnection(c); } Thread.sleep(10000); - } else if (initialConnection != null) { + } else if (initialConnection == null) { + Thread.sleep(30000); + } else { initialConnection.disconnect(); initialConnection = null; Thread.sleep(10000); - } else { - Thread.sleep(30000); } } catch (InterruptedException e) { networkHandler.stop(); diff --git a/repositories/src/main/java/ch/dissem/bitmessage/repository/JdbcMessageRepository.java b/repositories/src/main/java/ch/dissem/bitmessage/repository/JdbcMessageRepository.java index d77cdfb..1d714d9 100644 --- a/repositories/src/main/java/ch/dissem/bitmessage/repository/JdbcMessageRepository.java +++ b/repositories/src/main/java/ch/dissem/bitmessage/repository/JdbcMessageRepository.java @@ -47,9 +47,11 @@ public class JdbcMessageRepository extends JdbcHelper implements MessageReposito @Override public List