Uploaded image for project: 'Stripes'
  1. STS-928

Nullpointer when validating required encrypted List

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Release 1.5.7
    • Fix Version/s: None
    • Component/s: Validation
    • Labels:
      None

      Description

      I have a Stripes exception since 1.5.7 with this code:
      @Validate(required=true, encrypted=true, on=

      {"save"}

      )
      private List<MyObject> myObjects;

      When "myObjects" is not sent in the request, we have the following stacktrace:

      java.lang.NullPointerException: null
      at net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder.validateRequiredFields(DefaultActionBeanPropertyBinder.java:494) ~[stripes-1.5.8.jar:1.5.8]
      at net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder.bind(DefaultActionBeanPropertyBinder.java:119) ~[stripes-1.5.8.jar:1.5.8]
      at net.sourceforge.stripes.controller.DispatcherHelper$3.intercept(DispatcherHelper.java:207) ~[stripes-1.5.8.jar:1.5.8]
      at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158) ~[stripes-1.5.8.jar:1.5.8]

      It doesn't happen if I remove encrypted=true.

      In DefaultActionBeanPropertyBinder.java line 494, "values" is null and should be protected, this would fix the issue.

      It didn't happen before 1.5.7.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lionelm L
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: