Announcement Announcement Module
No announcement yet.
a benign bug in tokenrepository impls? Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.