From: David ‘Bombe’ Roden Date: Thu, 13 Nov 2008 00:56:13 +0000 (+0100) Subject: Don’t check node in project, always use given node. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2ab79371be9e363e182cb2dec74986d18ef46c47;p=jSite2.git Don’t check node in project, always use given node. --- diff --git a/src/net/pterodactylus/jsite/core/InsertManager.java b/src/net/pterodactylus/jsite/core/InsertManager.java index 2c4f97b..00c05e3 100644 --- a/src/net/pterodactylus/jsite/core/InsertManager.java +++ b/src/net/pterodactylus/jsite/core/InsertManager.java @@ -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);