[jboss-jira] [JBoss JIRA] (DROOLS-3778) Receiving error InvocationTargetException on jdk11
Jozef Marko (Jira)
issues at jboss.org
Thu Mar 21 05:45:00 EDT 2019
[ https://issues.jboss.org/browse/DROOLS-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13710414#comment-13710414 ]
Jozef Marko edited comment on DROOLS-3778 at 3/21/19 5:44 AM:
--------------------------------------------------------------
[~jfomin] thank you for reporting this, it can be solved by getting rid of powermockito. The powermockito specific methods can be replaced by using methods from the general mockito library.
was (Author: jomarko):
[~jfomin] thank you for reporting this, it can be solved by getting rid of powermockito.
It means the test that currently mock static methods will change to
{code:java}
@Test
public void testGetHasTypeRefs() {
final Expression expression = mock(Expression.class);
final InformationItem parameter = mock(InformationItem.class);
final HasTypeRef hasTypeRef1 = mock(HasTypeRef.class);
final HasTypeRef hasTypeRef2 = mock(HasTypeRef.class);
final HasTypeRef hasTypeRef3 = mock(HasTypeRef.class);
final HasTypeRef hasTypeRef4 = mock(HasTypeRef.class);
doReturn(expression).when(binding).getExpression();
doReturn(Arrays.asList(hasTypeRef1, hasTypeRef2)).when(expression).getHasTypeRefs();
doReturn(parameter).when(binding).getParameter();
doReturn(Arrays.asList(hasTypeRef3, hasTypeRef4)).when(parameter).getHasTypeRefs();
final List<HasTypeRef> actualHasTypeRefs = binding.getHasTypeRefs();
final List<HasTypeRef> expectedHasTypeRefs = asList(hasTypeRef1, hasTypeRef2, hasTypeRef3, hasTypeRef4);
assertEquals(expectedHasTypeRefs, actualHasTypeRefs);
}
{code}
> Receiving error InvocationTargetException on jdk11
> --------------------------------------------------
>
> Key: DROOLS-3778
> URL: https://issues.jboss.org/browse/DROOLS-3778
> Project: Drools
> Issue Type: Bug
> Components: DMN Editor
> Affects Versions: 7.20.0.Final
> Environment: * jdk11
> * Apache Maven 3.5.4 (Red Hat 3.5.4-4)
> Reporter: Yevgeniy Fomin
> Assignee: Yevgeniy Fomin
> Priority: Major
> Labels: drools-tools, jdk11
> Attachments: Error log powermock.txt
>
>
> There is InvocationTargetException on test classes if they are run on jdk11. The tests can be found in [module|https://github.com/kiegroup/kie-wb-common/tree/master/kie-wb-common-dmn/kie-wb-common-dmn-api]
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list