“sone” can never be null, the constructor would balk.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 2 Aug 2014 09:49:50 +0000 (11:49 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 2 Aug 2014 09:49:50 +0000 (11:49 +0200)
src/main/java/net/pterodactylus/sone/core/SoneInserter.java

index 734847a..729f434 100644 (file)
@@ -136,7 +136,7 @@ public class SoneInserter extends AbstractService {
         * @return This Sone inserter
         */
        public SoneInserter setSone(Sone sone) {
-               checkArgument((this.sone == null) || sone.equals(this.sone), "Sone to insert can not be set to a different Sone");
+               checkArgument(sone.equals(this.sone), "Sone to insert can not be set to a different Sone");
                this.sone = sone;
                return this;
        }