mbien commented on code in PR #9217:
URL: https://github.com/apache/netbeans/pull/9217#discussion_r2839092063
##########
contrib/websvc.wsitconf/src/org/netbeans/modules/websvc/wsitconf/ui/service/subpanels/KeystorePanel.java:
##########
@@ -375,7 +375,7 @@ private void
loadkeysButtonActionPerformed(java.awt.event.ActionEvent evt) {//GE
private void
keystoreLocationButtonActionPerformed(java.awt.event.ActionEvent evt)
{//GEN-FIRST:event_keystoreLocationButtonActionPerformed
JFileChooser chooser = new JFileChooser();
- FileUtil.preventFileChooserSymlinkTraversal(chooser, null);
+ chooser.setCurrentDirectory(null);
Review Comment:
will do. Those can be further simplified to:
```java
if (f.exists()) {
chooser.setCurrentDirectory(f);
} else {
chooser.setCurrentDirectory(null);
}
```
since
[`setCurrentDirectory()`](https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/JFileChooser.html#setCurrentDirectory(java.io.File))
automatically picks parents if the file is not a directory.
--
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