-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modular Input: Error during ValidationDefinition/InputDefinition when no value for parameter is passed #198
Comments
@jrobins04 thanks for the detailed steps to reproduce the issue. We are looking into this and update you soon. |
@ashah-splunk Hi, any update on this? We have been using a custom splunk java sdk jar with the fix(null check) for this. But, recently our app got flagged for cloud app inspect because we don't use the official version of splunk java sdk. So, this issue is of priority for us, or our app could get removed for splunk cloud. |
@jrobins04 is null check the only fix or are there any other changes done as well? if so then I would request you to share your fix for this so that we can analyse that option for possible solution. |
@ashah-splunk Yes, null check is all what we need in my analysis.
Here child variable needs to be checked for null. |
Hi @jrobins04 , we have added the null check for the child as per your suggestion ( ref PR ). would request you to have a look and let us know if anything else needs to be handled. We are planning a new Java SDK release next week. |
@ashah-splunk thank you for looking into this with priority. |
@ashah-splunk Thanks for looking into this. When are you planning a release for this fix? |
@jrobins04 we are planning a release by end of this week. |
@jrobins04 we have a new Java SDK 1.9.2 release, request you to try with the latest release and let us know if you still face the issue. Thanks! |
Closing the issue as no response received. @jrobins04 please reopen the issue if you still face the problem. Thanks! |
@ashah-splunk Thank you for quickly fixing this. I have verified that the bug has been fixed in the latest release. Thanks again ! |
I am able to reproduce this using v1.9.1. This issue happens when the user provides no value for a modular input parameter.
https://github.com/splunk/splunk-sdk-java/blob/master/splunk/src/main/java/com/splunk/modularinput/XmlUtil.java textInNode() line number 38:
Here, no null check is performed for the
child
variable. In case when the modular input parameter has no value,child
will be null and child.getNodeType() leads to null pointer.Sample input to --validate-arguments that triggers the error:
In the above example
param_bug
has no value (user did not input any value to the modular input parameter), this causeschild
to be null in thetextInNode()
method.Please let me know if you need any other information regarding this issue.
Similar issue was created previously: #122 back in March 2018, but it was closed stating that it could not reproduced.
The text was updated successfully, but these errors were encountered: