PMD APEX metric is crashing

Issue #810 resolved
Andreas Epping created an issue

I installed IlluminatedCloud 2.0 on top of IntelliJIdea 2017.3.1 Community Edition. They are running on Mac OS HighSierra 10.13.2 and JAVA JRE1.8.0_152. I configured PMD like described in this post: https://groups.google.com/a/illuminatedcloud.com/forum/#!msg/announcements/Q4dYt-YMx6U/1IHZqtyMCAAJ

I configured the inspection running on a default level and project level. However, when I start code inspection, I will get the following error.

Error running PMD Exception in thread "main" java.lang.IncompatibleClassChangeError: Inconsistent constant pool data in classfile for class apex/jorje/semantic/symbol/member/method/MethodTable. Method lambda$static$64(Lapex/jorje/semantic/symbol/member/method/MethodInfo;)Z at index 85 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef at apex.jorje.semantic.symbol.member.method.MethodTable. (MethodTable.java:38) at apex.jorje.semantic.symbol.type.ModifierTypeInfo$Builder.build(ModifierTypeInfo.java:119) at apex.jorje.semantic.symbol.type.ModifierTypeInfos. (ModifierTypeInfos.java:54) at apex.jorje.semantic.ast.modifier.ModifierGroups. (ModifierGroups.java:27) at apex.jorje.semantic.symbol.type.TypeInfos. (TypeInfos.java:40) at apex.jorje.semantic.symbol.member.variable.TriggerVariableMap. (TriggerVariableMap.java:46) at apex.jorje.semantic.symbol.resolver.StandardSymbolResolver. (StandardSymbolResolver.java:80) at apex.jorje.semantic.compiler.CompilerContext. (CompilerContext.java:49) at apex.jorje.semantic.compiler.ApexCompiler. (ApexCompiler.java:57) at apex.jorje.semantic.compiler.ApexCompiler. (ApexCompiler.java:37) at apex.jorje.semantic.compiler.ApexCompiler$Builder.build(ApexCompiler.java:210) at net.sourceforge.pmd.lang.apex.ast.CompilerService.compile(CompilerService.java:95) at net.sourceforge.pmd.lang.apex.ast.CompilerService.visitAstsFromStrings(CompilerService.java:90) at net.sourceforge.pmd.lang.apex.ast.CompilerService.visitAstFromString(CompilerService.java:78) at net.sourceforge.pmd.lang.apex.ast.ApexParser.parseApex(ApexParser.java:42) at net.sourceforge.pmd.lang.apex.ast.ApexParser.parse(ApexParser.java:51) at net.sourceforge.pmd.lang.apex.ApexParser.parse(ApexParser.java:37) at net.sourceforge.pmd.SourceCodeProcessor.parse(SourceCodeProcessor.java:113) at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:175) at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:97) at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:52) at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:88) at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:27) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.base/java.lang.Thread.run(Thread.java:844)

Comments (2)

  1. Scott Wells repo owner

    Andreas, based on the stack, you'll need to log this one with the PMD Apex folks (I can connect you with the lead if you'd like). PMD Apex is executed out-of-process by IC and the stack you've provided is coming from the PMD process' JVM. IC never loads the jorje Apex parser directly.

    I'm resolving this on the IC side but am happy to open the line of communication with the PMD Apex folks if you'd like. Just let me know.

  2. Andreas Epping reporter

    Hi Scott, thank you very much for your investigation. I already expected that this would not be an issue of IC or IntelliJ. And I would be really happy, if you could get mit into communication with the PMD Apex folks. Thanks

  3. Log in to comment