Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4275

Cast exception on Supressing empty parameters on <s:a> tag

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.16
    • 2.3.20
    • None
    • Tomcat/Centos

    Description

      I have noticed that my patch does not handle integers correctly, alas, we need to do another change

      It does kind of the same check, but this works with integers/doubles.

      Object value = findValue(this.value);
      if (suppressEmptyParameters) {
      if (value != null && !value.toString().isEmpty()){ 
        component.addParameter(name, value); }
      } else{
        component.addParameter(name, value); 
      }
      

      existing code:

      if (suppressEmptyParameters) {
      String potentialValue = (String) value;
      if (potentialValue != null && potentialValue.length() > 0) { component.addParameter(name, value); }
      } else { component.addParameter(name, value); }
      

      Attachments

        Issue Links

          Activity

            People

              ghuber Greg Huber
              ghuber Greg Huber
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: