1 |
|
/* |
2 |
< |
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 |
> |
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. |
3 |
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
|
* |
5 |
|
* This code is free software; you can redistribute it and/or modify it |
34 |
|
import java.util.function.BiFunction; |
35 |
|
import java.util.function.Consumer; |
36 |
|
import java.util.function.Function; |
37 |
+ |
import jdk.internal.misc.SharedSecrets; |
38 |
|
|
39 |
|
/** |
40 |
|
* Hash table based implementation of the {@code Map} interface. This |
1449 |
|
float ft = (float)cap * lf; |
1450 |
|
threshold = ((cap < MAXIMUM_CAPACITY && ft < MAXIMUM_CAPACITY) ? |
1451 |
|
(int)ft : Integer.MAX_VALUE); |
1452 |
+ |
|
1453 |
+ |
// Check Map.Entry[].class since it's the nearest public type to |
1454 |
+ |
// what we're actually creating. |
1455 |
+ |
SharedSecrets.getJavaObjectInputStreamAccess().checkArray(s, Map.Entry[].class, cap); |
1456 |
|
@SuppressWarnings({"rawtypes","unchecked"}) |
1457 |
|
Node<K,V>[] tab = (Node<K,V>[])new Node[cap]; |
1458 |
|
table = tab; |