From b1221af6d14a5178710100346a0e48002bc49287 Mon Sep 17 00:00:00 2001 From: Mauro Cicolella Date: Sun, 13 Feb 2022 18:15:19 +0100 Subject: [PATCH] Make Freedomotic compile with Java 11 --- .../com/freedomotic/things/ThingFactory.java | 3 ++- framework/freedomotic-model/pom.xml | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/framework/freedomotic-core/src/main/java/com/freedomotic/things/ThingFactory.java b/framework/freedomotic-core/src/main/java/com/freedomotic/things/ThingFactory.java index 22cc21d36..8330a094c 100644 --- a/framework/freedomotic-core/src/main/java/com/freedomotic/things/ThingFactory.java +++ b/framework/freedomotic-core/src/main/java/com/freedomotic/things/ThingFactory.java @@ -57,7 +57,8 @@ public EnvObjectLogic create(EnvObject pojo) throws RepositoryException { } try { - URLClassLoader classLoader = (URLClassLoader) ClassLoader.getSystemClassLoader(); + //URLClassLoader classLoader = (URLClassLoader) ClassLoader.getSystemClassLoader(); + ClassLoader classLoader = ClassLoader.getSystemClassLoader(); Class clazz = classLoader.loadClass(pojo.getHierarchy()); //eg: com.freedomotic.things.impl.ElectricDevice EnvObjectLogic logic = null; try { diff --git a/framework/freedomotic-model/pom.xml b/framework/freedomotic-model/pom.xml index b920071bd..05ef24912 100644 --- a/framework/freedomotic-model/pom.xml +++ b/framework/freedomotic-model/pom.xml @@ -89,4 +89,23 @@ + + + + 11 + + + + + + org.glassfish.jaxb + jaxb-runtime + 2.4.0-b180830.0438 + + + +