Fix LGTM warning
Remove null check in RenderGraph that just throws an unchecked
exception anyway.
@@ -539,7 +539,6 @@ private void reconnectInputToOutput(Node toNode, int inputId, DependencyConnecti
logger.info("Attempting reconnection of " + toNode.getUri() + " to " + fromConnection.getParentNode() + "'s output.");
Node fromNode;
- if (fromConnection != null) {
fromNode = findNode(fromConnection.getParentNode());
if (!fromConnection.getConnectedConnections().isEmpty()) {
logger.warn("WARNING: destination connection (" + fromConnection + ") is already connected to ("
@@ -548,9 +547,7 @@ private void reconnectInputToOutput(Node toNode, int inputId, DependencyConnecti
// throw new RuntimeException("Could not reconnect, destination connection (" + fromConnection + ") is already connected to ("
// + fromConnection.getConnectedConnections() + "). Remove connection first.");
} // TODO make it getInputConnection
- } else {
- throw new RuntimeException("Source connection null. Cannot reconnect node " + toNode + "'s input id " + inputId + ".\n");
- }
+
DependencyConnection connectionToReconnect;
switch (connectionType) {
