This method is a convenience for testing. Code should call {@link Segment#newEntry} directly.
(K key, int hash, @Nullable ReferenceEntry<K, V> next)
| 1694 | * This method is a convenience for testing. Code should call {@link Segment#newEntry} directly. |
| 1695 | */ |
| 1696 | @VisibleForTesting |
| 1697 | ReferenceEntry<K, V> newEntry(K key, int hash, @Nullable ReferenceEntry<K, V> next) { |
| 1698 | Segment<K, V> segment = segmentFor(hash); |
| 1699 | segment.lock(); |
| 1700 | try { |
| 1701 | return segment.newEntry(key, hash, next); |
| 1702 | } finally { |
| 1703 | segment.unlock(); |
| 1704 | } |
| 1705 | } |
| 1706 | |
| 1707 | /** |
| 1708 | * This method is a convenience for testing. Code should call {@link Segment#copyEntry} directly. |
nothing calls this directly
no test coverage detected