mbien commented on code in PR #8197:
URL: https://github.com/apache/netbeans/pull/8197#discussion_r1935034677
##########
java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/DeleteFile.java:
##########
@@ -75,11 +75,10 @@ public String getDisplayText() {
public void performChange() {
try {
FileObject fo = URLMapper.findFileObject(res);
- if (fo == null) {
- throw new IOException(res.toString());
+ if (fo != null) {
+ id = BackupFacility.getDefault().backup(fo);
+ DataObject.find(fo).delete();
}
- id = BackupFacility.getDefault().backup(fo);
- DataObject.find(fo).delete();
} catch (DataObjectNotFoundException ex) {
Review Comment:
wondering why this change was necessary, this particular refactoring
shouldn't delete anything, no?
--
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