-
Notifications
You must be signed in to change notification settings - Fork 898
Description
Apache NetBeans version
Apache NetBeans 25
What happened
When copying a file from one package to another and renaming it in the same operation, a java.lang.IllegalArgumentException occurs.
The copied file appears in the target package but retains its original name.
Attempts to rename the copied file do not affect the new file but instead rename the original file it was copied from.
Language / Project Type / NetBeans Component
Java Ant Project
How to reproduce
Environment:
The project folder is accessed via a network drive mapped to a folder link.
Example Paths to Clarify Structure:
-
Projects Folder 1/Project A/ — Original project folder path
-
Projects Folder 2/Project A/ — Folder link pointing to Project A in Projects Folder 1
-
V:/Project A/ — Network drive V: mapped to Projects Folder 2
To reproduce:
- Create a test.java file in a package.
- Perform a Refactor Copy into another package, changing the name to test2.java.
- Exception will be thrown.
- A test.java file will appear in the target packet.
- (Optional) Attempt to rename again to test2.java. Rename will be applied to original test.java file in original package.
Did this work correctly in an earlier version?
No / Don't know
Operating System
Edition Windows 11 Home Version 24H2 Installed on 4/22/2025 OS build 26100.3775 Experience Windows Feature Experience Pack 1000.26100.66.0
JDK
jdk-14.0.2
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
Every time.
Are you willing to submit a pull request?
No