projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into next
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
data
/
Reply.java
diff --git
a/src/main/java/net/pterodactylus/sone/data/Reply.java
b/src/main/java/net/pterodactylus/sone/data/Reply.java
index
c97d57b
..
05d8049
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/data/Reply.java
+++ b/
src/main/java/net/pterodactylus/sone/data/Reply.java
@@
-31,16
+31,26
@@
public class Reply {
private final UUID id;
/** The Sone that posted this reply. */
private final UUID id;
/** The Sone that posted this reply. */
- private Sone sone;
+ private
volatile
Sone sone;
/** The Post this reply refers to. */
/** The Post this reply refers to. */
- private Post post;
+ private
volatile
Post post;
/** The time of the reply. */
/** The time of the reply. */
- private long time;
+ private
volatile
long time;
/** The text of the reply. */
/** The text of the reply. */
- private String text;
+ private volatile String text;
+
+ /**
+ * Creates a new reply.
+ *
+ * @param id
+ * The ID of the reply
+ */
+ public Reply(String id) {
+ this(id, null, null, 0, null);
+ }
/**
* Creates a new reply.
/**
* Creates a new reply.
@@
-200,7
+210,7
@@
public class Reply {
*/
@Override
public int hashCode() {
*/
@Override
public int hashCode() {
- return
sone.hashCode() ^ id.hashCode() ^ post.hashCode() ^ (int) (time >> 32) ^ (int) (time & 0xffffffff) ^ text
.hashCode();
+ return
id
.hashCode();
}
/**
}
/**
@@
-212,7
+222,7
@@
public class Reply {
return false;
}
Reply reply = (Reply) object;
return false;
}
Reply reply = (Reply) object;
- return reply.
sone.equals(sone) && reply.id.equals(id) && reply.post.equals(post) && (reply.time == time) && reply.text.equals(text
);
+ return reply.
id.equals(id
);
}
/**
}
/**