Skip to content
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

Fix rules stay uninitialized when using Java 17 #2787

Merged
merged 1 commit into from
Feb 20, 2022

Conversation

wborn
Copy link
Member

@wborn wborn commented Feb 19, 2022

On Java 17 there is no Nashorn scripting engine so it takes a bit longer before ScriptEngines are available.
Rules would stay uninitialized forever because the ScriptModuleTypeProvider did not notify its listeners whenever the script.ScriptAction, script.ScriptCondition module types became available.

@wborn wborn added the bug An unexpected problem or unintended behavior of the Core label Feb 19, 2022
@wborn wborn requested a review from a team as a code owner February 19, 2022 22:48
On Java 17 there is no Nashorn scripting engine so it takes a bit longer before ScriptEngines are available.
Rules would stay uninitialized forever because the ScriptModuleTypeProvider did not notify its listeners whenever script.ScriptAction, script.ScriptCondition became available.

Signed-off-by: Wouter Born <[email protected]>
@J-N-K
Copy link
Member

J-N-K commented Feb 20, 2022

LGTM.

Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kaikreuzer kaikreuzer added this to the 3.3 milestone Feb 20, 2022
@kaikreuzer kaikreuzer merged commit 2e0b242 into openhab:main Feb 20, 2022
@wborn wborn deleted the java17-rules branch February 20, 2022 19:43
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/blockly-ui-not-showing-up/135532/7

splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 12, 2023
On Java 17 there is no Nashorn scripting engine so it takes a bit longer before ScriptEngines are available.
Rules would stay uninitialized forever because the ScriptModuleTypeProvider did not notify its listeners whenever script.ScriptAction, script.ScriptCondition became available.

Signed-off-by: Wouter Born <[email protected]>
GitOrigin-RevId: 2e0b242
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants