Skip to content

Commit

Permalink
Make Freedomotic compile with Java 11
Browse files Browse the repository at this point in the history
  • Loading branch information
mcicolella committed Mar 19, 2022
1 parent 75814a0 commit b1221af
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
19 changes: 19 additions & 0 deletions framework/freedomotic-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,23 @@
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<activation>
<jdk>11</jdk>
</activation>

<dependencies>
<dependency>
<!--
JAXB was removed from java SDK on JEP 320
http://openjdk.java.net/jeps/320
-->
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.4.0-b180830.0438</version>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

0 comments on commit b1221af

Please sign in to comment.