-
Enhancement
-
Resolution: Unresolved
-
P4
-
5.0
-
Fix Understood
-
x86
-
windows_xp
A DESCRIPTION OF THE REQUEST :
When creating a new instance from the Class.newInstance() method, I used a class I had made which didn't have a "nullary" constructor.
At the time I didn't know this would throw an error because I didn't know what a nullary constructor was (I *think* I know what it is - a constructor without any arguments?)
I wasted a fair bit of time looking for other problems.
JUSTIFICATION :
It would have saved a lot of time if the error message was better.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The error message should say: "class being instantiated must have a no-argument constructor" or something to that effect.
When creating a new instance from the Class.newInstance() method, I used a class I had made which didn't have a "nullary" constructor.
At the time I didn't know this would throw an error because I didn't know what a nullary constructor was (I *think* I know what it is - a constructor without any arguments?)
I wasted a fair bit of time looking for other problems.
JUSTIFICATION :
It would have saved a lot of time if the error message was better.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The error message should say: "class being instantiated must have a no-argument constructor" or something to that effect.
- relates to
-
JDK-6380161 (reflect) Exception from newInstance() not chained to cause.
-
- Closed
-