Ensure the Cache is Serializable, non-null

Description

The current implementation of org.jivesoftware.util.cache.Cache imposes no particular constraints on the keys and values placed within it.

However, whilst the implementation org.jivesoftware.util.cache.DefaultCache will happily take null or non-serializable keys, the constraints of Hazelcast mean that org.jivesoftware.openfire.plugin.util.cache.ClusteredCache must take serializable, non-null keys.

This can lead to bugs - for example OF-1480, the original implementation of https://igniterealtime.atlassian.net/browse/OF-1539#icft=OF-1539

To avoid this, DefaultCache should enforce non-null, serializable keys and values.

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created August 16, 2018 at 8:29 AM
Updated October 5, 2018 at 1:52 PM
Resolved October 5, 2018 at 1:52 PM