Github user martin-g commented on a diff in the pull request:

    https://github.com/apache/wicket/pull/267#discussion_r167540776
  
    --- Diff: 
wicket-core/src/main/java/org/apache/wicket/validation/validator/DateValidator.java
 ---
    @@ -186,7 +188,15 @@ protected IValidationError decorate(IValidationError 
error, IValidatable<Date> v
                        // format variables if format has been specified
                        if (format != null)
                        {
    -                           SimpleDateFormat sdf = new 
SimpleDateFormat(format);
    +                           WebSession session = WebSession.get();
    --- End diff --
    
    First check that there is a Session with `if (Session.exists()) { ... }` 
because `Session.get()` will create a new one.


---

Reply via email to