Skip to content

Commit

Permalink
handle optional arg properly #518
Browse files Browse the repository at this point in the history
  • Loading branch information
walterxie committed Jan 12, 2025
1 parent 1575135 commit 0a32813
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public InternalNodesID(@ParameterInfo(name = treeParamName,
@ParameterInfo(name = INTER_NODE_ID, optional = true,
description = "the vector of internal nodes id.") Value<Object[]> internalNodesID) {
setInput(treeParamName, tree);
setInput(INTER_NODE_ID, internalNodesID);
// handle optional
if (internalNodesID != null)
setInput(INTER_NODE_ID, internalNodesID);
}

@GeneratorInfo(name = "setInternalNodesID", category = GeneratorCategory.TREE,
Expand Down

0 comments on commit 0a32813

Please sign in to comment.