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.

Bug 111415 - UNIX: default folder location is missing the leading slash "/" causing code generation error and IllegalArgumentException
Summary: UNIX: default folder location is missing the leading slash "/" causing code g...
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Code Generation (show other bugs)
Version: 6.x
Hardware: All Linux
: P2 blocker (vote)
Assignee: Viktor Lapitski
URL:
Keywords:
: 111418 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-31 00:13 UTC by Peter Lam
Modified: 2007-08-08 00:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lam 2007-07-31 00:13:55 UTC
This issue occurs on unix (both solaris and linux) platforms only.

Repro steps:
- create a java-platform model project
- create a class diagram
- create and name a class on the diagram
- generate code for the class
From the Generate Code dialog, notice that the leading "/" from the "Folder Location" field is missing which caused the
following output after clicking on Ok button from the Generate Code dialog:

Begin processing Generate Code: 1 items

Code Generation selected options:
  Source Folder Location -  home1/jse/hydra/projects/UMLProject6Sources/src
  Backup Sources - true
  Generate Markers - false

Processing element 1 of 1: Class c1 ... 
Error While Processing Element Parameter file was not normalized. Was home1/jse/hydra/projects/UMLProject6Sources/src
instead of /home1/jse/hydra/netbeans-b2140/home1/jse/hydra/projects/UMLProject6Sources/src

================================
Task Failed (total time: 0 seconds)


The command line also has the following exception:

java.lang.IllegalArgumentException: Parameter file was not normalized. Was
home1/jse/hydra/projects/UMLProject6Sources/src instead of
/home1/jse/hydra/netbeans-b2140/home1/jse/hydra/projects/UMLProject6Sources/src
        at org.openide.filesystems.FileUtil.toFileObject(FileUtil.java:513)
        at org.netbeans.modules.uml.integration.ide.events.ClassInfo.getExportPackageFileObject(ClassInfo.java:2325)
        at org.netbeans.modules.uml.codegen.java.JavaCodegen.generate(JavaCodegen.java:209)
        at org.netbeans.modules.uml.codegen.action.GenerateCodeTask.exportCode(GenerateCodeTask.java:114)
        at org.netbeans.modules.uml.codegen.action.GenerateCodeTask.begin(GenerateCodeTask.java:89)
        at org.netbeans.modules.uml.util.AbstractNBTask.beginTask(AbstractNBTask.java:489)
        at org.netbeans.modules.uml.util.AbstractNBTask.run(AbstractNBTask.java:97)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539)        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964)
Comment 1 Viktor Lapitski 2007-07-31 20:32:58 UTC
fixed.
Comment 2 Viktor Lapitski 2007-07-31 20:33:08 UTC
*** Issue 111418 has been marked as a duplicate of this issue. ***
Comment 3 Peter Lam 2007-08-08 00:02:34 UTC
verified in build 20070807.