Mercurial > hg > openjdk > jdk6 > jdk
changeset 1798:80a6c44694f2
8189985: Improve tabular data portability
Reviewed-by: dfuchs, robm
author | mchinnathamb |
---|---|
date | Fri, 16 Feb 2018 01:37:10 -0800 |
parents | 1ded804bbc07 |
children | 299f966882e1 |
files | src/share/classes/javax/management/openmbean/TabularDataSupport.java |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/javax/management/openmbean/TabularDataSupport.java Wed Nov 15 07:07:16 2017 -0800 +++ b/src/share/classes/javax/management/openmbean/TabularDataSupport.java Fri Feb 16 01:37:10 2018 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2007, 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 @@ -41,6 +41,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import sun.misc.SharedSecrets; // jmx import // @@ -900,6 +901,8 @@ throws IOException, ClassNotFoundException { in.defaultReadObject(); List<String> 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]); } }