8049223: RewriteException class exposes public mutable arrays
Reviewed-by: hannesw, sundar
This commit is contained in:
parent
7620f47068
commit
1377f6380e
@ -331,7 +331,7 @@ public final class RewriteException extends Exception {
|
||||
* @return bytecode slot contents.
|
||||
*/
|
||||
public Object[] getByteCodeSlots() {
|
||||
return byteCodeSlots;
|
||||
return byteCodeSlots == null ? null : byteCodeSlots.clone();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -339,7 +339,7 @@ public final class RewriteException extends Exception {
|
||||
* function (a rest-of triggering a rest-of triggering a...)
|
||||
*/
|
||||
public int[] getPreviousContinuationEntryPoints() {
|
||||
return previousContinuationEntryPoints;
|
||||
return previousContinuationEntryPoints == null ? null : previousContinuationEntryPoints.clone();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -388,7 +388,7 @@ public final class RewriteException extends Exception {
|
||||
|
||||
//slot contents
|
||||
if (!isShort) {
|
||||
final Object[] slots = getByteCodeSlots();
|
||||
final Object[] slots = byteCodeSlots;
|
||||
if (slots != null) {
|
||||
sb.append("slots=").
|
||||
append(Arrays.asList(slots)).
|
||||
|
Loading…
Reference in New Issue
Block a user