Don’t check node in project, always use given node.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 13 Nov 2008 00:56:13 +0000 (01:56 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 13 Nov 2008 00:56:13 +0000 (01:56 +0100)
src/net/pterodactylus/jsite/core/InsertManager.java

index 2c4f97b..00c05e3 100644 (file)
@@ -84,15 +84,8 @@ public class InsertManager {
         */
        public void insertProject(Project project, Node node) {
                logger.log(Level.FINEST, "insertProject(project=" + project + ",node=" + node + ")");
-               Node insertNode = project.getNode();
-               if (insertNode == null) {
-                       insertNode = node;
-                       if (insertNode == null) {
-                               throw new NullPointerException("node must not be null");
-                       }
-               }
                String insertId = "insert-" + project.getId();
-               Insert newInsert = new Insert(project, insertNode, insertId);
+               Insert newInsert = new Insert(project, node, insertId);
                inserts.put(insertId, newInsert);
                saveConfiguration();
                insertListenerSupport.fireInsertAdded(newInsert);