-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to openhab 4.0.0 #153
Conversation
JRule works under openHAB 4.0.0. One problem is that it is not possible to extract the jar-files like it is done in Java 11. 09:17:33.319 [docker-java-stream-1769901458] INFO docker.openhab - STDOUT: 07:17:33.315 [ERROR] [.jrule.internal.handler.JRuleHandler] - [JRuleHandler] Compilation failed, not creating jar file This is what is failing under java 17 private Vector<Class<?>> getLoadedClasses(ClassLoader classLoader) {
Field field = null;
try {
field = ClassLoader.class.getDeclaredField("classes");
field.setAccessible(true);
} catch (Throwable t) {
return null;
}
try {
@SuppressWarnings("unchecked")
final Vector<Class<?>> classes = (Vector<Class<?>>) field.get(classLoader);
return classes;
} catch (IllegalArgumentException | IllegalAccessException ignored) {
}
return null;
} Since jar file extraction is failing compiling will fail and all docker-tests will fail. |
Seems to work now for openHAB 4. |
Nice fixes @querdenker2k question is when we should switch main to 4.x.x |
for me we could switch the main branch to 4.x |
I have created a 3.x.x branch. Please review this PR, and I'll merge it to main. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
running this branch for ~6 weeks now, seems to be fine
Update to openHAB 4.0.0