[ https://issues.apache.org/jira/browse/NETBEANS-4075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Asbach updated NETBEANS-4075: -------------------------------------- Description: I recognized some strange behaviour when using latest Lombok release with NetBeans 11.3. When using @Builder and @Builder.Default {code:java} package it.impl.lombok.netbeans.poc; import lombok.Builder; import lombok.Getter; @Getter @Builder public class Configuration { @Builder.Default private long config1 = 500L; } {code} 1) A NullPointerException occurs {code:java} java.lang.NullPointerException at com.sun.tools.javac.comp.Check$Validator.visitTypeIdent(Check.java:1451) at com.sun.tools.javac.tree.JCTree$JCPrimitiveTypeTree.accept(JCTree.java:2434) at com.sun.tools.javac.comp.Check$Validator.validateTree(Check.java:1470) at com.sun.tools.javac.comp.Check.validate(Check.java:1341) at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java:1217) at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:972) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:674) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:754) at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:5099) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4982) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4910) at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4855) at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1439) at com.sun.tools.javac.api.JavacTaskImpl$1.process(JavacTaskImpl.java:504) at com.sun.tools.javac.api.JavacTaskImpl$Filter.run(JavacTaskImpl.java:651) at com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:507) [catch] at org.netbeans.modules.java.source.nbjavac.indexing.MultiPassCompileWorker.compile(MultiPassCompileWorker.java:261) at org.netbeans.modules.java.source.indexing.JavaCustomIndexer.index(JavaCustomIndexer.java:361) at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor$2.run(Indexable.java:138) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runIndexer(RepositoryUpdater.java:275) at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor.index(Indexable.java:136) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doIndex(RepositoryUpdater.java:2750) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.access$800(RepositoryUpdater.java:2154) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$1.run(RepositoryUpdater.java:2636) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$1.run(RepositoryUpdater.java:2634) at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.refreshTransaction(TaskCache.java:540) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.index(RepositoryUpdater.java:2634) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$3.call(RepositoryUpdater.java:3300) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$3.call(RepositoryUpdater.java:3255) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$4.run(RepositoryUpdater.java:2127) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2123) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2104) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.access$1500(RepositoryUpdater.java:136) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.scanFiles(RepositoryUpdater.java:3255) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$FileListWork.getDone(RepositoryUpdater.java:3785) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3420) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:6183) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$4300(RepositoryUpdater.java:5834) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2$1.run(RepositoryUpdater.java:6099) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279) at org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:83) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6095) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6091) at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153) at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335) at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118) at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:6091) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) {code} 2) The class seems to be unresolvable !screenshot-1.png! When commenting the @Builder.Default annotation out. The problem seems to be solved. In addition it seems that the entire package cannot be used for auto completion and/or auto import. Compile and build via maven is working like expected. An example maven project is attached. was: I recognized some strange behaviour when using latest Lombok release with NetBeans 11.3. When using @Builder and @Builder.Default {code:java} package it.impl.lombok.netbeans.poc; import lombok.Builder; import lombok.Getter; @Getter @Builder public class Configuration { @Builder.Default private long config1 = 500L; } {code} 1) A NullPointerException occurs {code:java} java.lang.NullPointerException at com.sun.tools.javac.comp.Check$Validator.visitTypeIdent(Check.java:1451) at com.sun.tools.javac.tree.JCTree$JCPrimitiveTypeTree.accept(JCTree.java:2434) at com.sun.tools.javac.comp.Check$Validator.validateTree(Check.java:1470) at com.sun.tools.javac.comp.Check.validate(Check.java:1341) at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java:1217) at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:972) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:674) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:754) at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:5099) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4982) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4910) at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4855) at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1439) at com.sun.tools.javac.api.JavacTaskImpl$1.process(JavacTaskImpl.java:504) at com.sun.tools.javac.api.JavacTaskImpl$Filter.run(JavacTaskImpl.java:651) at com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:507) [catch] at org.netbeans.modules.java.source.nbjavac.indexing.MultiPassCompileWorker.compile(MultiPassCompileWorker.java:261) at org.netbeans.modules.java.source.indexing.JavaCustomIndexer.index(JavaCustomIndexer.java:361) at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor$2.run(Indexable.java:138) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runIndexer(RepositoryUpdater.java:275) at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor.index(Indexable.java:136) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doIndex(RepositoryUpdater.java:2750) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.access$800(RepositoryUpdater.java:2154) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$1.run(RepositoryUpdater.java:2636) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$1.run(RepositoryUpdater.java:2634) at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.refreshTransaction(TaskCache.java:540) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.index(RepositoryUpdater.java:2634) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$3.call(RepositoryUpdater.java:3300) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$3.call(RepositoryUpdater.java:3255) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$4.run(RepositoryUpdater.java:2127) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2123) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2104) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.access$1500(RepositoryUpdater.java:136) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.scanFiles(RepositoryUpdater.java:3255) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$FileListWork.getDone(RepositoryUpdater.java:3785) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3420) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:6183) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$4300(RepositoryUpdater.java:5834) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2$1.run(RepositoryUpdater.java:6099) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279) at org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:83) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6095) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6091) at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153) at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335) at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118) at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:6091) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) {code} 2) The class seems to be unresolvable !screenshot-1.png! In addition it seems that the entire package cannot be used for auto completion and/or auto import. Compile and build via maven is working like expected. An example maven project is attached. > NullPointerException when using Lombok @Builder.Default > ------------------------------------------------------- > > Key: NETBEANS-4075 > URL: https://issues.apache.org/jira/browse/NETBEANS-4075 > Project: NetBeans > Issue Type: Improvement > Components: java - Compiler > Affects Versions: 11.3 > Environment: Windows 10, AdoptOpenJDK 11 OpenJ9 > Reporter: Benjamin Asbach > Priority: Major > Attachments: ide.log, lombok-netbeans-poc.zip, screenshot-1.png, > ui.log > > > I recognized some strange behaviour when using latest Lombok release with > NetBeans 11.3. > When using @Builder and @Builder.Default > {code:java} > package it.impl.lombok.netbeans.poc; > import lombok.Builder; > import lombok.Getter; > @Getter > @Builder > public class Configuration { > @Builder.Default > private long config1 = 500L; > } > {code} > 1) A NullPointerException occurs > {code:java} > java.lang.NullPointerException > at com.sun.tools.javac.comp.Check$Validator.visitTypeIdent(Check.java:1451) > at > com.sun.tools.javac.tree.JCTree$JCPrimitiveTypeTree.accept(JCTree.java:2434) > at com.sun.tools.javac.comp.Check$Validator.validateTree(Check.java:1470) > at com.sun.tools.javac.comp.Check.validate(Check.java:1341) > at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java:1217) > at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:972) > at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:674) > at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:754) > at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:5099) > at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4982) > at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4910) > at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4855) > at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1439) > at com.sun.tools.javac.api.JavacTaskImpl$1.process(JavacTaskImpl.java:504) > at com.sun.tools.javac.api.JavacTaskImpl$Filter.run(JavacTaskImpl.java:651) > at com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:507) > [catch] at > org.netbeans.modules.java.source.nbjavac.indexing.MultiPassCompileWorker.compile(MultiPassCompileWorker.java:261) > at > org.netbeans.modules.java.source.indexing.JavaCustomIndexer.index(JavaCustomIndexer.java:361) > at > org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor$2.run(Indexable.java:138) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runIndexer(RepositoryUpdater.java:275) > at > org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor.index(Indexable.java:136) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doIndex(RepositoryUpdater.java:2750) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.access$800(RepositoryUpdater.java:2154) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$1.run(RepositoryUpdater.java:2636) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$1.run(RepositoryUpdater.java:2634) > at > org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.refreshTransaction(TaskCache.java:540) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.index(RepositoryUpdater.java:2634) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$3.call(RepositoryUpdater.java:3300) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$3.call(RepositoryUpdater.java:3255) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$4.run(RepositoryUpdater.java:2127) > at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2123) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2104) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.access$1500(RepositoryUpdater.java:136) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.scanFiles(RepositoryUpdater.java:3255) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$FileListWork.getDone(RepositoryUpdater.java:3785) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3420) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:6183) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$4300(RepositoryUpdater.java:5834) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2$1.run(RepositoryUpdater.java:6099) > at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279) > at > org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:83) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6095) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6091) > at > org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153) > at > org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335) > at > org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118) > at > org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67) > at > org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:6091) > at > java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) > at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) > at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) > at > org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) > at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) > at > org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) > {code} > 2) The class seems to be unresolvable > !screenshot-1.png! > When commenting the @Builder.Default annotation out. The problem seems to be > solved. > In addition it seems that the entire package cannot be used for auto > completion and/or auto import. > Compile and build via maven is working like expected. > An example maven project is attached. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists