8162702: com.sun.management.internal.GcInfoBuilder.getPoolNames should not return reference of it's private member

Return clone of array

Reviewed-by: dholmes, hb, dsamersoff
This commit is contained in:
Amit Sapre 2016-08-01 15:27:07 +03:00 committed by Dmitry Samersoff
parent 496e48d0fb
commit c4dce28e8e

View File

@ -79,7 +79,7 @@ public class GcInfoBuilder {
}
public String[] getPoolNames() {
return poolNames;
return poolNames.clone();
}
int getGcExtItemCount() {