lombok-intellij-plugin
lombok-intellij-plugin copied to clipboard
Delombok folder > silent fail, StackOverflowError in logs
Short description
In Intellij, when I right click on the project, and select delombok, the plugin does not make any changes or provide any notifications.

The folder contains a class that implements com.fasterxml.jackson.databind.JsonDeserializer
package com.example.demo.json;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
public class InstantDeserializer extends JsonDeserializer<Instant> {
@Override
public Instant deserialize(JsonParser parser, DeserializationContext context) {
return LocalDateTime.now().toInstant(ZoneOffset.ofHours(0));
}
}
In the IntelliJ log I can see there is a exception (stacktrace at the bottom)
Expected behavior
- If there is a problem, I would expect the Lombok plugin to report this (at present it fails silently).
- If 'delombok' is run on a folder that contains
InstantDeserializer, the plugin does not crash, - After executuion, I can see a summary notification (for example "0 files delomboked")
Version information
The problem exists on both 2020.3.3 and 2021.1
IntelliJ IDEA 2020.3.3 (Ultimate Edition)
Build #IU-203.7717.56, built on March 15, 2021
Runtime version: 11.0.10+8-b1145.96 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: ParNew, ConcurrentMarkSweep
Memory: 11933M
Cores: 8
Non-Bundled Plugins: Key Promoter X, com.ultrahob.zerolength.plugin, main.kotlin.com.jimschubert.intellij.swaggercodegen, net.sf.opk.avro-schema-support, mobi.hsz.idea.gitignore, com.crunch42.openapi, com.intellij.kubernetes, MadJenvPlugin, com.jetbrains.codeWithMe, MavenRunHelper, org.jetbrains.kotlin, com.suusan2go.kotlin-fill-class, Pythonid, com.koxudaxi.poetry, org.jetbrains.plugins.go, net.ashald.envfile
IntelliJ IDEA 2021.1 (Ultimate Edition)
Build #IU-211.6693.111, built on April 6, 2021
Runtime version: 11.0.10+9-b1341.35 x86_64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: ParNew, ConcurrentMarkSweep
Memory: 11933M
Cores: 8
Registry: ide.ui.tree.indent=1, ide.tree.yieldingUiUpdate=false
Non-Bundled Plugins: Key Promoter X (2021.1.1), com.ultrahob.zerolength.plugin (0.93), main.kotlin.com.jimschubert.intellij.swaggercodegen (4.3.1-p0), net.sf.opk.avro-schema-support (203.0.0), com.crunch42.openapi (1.11), com.intellij.kubernetes (211.6693.108), MadJenvPlugin (0.0.2), MavenRunHelper (4.11.203.000.2), org.jetbrains.kotlin (211-1.4.32-release-IJ6693.72), Pythonid (211.6693.115), com.koxudaxi.poetry (1.1.1), org.jetbrains.plugins.go (211.6693.111), net.ashald.envfile (3.2.1)
Kotlin: 211-1.4.32-release-IJ6693.72
- JDK Version: Project
AdoptOpenJDK 1.8.0_282-b08, IntellijAdoptOpenJDK 11.0.10+9 - OS Type & Version: (see IJ info above)
- Lombok Plugin Version: bundled 203.7717.56
- Lombok Dependency Version: 1.18.20
Steps to reproduce
- Create a class that extends
JsonDeserializer - right click on the folder that contains this class
- select 'delombok all'
Sample project
Please provide a sample project that exhibits the problem.
You should also include .idea folder so we can inspect the settings.
- [x] Sample project provided delombok.zip
- [x] I am able to reproduce this error on the sample project by following the steps described above
Additional information
Stacktrace
If you are experiencing an issue and IntelliJ throws an error please provide the stacktrace.
2021-04-07 18:46:37,660 [5424090] WARN - ystem.impl.ActionPopupMenuImpl - 2044ms to fill popup menu ProjectViewPopup
2021-04-07 18:47:14,028 [5460458] ERROR - tellij.openapi.util.ObjectTree - null
java.lang.StackOverflowError
at com.intellij.psi.stubs.StubBase.getChildrenStubs(StubBase.java:39)
at com.intellij.psi.stubs.StubBase.getChildrenByType(StubBase.java:94)
at com.intellij.psi.impl.compiled.ClsModifierListImpl.getAnnotations(ClsModifierListImpl.java:61)
at com.intellij.psi.impl.PsiImplUtil.findAnnotation(PsiImplUtil.java:287)
at com.intellij.psi.impl.compiled.ClsModifierListImpl.findAnnotation(ClsModifierListImpl.java:71)
at com.intellij.psi.PsiAnnotationOwner.hasAnnotation(PsiAnnotationOwner.java:44)
at com.intellij.psi.PsiJvmConversionHelper.hasListAnnotation(PsiJvmConversionHelper.java:58)
at com.intellij.psi.PsiModifierListOwner.hasAnnotation(PsiModifierListOwner.java:45)
at com.intellij.psi.PsiJvmModifiersOwner.hasAnnotation(PsiJvmModifiersOwner.java:32)
at de.plushnikov.intellij.plugin.util.PsiAnnotationSearchUtil.isAnnotatedWith(PsiAnnotationSearchUtil.java:28)
at de.plushnikov.intellij.plugin.processor.modifier.UtilityClassModifierProcessor.isModifierListSupported(UtilityClassModifierProcessor.java:23)
at de.plushnikov.intellij.plugin.processor.modifier.UtilityClassModifierProcessor.isSupported(UtilityClassModifierProcessor.java:39)
at de.plushnikov.intellij.plugin.action.delombok.DelombokHandler.lambda$rebuildModifierList$1(DelombokHandler.java:106)
at java.base/java.util.Arrays$ArrayList.forEach(Arrays.java:4390)
at de.plushnikov.intellij.plugin.action.delombok.DelombokHandler.rebuildModifierList(DelombokHandler.java:105)
at de.plushnikov.intellij.plugin.action.delombok.DelombokHandler.processModifierList(DelombokHandler.java:95)
at de.plushnikov.intellij.plugin.action.delombok.DelombokHandler.invoke(DelombokHandler.java:52)
at de.plushnikov.intellij.plugin.action.delombok.DelombokHandler.invoke(DelombokHandler.java:65)
<cut 1004 repetitions>
at de.plushnikov.intellij.plugin.action.delombok.DelombokHandler.invoke(DelombokHandler.java:65)
at de.plushnikov.intellij.plugin.action.delombok.DelombokHandler.invoke(DelombokHandler.java:65)
2021-04-07 18:47:14,034 [5460464] ERROR - tellij.openapi.util.ObjectTree - IntelliJ IDEA 2020.3.3 Build #IU-203.7717.56
2021-04-07 18:47:14,039 [5460469] ERROR - tellij.openapi.util.ObjectTree - JDK: 11.0.10; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2021-04-07 18:47:14,039 [5460469] ERROR - tellij.openapi.util.ObjectTree - OS: Mac OS X
2021-04-07 18:47:14,040 [5460470] ERROR - tellij.openapi.util.ObjectTree - Last Action: delombokAny
At first sight, seems to be fixed in the latest version of IntelliJ (2021.1)
Ah thanks, I didn't know there was a new version. I still have exactly the same issue unfortunately.
Even if the issue isn't fixed, I think the plugin should make the error more visible (at the moment it fails silently).
lombok version bundled 211.6693.111
Here's the IntelliJ log stack trace.
2021-04-08 12:34:34,378 [6962721] WARN - ctionSystem.impl.ActionUpdater - 1542ms to expand group child null
2021-04-08 12:34:34,502 [6962845] WARN - ctionSystem.impl.ActionUpdater - 1669ms to expand group child ProjectViewPopupMenuRunGroup
2021-04-08 12:34:34,842 [6963185] WARN - ystem.impl.ActionPopupMenuImpl - 2539ms to fill popup menu ProjectViewPopup
2021-04-08 12:34:39,472 [6967815] WARN - ctionSystem.impl.ActionUpdater - 3338ms to expand group child avroidl-idltoprotocol
2021-04-08 12:34:53,342 [6981685] ERROR - llij.ide.plugins.PluginManager - null
java.lang.StackOverflowError
at com.intellij.psi.stubs.StubBase.countChildren(StubBase.java:106)
at com.intellij.psi.stubs.StubBase.getChildrenByType(StubBase.java:95)
at com.intellij.psi.impl.compiled.ClsModifierListImpl.getAnnotations(ClsModifierListImpl.java:61)
at com.intellij.psi.impl.PsiImplUtil.findAnnotation(PsiImplUtil.java:288)
at com.intellij.psi.impl.compiled.ClsModifierListImpl.findAnnotation(ClsModifierListImpl.java:71)
at com.intellij.psi.PsiAnnotationOwner.hasAnnotation(PsiAnnotationOwner.java:44)
at com.intellij.psi.PsiJvmConversionHelper.hasListAnnotation(PsiJvmConversionHelper.java:58)
at com.intellij.psi.PsiModifierListOwner.hasAnnotation(PsiModifierListOwner.java:45)
at com.intellij.psi.PsiJvmModifiersOwner.hasAnnotation(PsiJvmModifiersOwner.java:32)
at de.plushnikov.intellij.plugin.util.PsiAnnotationSearchUtil.isAnnotatedWith(PsiAnnotationSearchUtil.java:28)
at de.plushnikov.intellij.plugin.processor.modifier.UtilityClassModifierProcessor.isModifierListSupported(UtilityClassModifierProcessor.java:34)
at de.plushnikov.intellij.plugin.processor.modifier.UtilityClassModifierProcessor.isSupported(UtilityClassModifierProcessor.java:39)
at de.plushnikov.intellij.plugin.action.delombok.DelombokHandler.lambda$rebuildModifierList$1(DelombokHandler.java:106)
at java.base/java.util.Arrays$ArrayList.forEach(Arrays.java:4390)
at de.plushnikov.intellij.plugin.action.delombok.DelombokHandler.rebuildModifierList(DelombokHandler.java:105)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at de.plushnikov.intellij.plugin.action.delombok.DelombokHandler.processModifierList(DelombokHandler.java:97)
at de.plushnikov.intellij.plugin.action.delombok.DelombokHandler.invoke(DelombokHandler.java:52)
at de.plushnikov.intellij.plugin.action.delombok.DelombokHandler.invoke(DelombokHandler.java:65)
<cut 1004 repetitions>
at de.plushnikov.intellij.plugin.action.delombok.DelombokHandler.invoke(DelombokHandler.java:65)
at de.plushnikov.intellij.plugin.action.delombok.DelombokHandler.invoke(DelombokHandler.java:65)
2021-04-08 12:34:53,347 [6981690] ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 2021.1 Build #IU-211.6693.111
2021-04-08 12:34:53,351 [6981694] ERROR - llij.ide.plugins.PluginManager - JDK: 11.0.10; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o.
2021-04-08 12:34:53,351 [6981694] ERROR - llij.ide.plugins.PluginManager - OS: Mac OS X
2021-04-08 12:34:53,352 [6981695] ERROR - llij.ide.plugins.PluginManager - Last Action: delombokAny
I've investigated a bit more and found the real cause - a class that extends JsonDeserializer. I've updated my original issue, along with an example project.