GithubHelp home page GithubHelp logo

Comments (4)

shakeelmohamed avatar shakeelmohamed commented on August 11, 2024 1

Hi @segfault-, thanks for you note. Feel free to open a pull request if there's a specific change you'd like to see

from splunk-sdk-java.

segfault- avatar segfault- commented on August 11, 2024

my formatting didn't go thru, i just added a child!=null check

from splunk-sdk-java.

bparmar-splunk avatar bparmar-splunk commented on August 11, 2024

Hi @segfault-,
We have checked the usage of XmlUtil.textInNode method in entire SDK code, and has found that null checks are implemented where this method is called.
We have also executed Validation test, but could not encounter this issue.

We would recommend to update SDK version to 1.7.1 and make use of JDK 1.8 & maven build, as we have migrated from Ant to Maven.

Please let us know, if you still face any issue, along with details to reproduce.

from splunk-sdk-java.

jrobins04 avatar jrobins04 commented on August 11, 2024

Hi @bparmar-splunk,

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:

static String textInNode(Node node, String errorMessage) throws MalformedDataException {
        Node child = node.getFirstChild();
        if (child.getNodeType() != Node.TEXT_NODE) {
            throw new MalformedDataException(errorMessage);
        } else {
            return ((Text)child).getData();
        }
    }

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.

Please let me know if you need any other information regarding this issue.

from splunk-sdk-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.