Results 1 to 2 of 2

Thread: a benign bug in tokenrepository impls?

  1. #1
    Join Date
    Feb 2010
    Posts
    15

    Exclamation a benign bug in tokenrepository impls?

    in both InMemoryTokenRepositoryImpl and JdbcTokenRepositoryImpl, for the #updateToken() method, a new Date() is created rather than using the lastUsed that is passed in (which in the PersistentTokenBasedRememberMeServices is a new Date() defined 2 lines earlier).

    I'm working on creating a custom implementation of the PersistentTokenRepository interface, and since there is absolutely no JavaDoc on the interface methods, I've been looking at the source of the implementations to determine what they are supposed to do. Should I be using the lastUsed Date that is passed in or also ignore it and create a new Date() object?

  2. #2
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    As you say, it shouldn't matter since they are effectively the same. There's probably no good reason why the date needs to be passed into the update method.
    Spring - by Pivotal
    twitter @tekul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •