mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +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') {
|
||||
int start = i + 1;
|
||||
i = next(';', spec, start);
|
||||
String name = spec.substring(start, i);
|
||||
types[index++] = Class.forName(name);
|
||||
String name = spec.substring(start, i).replace('/', '.');
|
||||
types[index++] = Class.forName(name, true, class_.getClassLoader());
|
||||
} else if (c == '[') {
|
||||
int start = i;
|
||||
while (spec.charAt(i) == '[') ++i;
|
||||
|
||||
if (spec.charAt(i) == 'L') {
|
||||
i = next(';', spec, i + 1);
|
||||
String name = spec.substring(start, i);
|
||||
types[index++] = Class.forName(name);
|
||||
String name = spec.substring(start, i).replace('/', '.');
|
||||
types[index++] = Class.forName
|
||||
(name, true, class_.getClassLoader());
|
||||
} else {
|
||||
String name = spec.substring(start, i + 1);
|
||||
types[index++] = Class.forCanonicalName
|
||||
|
Loading…
Reference in New Issue
Block a user