sdedic opened a new pull request, #5124:
URL: https://github.com/apache/netbeans/pull/5124

   The bug that provoked the investigation was
   ```
   java.lang.NullPointerException
       at java.base/java.util.ArrayList.(ArrayList.java:179)
       at 
org.netbeans.modules.gradle.tooling.NbProjectInfoBuilder.detectSources(NbProjectInfoBuilder.java:1012)
       at 
org.netbeans.modules.gradle.tooling.NbProjectInfoBuilder.lambda$runAndRegisterPerf$9(NbProjectInfoBuilder.java:408)
       at 
org.netbeans.modules.gradle.tooling.NbProjectInfoBuilder.runAndRegisterPerf(NbProjectInfoBuilder.java:414)
       at 
org.netbeans.modules.gradle.tooling.NbProjectInfoBuilder.runAndRegisterPerf(NbProjectInfoBuilder.java:408)
       at 
org.netbeans.modules.gradle.tooling.NbProjectInfoBuilder.buildAll(NbProjectInfoBuilder.java:211)
       at 
org.netbeans.modules.gradle.tooling.NetBeansToolingPlugin$NetBeansToolingModelBuilder.buildAll(NetBeansToolingPlugin.java:71)
   ```
   that was thrown when the project contained `kotlin` sources. The bug was 
introduced by a change in `getProperty` that stopped throwing exceptions on an 
unknown property, and started to return `null` instead. The PR just adapts the 
`detectSource` code to the new error reporting style.
   
   During testing, I've noticed some other bad behaviour I have not seen before 
on certain projects:
   - the task Map is not cloned on return by Gradle (it seems), so I've got a 
ConcurrentModificationException - apparently some of the looped-over calls 
lazy-populated the collection
   - `null` default property value was not handled well (changed to 
`Optional.ofNullable`).


-- 
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