From e98dd0d49ccc4ee24075fb56e6ca68fd6dc402d7 Mon Sep 17 00:00:00 2001 From: Guus der Kinderen Date: Sun, 21 Jan 2024 17:39:31 +0100 Subject: [PATCH] fix #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. Openfire 4.8.1 introduces fixes for the SerializingCache implementation: - https://igniterealtime.atlassian.net/browse/OF-2781 - https://igniterealtime.atlassian.net/browse/OF-2782 This commit updates the minimum required version of Openfire to 4.8.1, to be able to make use of these fixes. --- changelog.html | 6 ++++++ plugin.xml | 2 +- pom.xml | 4 ++-- .../httpfileupload/OpenfireSlotProvider.java | 15 ++++++++------- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/changelog.html b/changelog.html index b17ca91..fd186ff 100644 --- a/changelog.html +++ b/changelog.html @@ -41,6 +41,12 @@

HTTP File Upload Plugin Changelog

+

1.5.0 -- (tbd)

+ +

1.4.2 -- (November 19, 2024)