BVal
  1. BVal
  2. BVAL-81

No context provided when validating methods

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.1-incubating, 0.2-incubating
    • Fix Version/s: None
    • Component/s: method validation
    • Labels:
      None

      Description

      When validating method executions no constraints are provided:
      [ConstraintViolationImpl

      {rootBean=null, propertyPath='', message='may not be empty', leafBean=[], value=[]}

      ]

        Activity

        Hide
        David J. M. Karlsen added a comment -

        You might also be interested in what's being done in the hibernate validator camp: http://www.mail-archive.com/hibernate-dev@lists.jboss.org/msg05426.html

        Show
        David J. M. Karlsen added a comment - You might also be interested in what's being done in the hibernate validator camp: http://www.mail-archive.com/hibernate-dev@lists.jboss.org/msg05426.html
        Hide
        David J. M. Karlsen added a comment -

        I think that for non-abstract classes that are compiled with debug info it is available and that's what they rely on.
        http://stackoverflow.com/questions/939194/preserving-parameter-argument-names-in-compiled-java-classes
        http://stackoverflow.com/questions/2622018/compile-classfile-issue-in-spring-3

        Show
        David J. M. Karlsen added a comment - I think that for non-abstract classes that are compiled with debug info it is available and that's what they rely on. http://stackoverflow.com/questions/939194/preserving-parameter-argument-names-in-compiled-java-classes http://stackoverflow.com/questions/2622018/compile-classfile-issue-in-spring-3
        Hide
        Matt Benson added a comment -

        Don't the Spring guys do some (perhaps AOP-related?) stuff that allows them to get method parameter names under optimal circumstances?

        Show
        Matt Benson added a comment - Don't the Spring guys do some (perhaps AOP-related?) stuff that allows them to get method parameter names under optimal circumstances?
        Hide
        Roman Stumm added a comment -

        The argument name is not available via reflection.

        Show
        Roman Stumm added a comment - The argument name is not available via reflection.
        Hide
        David J. M. Karlsen added a comment -

        Hmm - good question. Would it be possible to fit in both the Method and the name of the argument?

        Show
        David J. M. Karlsen added a comment - Hmm - good question. Would it be possible to fit in both the Method and the name of the argument?
        Hide
        Roman Stumm added a comment - - edited

        An example would be helpful, that shows what the expected behavior should be. A reproducer would be great.

        Would you expect the Method object itself as rootBean of the ConstraintViolation? see MethodValidatorImpl#validateParameters, line 180

        Show
        Roman Stumm added a comment - - edited An example would be helpful, that shows what the expected behavior should be. A reproducer would be great. Would you expect the Method object itself as rootBean of the ConstraintViolation? see MethodValidatorImpl#validateParameters, line 180
        Hide
        David J. M. Karlsen added a comment -

        ping?

        Show
        David J. M. Karlsen added a comment - ping?

          People

          • Assignee:
            Unassigned
            Reporter:
            David J. M. Karlsen
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development