jcoleman / tomcat-redis-session-manager

Redis-backed non-sticky session store for Apache Tomcat
MIT License
1.8k stars 1.12k forks source link

RedisSession throw NullPointException #70

Closed RishonLi closed 9 years ago

RishonLi commented 9 years ago

in the method setAttribute

if ( (value != null || oldValue != null) && ( value == null && oldValue != null || oldValue == null && value != null || !value.getClass().isInstance(oldValue) || !value.equals(oldValue) ) ) {

not handled

if (value == null && oldValue == null)

jcoleman commented 9 years ago

@RishonLi That case shouldn't throw a NPE because:

jcoleman commented 9 years ago

Are you running the latest code? What stack trace are you seeing?

RishonLi commented 9 years ago

Thanks for your answer. Yesterday, I pull the latest code with branch tomcat-7. running throw NPE at the code. Is there any other possible?

jcoleman commented 9 years ago

As stated in the README, the tomcat-7 branch is no longer in use having been merged into master some time ago. You should use master.