Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4685

ValidationError addKey fails with error abort

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.0.0-beta3
    • 6.0.0
    • wicket
    • None
    • wicket 6.0.0. beta3
      Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
      Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
      debian 64 bit

    Description

      // own code
      TextField<String> field = new TextField<String>( "fldItem", getPropertyModel() );
      field.add( new PatternValidator( pattern ) {
      protected ValidationError decorate( ValidationError error, IValidatable<String> validatable )

      { error.setMessage( "Input is not matching pattern=" + pattern ); return error; }

      } );

      // this will fail in the class ValidationError at
      public ValidationError addKey(IValidator<?> validator)

      { Args.notNull(validator, "validator"); addKey(validator.getClass().getSimpleName()); // <-- fail, because getSimpleName is empty return this; }

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mgrigorov Martin Tzvetanov Grigorov
            hafenwasser Birger Hafenwasser
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment