projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Don’t let a Sone add itself as friend!
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
data
/
Sone.java
diff --git
a/src/main/java/net/pterodactylus/sone/data/Sone.java
b/src/main/java/net/pterodactylus/sone/data/Sone.java
index
7041289
..
cd9239e
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/data/Sone.java
+++ b/
src/main/java/net/pterodactylus/sone/data/Sone.java
@@
-197,7
+197,7
@@
public class Sone {
* @return This Sone (for method chaining)
*/
public synchronized Sone addFriend(Sone friendSone) {
- if (friendSones.add(friendSone)) {
+ if (
!friendSone.equals(this) &&
friendSones.add(friendSone)) {
modificationCounter++;
}
return this;