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

JSONValidationInterceptor thows exception used with OValValidationInterceptor

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.8.1
    • Fix Version/s: 2.3.1
    • Component/s: Plugin - JSON
    • Labels:
    • Environment:

      struts-json-plugin 2.1.8.1

      Description

      in the method protected String buildResponse(ValidationAware validationAware) of org.apache.struts2.interceptor.validation.JSONValidationInterceptor line 149 the work around described in WW-2721 tries to remove "model." from fieldError.key. But when using OValValidationInterceptor the fieldError.key doesn't contains the substring "model." so, the code should be sometring like:

      sb.append(validationAware instanceof ModelDriven ? fieldError.getKey(). replaceFirst("model
      .", "")
      : fieldError.getKey());

      thank you

        Attachments

          Activity

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              nickmancol Nicolas Bohorquez Gutierrez
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: