]> git.basschouten.com Git - openhab-addons.git/commitdiff
Removed ClassExtender as it's no longer used and may be leaking memory (#12725)
authorJonathan Gilbert <jpg@trillica.com>
Thu, 12 May 2022 21:08:40 +0000 (22:08 +0100)
committerGitHub <noreply@github.com>
Thu, 12 May 2022 21:08:40 +0000 (23:08 +0200)
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/scope/ClassExtender.java [deleted file]
bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/scope/OSGiScriptExtensionProvider.java

diff --git a/bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/scope/ClassExtender.java b/bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/scope/ClassExtender.java
deleted file mode 100644 (file)
index f1e0d71..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Copyright (c) 2010-2022 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.automation.jsscripting.internal.scope;
-
-//import com.oracle.truffle.js.runtime.java.adapter.JavaAdapterFactory;
-
-/**
- * Class utility to allow creation of 'extendable' classes with a classloader of the current bundle, rather than the
- * classloader of the file being extended.
- *
- * @author Jonathan Gilbert - Initial contribution
- */
-public class ClassExtender {
-    private ClassLoader classLoader = getClass().getClassLoader();
-}
index 4725a5a698c8de7ac1a1447625e274838d19bade..262653a118a01e6580cd2c182c098021bea2b01e 100644 (file)
@@ -31,10 +31,7 @@ public class OSGiScriptExtensionProvider extends ScriptDisposalAwareScriptExtens
 
     @Override
     protected void initializeTypes(final BundleContext context) {
-        ClassExtender classExtender = new ClassExtender();
-
         addType("bundleContext", k -> context);
         addType("lifecycle", k -> new Lifecycle());
-        addType("classutil", k -> classExtender);
     }
 }