Details

    • New, Patch Available

    Description

      In the file BoostQueryNode.java, getChild could be null and it is being dereferenced in the function toString().

      BoostQueryNode.java
        public QueryNode getChild() {
          List<QueryNode> children = getChildren();
      
          if (children == null || children.size() == 0) {
            return null;
          }
      
          return children.get(0);
      
        }
      BoostQueryNode.java
      public String toString() {
          return "<boost value='" + getValueString() + "'>" + "\n"
              + getChild().toString() + "\n</boost>";
        }
      

      Should we not check if getChild is valid?

      Probable fix
      String s = (getChild() != null) ? getChild().toString() : "null";
      return "<boost value='" + getValueString() + "'>" + "\n"
              + s + "\n</boost>";
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            rmp91 Rishabh Patel

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment