[jira] [Updated] (NETBEANS-4384) Assertion error ("Invalid pool entry") in javac when accessing inaccessible field in enclosing class
[ https://issues.apache.org/jira/browse/NETBEANS-4384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eirik Bakke updated NETBEANS-4384: -- Affects Version/s: 11.3 > Assertion error ("Invalid pool entry") in javac when accessing inaccessible > field in enclosing class > > > Key: NETBEANS-4384 > URL: https://issues.apache.org/jira/browse/NETBEANS-4384 > Project: NetBeans > Issue Type: Bug > Components: java - Compiler >Affects Versions: 11.3 > Environment: NetBeans 11.3 on Java 13 (or Java 14) with nbjavac > plugin installed >Reporter: Eirik Bakke >Priority: Major > Labels: nbjavac > > The following example, where a field in an enclosing class is referenced from > a method in an inner static class (e.g. during editing, before the user has > removed the "static" keyword) causes an assertion error in javac: > {code:java} > public class TestClass { > Object someField; > > private static class Foo { > public void someMethod() { > System.out.println(someField); > } > } > } > {code} > The error, which pops up consistently every time, is as follows: > {noformat} > java.lang.AssertionError: Invalid pool entry > at com.sun.tools.javac.code.Type.poolTag(Type.java:134) > at > com.sun.tools.javac.jvm.PoolWriter$WriteablePoolHelper.writeConstant(PoolWriter.java:362) > at > com.sun.tools.javac.jvm.PoolWriter$WriteablePoolHelper.writeIfNeeded(PoolWriter.java:353) > at > com.sun.tools.javac.jvm.PoolWriter$WriteablePoolHelper.access$000(PoolWriter.java:331) > at com.sun.tools.javac.jvm.PoolWriter.putMember(PoolWriter.java:125) > at com.sun.tools.javac.jvm.Code.emitop2(Code.java:1004) > at com.sun.tools.javac.jvm.Items$MemberItem.load(Items.java:518) > at com.sun.tools.javac.jvm.Gen.genArgs(Gen.java:889) > at com.sun.tools.javac.jvm.Gen.visitApply(Gen.java:1855) > at > com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1743) > at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:864) > at com.sun.tools.javac.jvm.Gen.visitExec(Gen.java:1723) > at > com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1529) > at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:601) > at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:636) > at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:622) > at com.sun.tools.javac.jvm.Gen.genStats(Gen.java:673) > at com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:1084) > at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1036) > at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:601) > at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:636) > at com.sun.tools.javac.jvm.Gen.genMethod(Gen.java:954) > at com.sun.tools.javac.jvm.Gen.visitMethodDef(Gen.java:917) > at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:882) > at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:601) > at com.sun.tools.javac.jvm.Gen.genClass(Gen.java:2398) > at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:786) > at > com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1749) > at > com.sun.tools.javac.api.JavacTaskImpl$2.process(JavacTaskImpl.java:574) > at > com.sun.tools.javac.api.JavacTaskImpl$Filter.run(JavacTaskImpl.java:651) > at > com.sun.tools.javac.api.JavacTaskImpl.generate(JavacTaskImpl.java:577) > [catch] at > org.netbeans.modules.java.source.nbjavac.indexing.MultiPassCompileWorker.compile(MultiPassCompileWorker.java:303) > 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.pars
[jira] [Updated] (NETBEANS-4384) Assertion error ("Invalid pool entry") in javac when accessing inaccessible field in enclosing class
[ https://issues.apache.org/jira/browse/NETBEANS-4384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eirik Bakke updated NETBEANS-4384: -- Environment: NetBeans 11.3 on Java 13 (or Java 14) with nbjavac plugin installed (was: NetBeans 11.3 on Java 13 with nbjavac plugin installed) > Assertion error ("Invalid pool entry") in javac when accessing inaccessible > field in enclosing class > > > Key: NETBEANS-4384 > URL: https://issues.apache.org/jira/browse/NETBEANS-4384 > Project: NetBeans > Issue Type: Bug > Components: java - Compiler > Environment: NetBeans 11.3 on Java 13 (or Java 14) with nbjavac > plugin installed >Reporter: Eirik Bakke >Priority: Major > Labels: nbjavac > > The following example, where a field in an enclosing class is referenced from > a method in an inner static class (e.g. during editing, before the user has > removed the "static" keyword) causes an assertion error in javac: > {code:java} > public class TestClass { > Object someField; > > private static class Foo { > public void someMethod() { > System.out.println(someField); > } > } > } > {code} > The error, which pops up consistently every time, is as follows: > {noformat} > java.lang.AssertionError: Invalid pool entry > at com.sun.tools.javac.code.Type.poolTag(Type.java:134) > at > com.sun.tools.javac.jvm.PoolWriter$WriteablePoolHelper.writeConstant(PoolWriter.java:362) > at > com.sun.tools.javac.jvm.PoolWriter$WriteablePoolHelper.writeIfNeeded(PoolWriter.java:353) > at > com.sun.tools.javac.jvm.PoolWriter$WriteablePoolHelper.access$000(PoolWriter.java:331) > at com.sun.tools.javac.jvm.PoolWriter.putMember(PoolWriter.java:125) > at com.sun.tools.javac.jvm.Code.emitop2(Code.java:1004) > at com.sun.tools.javac.jvm.Items$MemberItem.load(Items.java:518) > at com.sun.tools.javac.jvm.Gen.genArgs(Gen.java:889) > at com.sun.tools.javac.jvm.Gen.visitApply(Gen.java:1855) > at > com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1743) > at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:864) > at com.sun.tools.javac.jvm.Gen.visitExec(Gen.java:1723) > at > com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1529) > at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:601) > at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:636) > at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:622) > at com.sun.tools.javac.jvm.Gen.genStats(Gen.java:673) > at com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:1084) > at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1036) > at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:601) > at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:636) > at com.sun.tools.javac.jvm.Gen.genMethod(Gen.java:954) > at com.sun.tools.javac.jvm.Gen.visitMethodDef(Gen.java:917) > at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:882) > at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:601) > at com.sun.tools.javac.jvm.Gen.genClass(Gen.java:2398) > at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:786) > at > com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1749) > at > com.sun.tools.javac.api.JavacTaskImpl$2.process(JavacTaskImpl.java:574) > at > com.sun.tools.javac.api.JavacTaskImpl$Filter.run(JavacTaskImpl.java:651) > at > com.sun.tools.javac.api.JavacTaskImpl.generate(JavacTaskImpl.java:577) > [catch] at > org.netbeans.modules.java.source.nbjavac.indexing.MultiPassCompileWorker.compile(MultiPassCompileWorker.java:303) > 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.Repo