Details
-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b113
-
generic
-
generic
-
Verified
Description
There are two issues with the method Class.forName:
1. Class.forName specification doesn't mention any resrtiction concerning array dimensions. Currently the implementation throws ClassNotFoundException if the given name of desired class represents the array which dimension is >255.
2. The behavior of the method Array.newInstance is inconsistent with the method Class.forName. While it's prohibited to create Class objects which reflect arrays with dimension >255 using Class.forName, it is possible to create arrays with almost any dimension using Array.newInstance.
1. Class.forName specification doesn't mention any resrtiction concerning array dimensions. Currently the implementation throws ClassNotFoundException if the given name of desired class represents the array which dimension is >255.
2. The behavior of the method Array.newInstance is inconsistent with the method Class.forName. While it's prohibited to create Class objects which reflect arrays with dimension >255 using Class.forName, it is possible to create arrays with almost any dimension using Array.newInstance.