Only allow unshelling a reply if both its post and its Sone are not shells.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Oct 2010 12:42:34 +0000 (14:42 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Oct 2010 12:42:34 +0000 (14:42 +0200)
src/main/java/net/pterodactylus/sone/data/ReplyShell.java

index 11a6ee5..afcf295 100644 (file)
@@ -181,7 +181,7 @@ public class ReplyShell extends Reply implements Shell<Reply> {
         */
        @Override
        public boolean canUnshell() {
-               return (sone != null) && (id != null) && (post != null) && (time != null) && (text != null);
+               return (sone != null) && (!(sone instanceof Shell<?>)) && (id != null) && (post != null) && (!(post instanceof Shell<?>)) && (time != null) && (text != null);
        }
 
        /**