[jboss-jira] [JBoss JIRA] (DROOLS-2111) JDK 9 on drools DMN: tests in kie-dmn-core fails on ConcurrentModificationException in KnowledgeBuilderImpl

Tibor Zimányi (JIRA) issues at jboss.org
Wed Nov 8 03:19:00 EST 2017


    [ https://issues.jboss.org/browse/DROOLS-2111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13487295#comment-13487295 ] 

Tibor Zimányi commented on DROOLS-2111:
---------------------------------------

New findings about this: 

In JDK 9 it is now not possible to use a mapping function that also modifies the underlying map in HashMap.computeIfAbsent() method. See this JavaDoc: 
"@throws ConcurrentModificationException if it is detected that the mapping function modified this map"

The part which cause this problem is here [1]. The problem there is that getCompiler() mapping function also modifies the map. The question now is if we consider this a bad habit (to use a mapping function that changes the map) or not and therefore we can try to replace the HashMap with some other map implementation. 

[1] https://github.com/kiegroup/drools/blob/7a6db1342925872a898dee3f1d03f835b198a7eb/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/assembler/DMNAssemblerService.java#L64



> JDK 9 on drools DMN: tests in kie-dmn-core fails on ConcurrentModificationException in KnowledgeBuilderImpl
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DROOLS-2111
>                 URL: https://issues.jboss.org/browse/DROOLS-2111
>             Project: Drools
>          Issue Type: Bug
>          Components: dmn engine
>    Affects Versions: 7.4.1.Final
>            Reporter: Tibor Zimányi
>            Assignee: Tibor Zimányi
>             Fix For: 7.5.0.Final
>
>
> When tests from module kie-dmn-core are run on JDK 9, they fails on ConcurrentModificationException with the following stacktrace [1].
> [1] https://gist.github.com/baldimir/92b270fa5527133de8a605c456b136ff



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)



More information about the jboss-jira mailing list