mbien commented on issue #8040:
URL: https://github.com/apache/netbeans/issues/8040#issuecomment-2541234988
```
Product Version = Apache NetBeans IDE 23
Operating System = Windows 11 version 10.0 running on amd64
Java; VM; Vendor = 23.0.1; Java HotSpot(TM) 64-Bit Server VM
23.0.1+11-39; Oracle Corporation
Runtime = Java(TM) SE Runtime Environment 23.0.1+11-39
...
java.lang.NullPointerException: Cannot invoke "String.matches(String)"
because the return value of "java.io.File.toString()" is null
at
org.netbeans.modules.project.ui.ProjectChooserAccessory$ProjectFileView.getIcon(ProjectChooserAccessory.java:578)
at java.desktop/javax.swing.JFileChooser.getIcon(JFileChooser.java:1607)
at
org.netbeans.swing.dirchooser.DirectoryChooserUI$DirectoryComboBoxRenderer.getListCellRendererComponent(DirectoryChooserUI.java:1843)
at
java.desktop/javax.swing.plaf.basic.BasicComboBoxUI.getDisplaySize(BasicComboBoxUI.java:1446)
at
com.formdev.flatlaf.ui.FlatComboBoxUI.getDisplaySize(FlatComboBoxUI.java:712)
```
Interesting. I don't see how `File#toString` could return null, the way File
is constructed it would fail much earlier if the path would resolve to null.
https://github.com/openjdk/jdk/blob/367c3041272d43b0474b433c555f22a3e15579f6/src/java.base/share/classes/java/io/File.java#L2004-L2006
https://github.com/openjdk/jdk/blob/367c3041272d43b0474b433c555f22a3e15579f6/src/java.base/share/classes/java/io/File.java#L520-L522
--
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