This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[ BUILD # : 200609050000 ] [ JDK VERSION : 1.6 ] Error occured, exception thrown. UseCase Diagram is named "Sales: salesmann view". Relevant portion for session log is attached.
Created attachment 33655 [details] exception occured on save
Worse, diagram is lost.
Please add a "how to reproduce" comment.
This is caused by the illegal diagram name, it cannot contain certain characters e.g colon, as used in this case. Diagram creation wizard should implement name validation logic to prevent such errors.
Repro steps: - create a uml project - create use case diagram and name it "Sales: salesmann view" Result: the diagram name is renamed by the tool to "Sales_salesmann view" on both the project tree and the diagram window tab - create a couple of use cases and links on the diagram Result: the diagram is dirty as indicated with "*" on the diagram window tab but the save option is not enabled for saving the diagram. Ctrl-S also does nothing at all. - close the diagram Result: the save diagram dialog pops up - select Yes from the dialog to save the diagram Result: the diagram is closed and the the diagram on the project tree under the Model node is now displayed without diagram name, only usecase diagram icon is now being displayed but can't be opened. Looking at the ide log, exception "java.lang.IllegalArgumentException: null [file:..." like the ones in the attachement exist. Restarting ide shows no more trace of this usecase diagram on the project tree. This problem is not specific to jdk 1.6 since it also exists using jdk 1.5, I removed the keyword JDK1.6.
I encountered a related symptom by naming a diagram "Client/Server Overview". NetBeans did reasonable things to transform the name, but on reopening the project, this diagram was not found. I investigated and, since this was Linux, discovered that there was a "Client" subdirectory under my project that contained my "Server Overview" diagram. Moving the two files into their parent directory and renaming seems to have recovered things OK.
Error message is now displayed at the bottom of the wizard to inform users of invalid characters that must not be included in a diagram name. Until the users correct the error, the Finish button remains disabled.
verified in all-nbms-griffin-070130_5 uml uses several different approaches to prevent incorrect names. sometimes the are different for the same element named from e.g. tree, properties and diagram. This issue suggest for ':', '|', '\' etc characters different way then used for e.g. '@'. But current problem is solved. Related issues will be filed separately...
issues filed as a result of this fix: issue 93780 - diagram creation wizard uses different ways to handle incorrect symbols issue 93782 - incorrect symbols are handled differently during diagram creation and later