diff options
Diffstat (limited to 'src')
4 files changed, 4 insertions, 13 deletions
diff --git a/src/main/java/com/juick/model/Message.java b/src/main/java/com/juick/model/Message.java index e53afbfe..5ad4fb26 100644 --- a/src/main/java/com/juick/model/Message.java +++ b/src/main/java/com/juick/model/Message.java @@ -39,7 +39,7 @@ import java.util.Set; */ @XmlRootElement(name = "juick", namespace = "http://juick.com/message") @XmlAccessorType() -public class Message implements Comparable, Serializable { +public class Message implements Comparable<Message>, Serializable { private int mid = 0; private int rid = 0; private int replyto = 0; @@ -120,15 +120,10 @@ public class Message implements Comparable, Serializable { } @Override - public int compareTo(@Nonnull Object obj) throws ClassCastException { - if (obj == this) + public int compareTo(@Nonnull Message jmsg) throws ClassCastException { + if (jmsg == this) return 0; - if (!(obj instanceof Message)) - throw new ClassCastException(); - - Message jmsg = (Message) obj; - int cmp = Integer.compare(jmsg.getMid(), getMid()); if (cmp == 0) diff --git a/src/main/java/com/juick/www/api/activity/Profile.java b/src/main/java/com/juick/www/api/activity/Profile.java index 42a487ba..7e51eb95 100644 --- a/src/main/java/com/juick/www/api/activity/Profile.java +++ b/src/main/java/com/juick/www/api/activity/Profile.java @@ -25,7 +25,6 @@ import com.juick.model.CommandResult; import com.juick.ActivityPubManager; import com.juick.CommandsManager; import com.juick.KeystoreManager; -import com.juick.SignatureManager; import com.juick.www.api.activity.model.Activity; import com.juick.www.api.activity.model.Context; import com.juick.www.api.activity.model.activities.Announce; @@ -86,8 +85,6 @@ public class Profile { @Inject private KeystoreManager keystoreManager; @Inject - private SignatureManager signatureManager; - @Inject private ActivityPubManager activityPubManager; @Inject private ApplicationEventPublisher applicationEventPublisher; diff --git a/src/test/java/com/juick/config/TestActivityConfiguration.java b/src/test/java/com/juick/config/TestActivityConfiguration.java index 854bad06..d77b2d52 100644 --- a/src/test/java/com/juick/config/TestActivityConfiguration.java +++ b/src/test/java/com/juick/config/TestActivityConfiguration.java @@ -23,8 +23,6 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.Resource; -import java.io.IOException; - @Configuration public class TestActivityConfiguration { @Value("classpath:test.p12") diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index ee726dbf..03f52623 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -756,6 +756,7 @@ public class ServerTests { Scanner headerScanner = new Scanner(header).useDelimiter(EmailManager.MSGID_PATTERN); int mid = Integer.parseInt(headerScanner.next()); int rid = Integer.parseInt(headerScanner.next()); + headerScanner.close(); assertThat(mid, equalTo(123456)); assertThat(rid, equalTo(56)); } |