mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
replace slashes with dots in class name passed to Class.forName in Method.getParameterTypes
This commit is contained in:
parent
336e822ba9
commit
df1aee5981
@ -73,16 +73,17 @@ public class Method<T> extends AccessibleObject
|
|||||||
} else if (c == 'L') {
|
} else if (c == 'L') {
|
||||||
int start = i + 1;
|
int start = i + 1;
|
||||||
i = next(';', spec, start);
|
i = next(';', spec, start);
|
||||||
String name = spec.substring(start, i);
|
String name = spec.substring(start, i).replace('/', '.');
|
||||||
types[index++] = Class.forName(name);
|
types[index++] = Class.forName(name, true, class_.getClassLoader());
|
||||||
} else if (c == '[') {
|
} else if (c == '[') {
|
||||||
int start = i;
|
int start = i;
|
||||||
while (spec.charAt(i) == '[') ++i;
|
while (spec.charAt(i) == '[') ++i;
|
||||||
|
|
||||||
if (spec.charAt(i) == 'L') {
|
if (spec.charAt(i) == 'L') {
|
||||||
i = next(';', spec, i + 1);
|
i = next(';', spec, i + 1);
|
||||||
String name = spec.substring(start, i);
|
String name = spec.substring(start, i).replace('/', '.');
|
||||||
types[index++] = Class.forName(name);
|
types[index++] = Class.forName
|
||||||
|
(name, true, class_.getClassLoader());
|
||||||
} else {
|
} else {
|
||||||
String name = spec.substring(start, i + 1);
|
String name = spec.substring(start, i + 1);
|
||||||
types[index++] = Class.forCanonicalName
|
types[index++] = Class.forCanonicalName
|
||||||
|
Loading…
Reference in New Issue
Block a user