[BLUEJ-1273] When moving a class into a package, it is copied but the original is not deleted
A user reports a bug with the following steps to recreate:
- a package is created(example)
- a class MyClass is created
- the class MyClass is included in the package example (package example;)
- when push compile button Bluej asks for move the class to the package
- the class is moved but BlueJ maintains another class MyClass outside the package
- the project has two MyClass classes now
I suspect what is happening is that when the class is moved, the auto-compile mechanism may be saving the old class one more time to the old location, so even if the file itself was moved into the package, the file is then accidentally recreated by the editor saving to the old location. This seems likely as the bug is inconsistent -- sometimes it occurs and sometimes it doesn't, suggesting a race hazard.
Issue metadata
- Issue type: Bug
- Priority: Medium
- Fix versions: 4.2.2