alvarogarcia7/bank-kata-kotlin

Remove java.lang.InternalError: Malformed class name exception

alvarogarcia7 opened this issue · 1 comments

Mar 24, 2018 4:28:38 PM org.junit.platform.commons.util.ClasspathScanner logWarning
WARNING: The java.lang.Class loaded from path [/Users/alvaro/Documents/sandbox/kotlin/kata/bank/service/out/production/classes/com/example/kata/bank/service/delivery/handlers/OperationsHandler$readValueOption$$inlined$readValue$1.class] has a malformed class name [com.example.kata.bank.service.delivery.handlers.OperationsHandler$readValueOption$$inlined$readValue$1].
java.lang.InternalError: Malformed class name
	at java.lang.Class.getSimpleName(Class.java:1330)
	at java.lang.Class.isAnonymousClass(Class.java:1411)
	at java.lang.Class.isLocalClass(Class.java:1422)
	at org.junit.jupiter.engine.discovery.predicates.IsPotentialTestContainer.test(IsPotentialTestContainer.java:35)
	at org.junit.jupiter.engine.discovery.predicates.IsTestClassWithTests.test(IsTestClassWithTests.java:46)
	at org.junit.jupiter.engine.discovery.predicates.IsScannableTestClass.test(IsScannableTestClass.java:36)
	at org.junit.jupiter.engine.discovery.predicates.IsScannableTestClass.test(IsScannableTestClass.java:26)
	at java.util.Optional.filter(Optional.java:178)
	at org.junit.platform.commons.util.ClasspathScanner.processClassFileSafely(ClasspathScanner.java:157)
	at org.junit.platform.commons.util.ClasspathScanner.lambda$findClassesForPath$3(ClasspathScanner.java:141)
	at org.junit.platform.commons.util.ClassFileVisitor.visitFile(ClassFileVisitor.java:41)
	at org.junit.platform.commons.util.ClassFileVisitor.visitFile(ClassFileVisitor.java:24)
	at java.nio.file.Files.walkFileTree(Files.java:2670)
	at java.nio.file.Files.walkFileTree(Files.java:2742)
	at org.junit.platform.commons.util.ClasspathScanner.findClassesForPath(ClasspathScanner.java:141)
	at org.junit.platform.commons.util.ClasspathScanner.findClassesForUri(ClasspathScanner.java:125)
	at org.junit.platform.commons.util.ClasspathScanner.lambda$findClassesForUris$0(ClasspathScanner.java:114)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
	at org.junit.platform.commons.util.ClasspathScanner.findClassesForUris(ClasspathScanner.java:117)
	at org.junit.platform.commons.util.ClasspathScanner.scanForClassesInPackage(ClasspathScanner.java:93)
	at org.junit.platform.commons.util.ReflectionUtils.findAllClassesInPackage(ReflectionUtils.java:524)
	at org.junit.jupiter.engine.discovery.DiscoverySelectorResolver.lambda$resolveSelectors$1(DiscoverySelectorResolver.java:55)
	at java.util.ArrayList.forEach(ArrayList.java:1249)
	at org.junit.jupiter.engine.discovery.DiscoverySelectorResolver.resolveSelectors(DiscoverySelectorResolver.java:54)
	at org.junit.jupiter.engine.JupiterTestEngine.resolveDiscoveryRequest(JupiterTestEngine.java:68)
	at org.junit.jupiter.engine.JupiterTestEngine.discover(JupiterTestEngine.java:61)
	at org.junit.platform.launcher.core.DefaultLauncher.discoverRoot(DefaultLauncher.java:115)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:87)
	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:65)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

How to reproduce: run the tests in IDEA