8278461: Use Executable.getSharedParameterTypes() instead of Executable.getParameterTypes() in trusted code
Reviewed-by: redestad
This commit is contained in:
parent
525b20fce0
commit
ece98d859d
@ -371,7 +371,7 @@ public final class Constructor<T> extends Executable {
|
|||||||
sb.append(getDeclaringClass().getTypeName());
|
sb.append(getDeclaringClass().getTypeName());
|
||||||
sb.append('(');
|
sb.append('(');
|
||||||
StringJoiner sj = new StringJoiner(",");
|
StringJoiner sj = new StringJoiner(",");
|
||||||
for (Class<?> parameterType : getParameterTypes()) {
|
for (Class<?> parameterType : getSharedParameterTypes()) {
|
||||||
sj.add(parameterType.getTypeName());
|
sj.add(parameterType.getTypeName());
|
||||||
}
|
}
|
||||||
sb.append(sj);
|
sb.append(sj);
|
||||||
|
@ -431,7 +431,7 @@ public final class Method extends Executable {
|
|||||||
|
|
||||||
String toShortSignature() {
|
String toShortSignature() {
|
||||||
StringJoiner sj = new StringJoiner(",", getName() + "(", ")");
|
StringJoiner sj = new StringJoiner(",", getName() + "(", ")");
|
||||||
for (Class<?> parameterType : getParameterTypes()) {
|
for (Class<?> parameterType : getSharedParameterTypes()) {
|
||||||
sj.add(parameterType.getTypeName());
|
sj.add(parameterType.getTypeName());
|
||||||
}
|
}
|
||||||
return sj.toString();
|
return sj.toString();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user