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 8250 - "initial value" type not checked against the filed type
Summary: "initial value" type not checked against the filed type
Status: CLOSED INVALID
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: -FFJ-
Hardware: Sun Solaris
: P2 major (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-11-07 18:38 UTC by vijayababu
Modified: 2007-09-26 09:14 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 vijayababu 2000-11-07 18:38:29 UTC
>
>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
Comment 1 Svata Dedic 2000-11-08 07:58:59 UTC
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*.
Comment 2 Quality Engineering 2003-07-01 13:12:04 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 3 Quality Engineering 2003-07-01 13:16:20 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.
Comment 4 Quality Engineering 2007-09-20 12:09:08 UTC
Reorganization of java component