Issue #3329 Hazelcast remove session fails (#3330)

Signed-off-by: Jan Bartel <janb@webtide.com>
This commit is contained in:
Jan Bartel 2019-02-06 17:18:40 +11:00 committed by GitHub
parent d22ec03acc
commit adc2d43536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -20,6 +20,7 @@ package org.eclipse.jetty.hazelcast.session;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.eclipse.jetty.server.session.AbstractSessionDataStore; import org.eclipse.jetty.server.session.AbstractSessionDataStore;
@ -74,7 +75,12 @@ public class HazelcastSessionDataStore
public boolean delete( String id ) public boolean delete( String id )
throws Exception throws Exception
{ {
return sessionDataMap == null ? false : sessionDataMap.remove( getCacheKey( id ) ) != null; if (sessionDataMap == null)
return false;
//use delete which does not deserialize the SessionData object being removed
sessionDataMap.delete( getCacheKey(id));
return true;
} }
public IMap<String, SessionData> getSessionDataMap() public IMap<String, SessionData> getSessionDataMap()