errael opened a new issue, #4651:
URL: https://github.com/apache/netbeans/issues/4651

   ### Apache NetBeans version
   
   Apache NetBeans 15
   
   ### What happened
   
   No hint highlights after exception in hints processing
   
   ### How to reproduce
   
   (These steps reproduce 100% for me. I can provide the project and tainted 
userdir if that would be useful)
   
   I narrowed down the issue with these steps. Once there's a userdir that has 
the problem, just start NB and get the exception
   - staring with clean .nb/15 (some -J-D added to netbeans.conf)
   - start nb, no imports
   - open project, java file; note visible hints highlights
     (not all projects exhibit the problem)
   - import from "tainted userdir", restart
       categories: general, miscellaneous (need both)
   - OBSERVE: no hints, exception (see below)
   
   In Java Platform Manager there are several entries, the entry `Zulu 
18.0.2.1+1`
   is shown in red. Select it and the following for PlatformInstallFolder:
   ```
   
/junk/Downloads/zulu18.32.13-ca-jdk18.0.2.1-linux_x64/zulu18.32.13-ca-jdk18.0.2.1-linux_x64
   ```
   is displayed in red, and there's the message `Error: the specified folder 
does not contain a java platform`
   Restart NB and the problem persists.
   Remove this bad entry, and the hints show up again.
   
   NOTE: the project does not reference this JDK.
   
   I wonder if Platform is providing garbage to HintProcessing, or if 
HintProcessing is not handling a valid return from Platform.
   
   I can see how importing miscellaneous is required, I wonder what's in 
General that's needed to trigger it.
   
   FYI: While doing some cleanup I moved the referenced directory to where all 
the jdk's on this system reside, and forgot about it. Several days later, after 
changing and moving around lots of stuff locally, I noticed there was a hints 
problem.
   
   ```
   SEVERE [org.openide.util.Exceptions]
   java.lang.NullPointerException
        at 
com.sun.tools.javac.code.Types$ImplementationCache.implementationInternal(Types.java:2983)
        at 
com.sun.tools.javac.code.Types$ImplementationCache.get(Types.java:2969)
        at com.sun.tools.javac.code.Types.implementation(Types.java:3004)
        at 
com.sun.tools.javac.comp.Check.checkClassOverrideEqualsAndHash(Check.java:2199)
        at 
com.sun.tools.javac.comp.Check.checkClassOverrideEqualsAndHashIfNeeded(Check.java:2189)
        at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:5389)
        at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:5210)
        at com.sun.tools.javac.comp.Attr.attrib(Attr.java:5155)
        at 
com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1317)
        at 
org.netbeans.modules.java.hints.spiimpl.Utilities.constructScope(Utilities.java:775)
        at 
org.netbeans.modules.java.hints.declarative.Hacks.constructScope(Hacks.java:73)
        at 
org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.lambda$resolve$0(DeclarativeHintsParser.java:494)
        at 
org.netbeans.modules.java.source.parsing.MimeTask.run(MimeTask.java:60)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
        at 
org.netbeans.modules.parsing.api.ParserManager$MimeTaskAction.run(ParserManager.java:364)
        at 
org.netbeans.modules.parsing.api.ParserManager$MimeTaskAction.run(ParserManager.java:347)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
        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.TaskProcessor.runUserTask(TaskProcessor.java:178)
        at 
org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:318)
        at 
org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:433)
        at 
org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:425)
        at 
org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.resolve(DeclarativeHintsParser.java:473)
        at 
org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.access$000(DeclarativeHintsParser.java:80)
        at 
org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseCondition(DeclarativeHintsParser.java:307)
        at 
org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseConditions(DeclarativeHintsParser.java:254)
        at 
org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseRule(DeclarativeHintsParser.java:211)
        at 
org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseInput(DeclarativeHintsParser.java:180)
        at 
org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.access$200(DeclarativeHintsParser.java:87)
        at 
org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.parse(DeclarativeHintsParser.java:391)
        at 
org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.parseHints(DeclarativeHintRegistry.java:255)
        at 
org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.parseHintFile(DeclarativeHintRegistry.java:233)
        at 
org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.readHints(DeclarativeHintRegistry.java:122)
        at 
org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.computeHints(DeclarativeHintRegistry.java:105)
        at 
org.netbeans.modules.java.hints.spiimpl.RulesManagerImpl.readHints(RulesManagerImpl.java:139)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:132)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:127)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:113)
        at 
org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:63)
   [catch] at 
org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:273)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786)
        at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
        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)
   SEVERE [null]: Last record repeated again.
   ```
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Linux harmony 5.19.0-76051900-generic #202207312230~1660780566~22.04~9d60db1
   
   ### JDK
   
   OpenJDK Runtime Environment 18.9 (build 11.0.2+9) OpenJDK 64-Bit Server VM 
18.9 (build 11.0.2+9, mixed mode)
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to