8189977: Improve permission portability

Reviewed-by: rriggs
This commit is contained in:
Weijun Wang 2017-12-06 21:17:19 +08:00
parent a7c9c021ba
commit 0b873290a4
2 changed files with 30 additions and 0 deletions

View file

@ -1293,6 +1293,10 @@ public class Hashtable<K,V>
length--;
length = Math.min(length, origlength);
if (length < 0) { // overflow
length = origlength;
}
// Check Map.Entry[].class since it's the nearest public type to
// what we're actually creating.
SharedSecrets.getJavaObjectInputStreamAccess().checkArray(s, Map.Entry[].class, length);