From 838b78313d6efd7af28720042d063083ba6d8df6 Mon Sep 17 00:00:00 2001 From: Amit Kumar Mondal Date: Tue, 21 Nov 2023 15:02:50 +0100 Subject: [PATCH 1/3] Fixed Javadocs --- .../console/util/configuration/ConfigHelper.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/com.osgifx.console.util/src/main/java/com/osgifx/console/util/configuration/ConfigHelper.java b/com.osgifx.console.util/src/main/java/com/osgifx/console/util/configuration/ConfigHelper.java index d61e268c..7f638b24 100644 --- a/com.osgifx.console.util/src/main/java/com/osgifx/console/util/configuration/ConfigHelper.java +++ b/com.osgifx.console.util/src/main/java/com/osgifx/console/util/configuration/ConfigHelper.java @@ -54,10 +54,8 @@ public class ConfigHelper { /** * Create a Config Helper for simple configurations. * - * @param type - * the type of the configuration interface - * @param cm - * the Configuration Admin service + * @param type the type of the configuration interface + * @param cm the Configuration Admin service */ @SuppressWarnings("unchecked") public ConfigHelper(final Class type, final ConfigurationAdmin cm) { @@ -104,10 +102,8 @@ public T d() { * The last invocation on the proxy is remembered and used in the set method * to get the name and return type of the property. * - * @param older - * ignored - * @param newer - * the value to set + * @param older ignored + * @param newer the value to set * @return this */ public ConfigHelper set(final X older, final X newer) { @@ -140,8 +136,7 @@ public Map getProperties() { /** * Read a configuration * - * @param pid - * a non-null PID + * @param pid a non-null PID * @return the properties read or empty if did not exist */ public Map read(final String pid) { From 53a489c695e5a0ddf1b33f67ddc45e7781bb9858 Mon Sep 17 00:00:00 2001 From: Amit Kumar Mondal Date: Thu, 23 Nov 2023 13:33:17 +0100 Subject: [PATCH 2/3] Fixed Precondition --- .../java/com/osgifx/console/supervisor/rpc/RpcSupervisor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.osgifx.console.supervisor/src/main/java/com/osgifx/console/supervisor/rpc/RpcSupervisor.java b/com.osgifx.console.supervisor/src/main/java/com/osgifx/console/supervisor/rpc/RpcSupervisor.java index 7c79d18c..46b19d66 100644 --- a/com.osgifx.console.supervisor/src/main/java/com/osgifx/console/supervisor/rpc/RpcSupervisor.java +++ b/com.osgifx.console.supervisor/src/main/java/com/osgifx/console/supervisor/rpc/RpcSupervisor.java @@ -205,7 +205,7 @@ public void logged(final XLogEntryDTO logEvent) { @Override public void addOSGiEventListener(final EventListener eventListener) { - checkNotNull(eventListener, "'logEntryListener' cannot be null"); + checkNotNull(eventListener, "'eventListener' cannot be null"); if (eventListeners.contains(eventListener)) { return; } From 7b36ad244499c04ae8fd3a44939ba729243d1c9c Mon Sep 17 00:00:00 2001 From: Amit Kumar Mondal Date: Fri, 24 Nov 2023 13:35:13 +0100 Subject: [PATCH 3/3] Added appropriate comment --- .../com/osgifx/console/supervisor/snapshot/SnapshotAgent.java | 1 + 1 file changed, 1 insertion(+) diff --git a/com.osgifx.console.supervisor/src/main/java/com/osgifx/console/supervisor/snapshot/SnapshotAgent.java b/com.osgifx.console.supervisor/src/main/java/com/osgifx/console/supervisor/snapshot/SnapshotAgent.java index 844c7e1c..2bc3e873 100644 --- a/com.osgifx.console.supervisor/src/main/java/com/osgifx/console/supervisor/snapshot/SnapshotAgent.java +++ b/com.osgifx.console.supervisor/src/main/java/com/osgifx/console/supervisor/snapshot/SnapshotAgent.java @@ -72,6 +72,7 @@ void init(final Configuration configuration) { if (configuration.location() == null) { return; } + // using gson as a field variable in a component seems very luring but it leads to classloader leaks final var gson = new Gson(); try { final var reader = new JsonReader(new FileReader(configuration.location()));