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

Prevent NPE on shutdown by making maps in DSLRuleProvider thread safe #1856

Merged
merged 1 commit into from Nov 29, 2020

Conversation

kaikreuzer
Copy link
Member

Fixes #1801

Signed-off-by: Kai Kreuzer kai@openhab.org

Signed-off-by: Kai Kreuzer <kai@openhab.org>
@kaikreuzer kaikreuzer added the bug An unexpected problem or unintended behavior of the Core label Nov 28, 2020
@wborn wborn merged commit fe62a4f into openhab:master Nov 29, 2020
private final Map<String, XExpression> xExpressions = new HashMap<>();
private final Map<String, Rule> rules = new ConcurrentHashMap<>();
private final Map<String, IEvaluationContext> contexts = new ConcurrentHashMap<>();
private final Map<String, XExpression> xExpressions = new ConcurrentHashMap<>();
private int triggerId = 0;
private Set<String> markers = new HashSet<>();
Copy link

Choose a reason for hiding this comment

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

@kaikreuzer does markers need to be thread safe as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, afaik this method is called single threaded.

@kaikreuzer kaikreuzer deleted the chm branch November 29, 2020 13:34
@wborn wborn added this to the 3.0.0.M4 milestone Nov 29, 2020
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 11, 2023
Signed-off-by: Kai Kreuzer <kai@openhab.org>
GitOrigin-RevId: fe62a4f
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.

ConcurrentModificationException during shutdown in openhab.log
3 participants