diff --git a/src/share/classes/javax/management/openmbean/TabularDataSupport.java b/src/share/classes/javax/management/openmbean/TabularDataSupport.java index 5740c79e6d80b65a535d2c6b4a24b26092f9d53c..4dcf214ff9eb4eda67956dc5dfe1fdb92a4d77b7 100644 --- a/src/share/classes/javax/management/openmbean/TabularDataSupport.java +++ b/src/share/classes/javax/management/openmbean/TabularDataSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,6 +45,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; +import sun.misc.SharedSecrets; // jmx import // @@ -911,6 +912,8 @@ public class TabularDataSupport throws IOException, ClassNotFoundException { in.defaultReadObject(); List tmpNames = tabularType.getIndexNames(); - indexNamesArray = tmpNames.toArray(new String[tmpNames.size()]); + int size = tmpNames.size(); + SharedSecrets.getJavaOISAccess().checkArray(in, String[].class, size); + indexNamesArray = tmpNames.toArray(new String[size]); } }