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.
> >When entering the initial value in to the initial value in the option box of a >filed in a calss genrated from DB schema the system does not check for the >reguired data type data type. And the compilation of the java calss will fail. >It will enter the plain thext of the text box in to the code resulting in any >combination of errors. The value must be of a correct java data type ie. text >must be entered as "text" so the class will compile. Here are some examples. > >entering a string into a numeric field : > >InitialValueTest/EmployeeM.java [16:1] Initializer syntax error, perhaps a >missing ';' or ',' > private double salary = 1asdas; > ^ >1 error > > >entering a string to a a string field : > >InitialValueTest/EmployeeM.java [10:1] Undefined variable, class, or package >name: qw > private String firstName = qw; > ^ >InitialValueTest/EmployeeM.java [10:1] Cannot parse initializer > private String firstName = qw; > ^ >2 errors
Checking the syntax and/or semantic constraints in the property text is not feasible. In fact, if I write code to check those constraints, I would write a whole incremental compiler (the back-end is quite easy). To give an example type-like property editor does not accept invalid strings, but does not check for availability and visibility of the entered reference type. Field's initial value is a *free text string*.
Resolved for 3.3.x or earlier, no new info since then -> closing.
Resolved for 3.4.x or earlier, no new info since then -> closing.
Reorganization of java component