Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #43: Prevent ClassCastExceptions after plugin gets reloaded in a cluster #66

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jan 21, 2024

  1. fix igniterealtime#43: Prevent ClassCastExceptions after plugin gets …

    …reloaded in a cluster
    
    This plugin caches instances of classes that are defined in the code of the plugin. This causes ClassCastExceptions, when the plugin gets unloaded (removing the class definitions) and updated/reloaded (replacing the class definitions). The cached values at that time will refer to classes that no longer exist, causing the exceptions.
    
    https://igniterealtime.atlassian.net/browse/OF-2239 introduces a new type of Cache to work around this problem, the org.jivesoftware.util.cache.SerializingCache which is available since Openfire 4.7.0. This implementation does not cache the instance directly, but caches a serialized version instead. This way, there no longer is a reference to the class, which means that any (compatible) future class definition can be used to instantiate the cache entry again.
    guusdk committed Jan 21, 2024
    Configuration menu
    Copy the full SHA
    2dc101a View commit details
    Browse the repository at this point in the history