diff --git a/xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginManager.java b/xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginManager.java index 7b4475acfa..53906ba83f 100644 --- a/xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginManager.java +++ b/xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginManager.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2008 Jive Software, 2017-2024 Ignite Realtime Foundation. All rights reserved. + * Copyright (C) 2004-2008 Jive Software, 2017-2025 Ignite Realtime Foundation. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -450,9 +450,6 @@ public boolean isExecuted() */ synchronized boolean loadPlugin( String canonicalName, Path pluginDir ) { - // Clean up any warnings that were recorded during a previous attempt to load the plugin. - lastLoadWarnings.remove(canonicalName); - final PluginMetadata metadata = PluginMetadata.getInstance( pluginDir ); pluginMetadata.put( canonicalName, metadata ); @@ -469,6 +466,9 @@ synchronized boolean loadPlugin( String canonicalName, Path pluginDir ) return false; } + // Clean up any warnings that were recorded during a previous attempt to load the plugin. + lastLoadWarnings.remove(canonicalName); + Log.debug( "Loading plugin '{}'...", canonicalName ); try {