changeset 17367:8f1d366691a2

8162702: com.sun.management.internal.GcInfoBuilder.getPoolNames should not return reference of it's private member Summary: return clone of array Reviewed-by: dholmes, hb, dsamersoff Contributed-by: amit.sapre@oracle.com
author dsamersoff
date Mon, 01 Aug 2016 15:27:07 +0300
parents 9a0ef04757f9
children 9672159305d7
files src/jdk.management/share/classes/com/sun/management/internal/GcInfoBuilder.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.management/share/classes/com/sun/management/internal/GcInfoBuilder.java	Mon Aug 01 13:53:55 2016 +0300
+++ b/src/jdk.management/share/classes/com/sun/management/internal/GcInfoBuilder.java	Mon Aug 01 15:27:07 2016 +0300
@@ -79,7 +79,7 @@
     }
 
     public String[] getPoolNames() {
-        return poolNames;
+        return poolNames.clone();
     }
 
     int getGcExtItemCount() {