Skip to content

Commit

Permalink
Issue #2723 - avoid NPE in getInputParameters
Browse files Browse the repository at this point in the history
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
  • Loading branch information
JohnTimm committed Aug 25, 2021
1 parent 3dcac97 commit 788c197
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ public static Parameters getInputParameters(OperationDefinition definition, Reso
Parameters.Builder parametersBuilder = Parameters.builder();
parametersBuilder.id("InputParameters");
for (OperationDefinition.Parameter parameterDefinition : definition.getParameter()) {
if (parameterDefinition.getType() == null) {
continue;
}
String parameterTypeName = parameterDefinition.getType().getValue();
String resourceTypeName = resource.getClass().getSimpleName();
if ((resourceTypeName.equals(parameterTypeName) || "Resource".equals(parameterTypeName))
Expand Down

0 comments on commit 788c197

Please sign in to comment.