Struts 2
  1. Struts 2
  2. WW-3431

OVal plugin with javolution Destination array too small performing validation

    Details

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

      java 1.6 struts-oval-plugin 2.1.8.1 javolution 5.4.2

      Description

      In method protected void performOValValidation(Object action, ValueStack valueStack, String methodName, String context) throws NoSuchMethodException; of org.apache.struts2.oval.interceptor.OValValidationInterceptor line 174 :

      addValidationErrors(violations.toArray(new ConstraintViolation[0]), action, valueStack, null);

      the array provided as an argument for addValidationErrors() has size 0 that causes a "Destination array too small" exception, it should be something like:

      addValidationErrors(violations.toArray(new ConstraintViolation[violations.size]), action, valueStack, null);

      ini order to guarantee the size of array.

      thank you

        Activity

        Hide
        Hudson added a comment -

        Integrated in Struts2 #454 (See https://builds.apache.org/job/Struts2/454/)
        WW-3431 Solves problem with array initialization (Revision 1324871)

        Result = SUCCESS
        lukaszlenart :
        Files :

        • /struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java
        Show
        Hudson added a comment - Integrated in Struts2 #454 (See https://builds.apache.org/job/Struts2/454/ ) WW-3431 Solves problem with array initialization (Revision 1324871) Result = SUCCESS lukaszlenart : Files : /struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java
        Hide
        Lukasz Lenart added a comment -

        Solved, thanks for reporting!

        Show
        Lukasz Lenart added a comment - Solved, thanks for reporting!

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development