|
24 | 24 | * to support multiple simultaneous readers while ensuring that writes are properly serial. |
25 | 25 | * The locks are held for the minimal period to allow maximal concurrency. |
26 | 26 | * Removals, i.e., {@link #remove(Object) remove}, {@link #removeAll(Collection) removeAll}, {@link #clear() clear}, and {@link #retainAll(Collection) retainAll}, are not supported. |
27 | | - * |
| 27 | + * |
28 | 28 | * @since 2.9 |
29 | 29 | */ |
30 | 30 | public class Pool<E> extends WeakInterningHashSet<E> |
@@ -105,25 +105,25 @@ protected abstract static class Queue<E> extends AtomicReference<AccessUnit<E>> |
105 | 105 | @Override |
106 | 106 | protected E getValue() |
107 | 107 | { |
108 | | - throw new UnsupportedOperationException(); |
| 108 | + throw new UnsupportedOperationException(); |
109 | 109 | } |
110 | 110 |
|
111 | 111 | @Override |
112 | 112 | protected void setValue(E value) |
113 | 113 | { |
114 | | - throw new UnsupportedOperationException(); |
| 114 | + throw new UnsupportedOperationException(); |
115 | 115 | } |
116 | 116 |
|
117 | 117 | @Override |
118 | 118 | protected boolean setArbitraryValue(Object value) |
119 | 119 | { |
120 | | - throw new UnsupportedOperationException(); |
| 120 | + throw new UnsupportedOperationException(); |
121 | 121 | } |
122 | 122 |
|
123 | 123 | @Override |
124 | | - public void reset(boolean isExclusive) |
| 124 | + public void reset(boolean isExclusive) |
125 | 125 | { |
126 | | - throw new UnsupportedOperationException(); |
| 126 | + throw new UnsupportedOperationException(); |
127 | 127 | } |
128 | 128 | }; |
129 | 129 |
|
@@ -774,7 +774,7 @@ protected final void access(boolean isReadLocked, AccessUnit<E> accessUnit) |
774 | 774 |
|
775 | 775 | // Periodically poll the queue to clean up garbage collected entries. |
776 | 776 | // It doesn't matter that this access count increment isn't thread safe, it just means we might take a little longer to poll the queue. |
777 | | - // Note that cleanup will acquire the write lock, so we mustn't call if if we're holding the read lock. |
| 777 | + // Note that cleanup will acquire the write lock, so we mustn't call if we're holding the read lock. |
778 | 778 | // |
779 | 779 | if (!isReadLocked && internalQueue != null && ++accessCount == cleanupPeriod) |
780 | 780 | { |
|
0 commit comments