aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/model
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-10-19 09:08:48 +0300
committerGravatar Vitaly Takmazov2020-10-19 09:18:55 +0300
commitf65f8a63587e0f42e1d8843b30ff15c8f74e3f86 (patch)
tree8a616237073bde3e60e706169afd1c0d77a2d95b /src/main/java/com/juick/model
parent06914c210bbf1130299c380eff1e300b5ea0b8f9 (diff)
Fix some JDT warnings
Diffstat (limited to 'src/main/java/com/juick/model')
-rw-r--r--src/main/java/com/juick/model/Message.java11
1 files changed, 3 insertions, 8 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)