You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2020/02/24 22:42:28 UTC
[commons-collections] 02/07: Fixed checkstyle.
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 4797acefbaf24044f401868743c99362e67d4274
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Tue Feb 18 23:07:19 2020 +0000
Fixed checkstyle.
Add missing newlines at end of files.
Remove redundant modifiers.
Fix incorrect Apache license header.
Fix whitespace around elements.
Remove tab characters.
Fix right-curly location.
Correct modifier order.
---
src/assembly/src.xml | 2 +-
src/changes/changes.xml | 2180 ++++++++++----------
src/conf/checkstyle-suppressions.xml | 2 +-
src/conf/checkstyle.xml | 2 +-
.../commons/collections4/CollectionUtils.java | 22 +-
.../org/apache/commons/collections4/Equator.java | 22 +-
.../apache/commons/collections4/IterableUtils.java | 2 +-
.../apache/commons/collections4/IteratorUtils.java | 6 +-
.../org/apache/commons/collections4/ListUtils.java | 28 +-
.../org/apache/commons/collections4/SetUtils.java | 2 +-
.../commons/collections4/bag/AbstractMapBag.java | 4 +-
.../commons/collections4/bag/CollectionBag.java | 2 +-
.../collections4/bag/CollectionSortedBag.java | 2 +-
.../apache/commons/collections4/bag/TreeBag.java | 2 +-
.../commons/collections4/bag/UnmodifiableBag.java | 4 +-
.../collections4/bidimap/AbstractDualBidiMap.java | 2 +-
.../commons/collections4/bidimap/TreeBidiMap.java | 8 +-
.../bloomfilter/AbstractBloomFilter.java | 19 +-
.../bloomfilter/BitSetBloomFilter.java | 23 +-
.../collections4/bloomfilter/BloomFilter.java | 15 +-
.../bloomfilter/CountingBloomFilter.java | 19 +-
.../bloomfilter/HasherBloomFilter.java | 15 +-
.../collections4/bloomfilter/SetOperations.java | 27 +-
.../bloomfilter/hasher/DynamicHasher.java | 15 +-
.../bloomfilter/hasher/HashFunction.java | 15 +-
.../bloomfilter/hasher/HashFunctionIdentity.java | 15 +-
.../hasher/HashFunctionIdentityImpl.java | 15 +-
.../bloomfilter/hasher/HashFunctionValidator.java | 15 +-
.../collections4/bloomfilter/hasher/Hasher.java | 15 +-
.../collections4/bloomfilter/hasher/Shape.java | 19 +-
.../bloomfilter/hasher/StaticHasher.java | 15 +-
.../bloomfilter/hasher/function/MD5Cyclic.java | 15 +-
.../hasher/function/Murmur128x86Cyclic.java | 15 +-
.../hasher/function/Murmur32x86Iterative.java | 15 +-
.../hasher/function/ObjectsHashIterative.java | 15 +-
.../bloomfilter/hasher/function/package-info.java | 17 +-
.../bloomfilter/hasher/package-info.java | 17 +-
.../collections4/bloomfilter/package-info.java | 16 +-
.../comparators/BooleanComparator.java | 2 +-
.../collections4/comparators/ComparatorChain.java | 4 +-
.../collections4/comparators/NullComparator.java | 25 +-
.../collections4/functors/IfTransformer.java | 2 +-
.../collections4/iterators/BoundedIterator.java | 23 +-
.../collections4/iterators/IteratorChain.java | 2 +-
.../collections4/iterators/IteratorIterable.java | 25 +-
.../collections4/iterators/NodeListIterator.java | 11 +-
.../collections4/iterators/PeekingIterator.java | 15 +-
.../collections4/iterators/PushbackIterator.java | 15 +-
.../iterators/SingletonListIterator.java | 2 +-
.../collections4/iterators/SkippingIterator.java | 23 +-
.../collections4/iterators/ZippingIterator.java | 2 +-
.../commons/collections4/keyvalue/MultiKey.java | 3 +-
.../collections4/keyvalue/TiedMapEntry.java | 2 +-
.../collections4/map/AbstractHashedMap.java | 6 +-
.../collections4/map/AbstractLinkedMap.java | 2 +-
.../collections4/map/AbstractReferenceMap.java | 10 +-
.../apache/commons/collections4/map/Flat3Map.java | 8 +-
.../apache/commons/collections4/map/LRUMap.java | 2 +-
.../apache/commons/collections4/map/LazyMap.java | 6 +-
.../commons/collections4/map/LazySortedMap.java | 22 +-
.../commons/collections4/map/ListOrderedMap.java | 2 +-
.../commons/collections4/map/MultiValueMap.java | 6 +-
.../commons/collections4/map/SingletonMap.java | 4 +-
.../commons/collections4/map/StaticBucketMap.java | 2 +-
.../multimap/AbstractListValuedMap.java | 6 +-
.../multimap/AbstractMultiValuedMap.java | 8 +-
.../multimap/AbstractSetValuedMap.java | 3 +-
.../collections4/multiset/AbstractMapMultiSet.java | 2 +-
.../collections4/multiset/AbstractMultiSet.java | 4 +-
.../multiset/UnmodifiableMultiSet.java | 2 +-
.../org/apache/commons/collections4/overview.html | 28 +-
.../properties/AbstractPropertiesFactory.java | 12 +-
.../collections4/sequence/SequencesComparator.java | 4 +-
.../collections4/trie/AbstractBitwiseTrie.java | 6 +-
.../collections4/trie/AbstractPatriciaTrie.java | 86 +-
.../trie/analyzer/StringKeyAnalyzer.java | 2 +-
src/site/xdoc/bloomFilters.xml | 24 +-
src/site/xdoc/history.xml | 12 +-
src/site/xdoc/pick.xml | 10 +-
src/site/xdoc/release_3_2_2.xml | 4 +-
src/site/xdoc/release_4_0.xml | 70 +-
src/site/xdoc/release_4_2.xml | 4 +-
src/site/xdoc/security-reports.xml | 12 +-
src/site/xdoc/userguide.xml | 20 +-
.../apache/commons/collections4/BagUtilsTest.java | 2 +-
.../org/apache/commons/collections4/BulkTest.java | 6 +-
.../commons/collections4/CollectionUtilsTest.java | 22 +-
.../commons/collections4/IterableUtilsTest.java | 2 +-
.../apache/commons/collections4/ListUtilsTest.java | 4 +-
.../apache/commons/collections4/MapUtilsTest.java | 192 +-
.../apache/commons/collections4/SetUtilsTest.java | 9 +-
.../commons/collections4/SplitMapUtilsTest.java | 2 +-
.../collections4/bag/CollectionBagTest.java | 2 +-
.../collections4/bag/CollectionSortedBagTest.java | 2 +-
.../collections4/bag/PredicatedBagTest.java | 2 +-
.../AbstractOrderedBidiMapDecoratorTest.java | 4 +-
.../bidimap/AbstractSortedBidiMapTest.java | 2 +-
.../collections4/bidimap/DualTreeBidiMap2Test.java | 6 +-
.../bloomfilter/AbstractBloomFilterTest.java | 15 +-
.../bloomfilter/BitSetBloomFilterTest.java | 15 +-
.../bloomfilter/CountingBloomFilterTest.java | 32 +-
.../bloomfilter/DefaultBloomFilterMethodsTest.java | 19 +-
.../bloomfilter/HasherBloomFilterTest.java | 15 +-
.../bloomfilter/SetOperationsTest.java | 15 +-
.../hasher/DynamicHasherBuilderTest.java | 15 +-
.../bloomfilter/hasher/DynamicHasherTest.java | 15 +-
.../hasher/HashFuctionValidatorTest.java | 31 +-
.../hasher/HashFunctionIdentityImplTest.java | 23 +-
.../collections4/bloomfilter/hasher/ShapeTest.java | 17 +-
.../bloomfilter/hasher/StaticHasherTest.java | 23 +-
.../bloomfilter/hasher/function/MD5CyclicTest.java | 16 +-
.../hasher/function/Murmur128x86CyclicTest.java | 16 +-
.../hasher/function/Murmur32x86IterativeTest.java | 16 +-
.../hasher/function/ObjectsHashIterativeTest.java | 16 +-
.../collection/AbstractCollectionTest.java | 14 +-
.../comparators/BooleanComparatorTest.java | 2 +-
.../comparators/FixedOrderComparatorTest.java | 2 +-
.../functors/AbstractAnyAllOnePredicateTest.java | 22 +-
.../functors/AbstractCompositePredicateTest.java | 4 +-
.../functors/AbstractMockPredicateTest.java | 6 +-
.../collections4/functors/AllPredicateTest.java | 2 +-
.../iterators/BoundedIteratorTest.java | 23 +-
.../iterators/CollatingIteratorTest.java | 2 +-
.../collections4/iterators/FilterIteratorTest.java | 2 +-
.../iterators/FilterListIteratorTest.java | 20 +-
.../iterators/IteratorEnumerationTest.java | 15 +-
.../iterators/IteratorIterableTest.java | 23 +-
.../iterators/NodeListIteratorTest.java | 11 +-
.../iterators/PeekingIteratorTest.java | 16 +-
.../iterators/PermutationIteratorTest.java | 2 +-
.../iterators/PushbackIteratorTest.java | 17 +-
.../iterators/SkippingIteratorTest.java | 23 +-
.../iterators/UnmodifiableMapIteratorTest.java | 6 +-
.../UnmodifiableOrderedMapIteratorTest.java | 2 +-
.../junit/ObjectToStringComparator.java | 2 +-
.../collections4/keyvalue/MultiKeyTest.java | 25 +-
.../collections4/list/AbstractListTest.java | 2 +-
.../list/NodeCachingLinkedListTest.java | 4 +-
.../collections4/list/SetUniqueListTest.java | 16 +-
.../commons/collections4/map/AbstractMapTest.java | 18 +-
.../collections4/map/AbstractSortedMapTest.java | 4 +-
.../commons/collections4/map/EmptyMapMutator.java | 8 +-
.../commons/collections4/map/LazyMapTest.java | 4 +-
.../collections4/map/LazySortedMapTest.java | 20 +-
.../collections4/map/MultiValueMapTest.java | 8 +-
.../collections4/map/PredicatedSortedMapTest.java | 12 +-
.../commons/collections4/map/ReferenceMapTest.java | 6 +-
.../collections4/map/TransformedMapTest.java | 2 +-
.../map/UnmodifiableSortedMapTest.java | 2 +-
.../multimap/AbstractMultiValuedMapTest.java | 2 +-
.../multimap/ArrayListValuedHashMapTest.java | 2 +-
.../multimap/TransformedMultiValuedMapTest.java | 2 +-
.../multimap/UnmodifiableMultiValuedMapTest.java | 4 +-
.../multiset/UnmodifiableMultiSetTest.java | 8 +-
.../org/apache/commons/collections4/overview.html | 28 +-
.../properties/AbstractPropertiesFactoryTest.java | 4 +-
.../properties/EmptyPropertiesTest.java | 2 +-
.../collections4/queue/AbstractQueueTest.java | 2 +-
.../collections4/queue/CircularFifoQueueTest.java | 2 +-
.../collections4/queue/UnmodifiableQueueTest.java | 2 +-
.../commons/collections4/set/EmptySetMutator.java | 2 +-
.../splitmap/TransformedSplitMapTest.java | 4 +-
.../collections4/trie/PatriciaTrieTest.java | 2 +-
163 files changed, 2073 insertions(+), 2085 deletions(-)
diff --git a/src/assembly/src.xml b/src/assembly/src.xml
index 5b216ff..963aced 100644
--- a/src/assembly/src.xml
+++ b/src/assembly/src.xml
@@ -38,7 +38,7 @@
<fileSet>
<directory>src</directory>
<excludes>
- <exclude>**/*.cgi</exclude>
+ <exclude>**/*.cgi</exclude>
</excludes>
</fileSet>
</fileSets>
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 578ed5a..c575bff 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -1,1090 +1,1090 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-<document>
- <properties>
- <title>Apache Commons Collections Release Notes</title>
- </properties>
- <body>
- <release version="4.5" date="2020-MM-DD" description="Maintenance release.">
- <action issue="COLLECTIONS-697" dev="eax" type="update" due-to="Ranjan George">
- JavaDoc for FixedSizeList should warn that modifying underlying list is still allowed and is not prevented
- </action>
- <action issue="COLLECTIONS-738" dev="kinow" type="update" due-to="Pengyu Nie">
- Remove the redundant assertNull in IterableUtilsTest.find and update Javadocs.
- </action>
- <action issue="COLLECTIONS-724" dev="ggregory" type="update" due-to="Eitan Adler">
- Simplify two remove-if loops #77.
- </action>
- <action issue="COLLECTIONS-726" dev="ggregory" type="update" due-to="liuhaozzu, Gary Gregory">
- Add lambdas function to provide default values in MapUtils #81.
- </action>
- <action issue="COLLECTIONS-727" dev="ggregory" type="fix" due-to="XiangzheXu, XZ-X">
- A potential misleading comment #82.
- </action>
- <action issue="COLLECTIONS-679" dev="ggregory" type="fix" due-to="David Mollitor, Mikko Maunu">
- Using existing class in example given in Javadocs. #85.
- </action>
- <action issue="COLLECTIONS-729" dev="ggregory" type="fix" due-to="dota17">
- Add test cases to IteratorUtilsTest #86.
- </action>
- <action dev="ggregory" type="fix" due-to="dota17">
- Fix typos in release notes and Javadoc for AbstractHashedMap and AbstractHashedMapTest #88.
- </action>
- <action issue="COLLECTIONS-704" dev="ggregory" type="update" due-to="dota17">
- Update size to capacity for GrowthList #90.
- </action>
- <action dev="ggregory" type="add" due-to="dota17">
- Test subMap and tailMap #94.
- </action>
- <action dev="ggregory" type="add" due-to="dota17">
- Add junit for add, remove, setCount and entrySet in the UnmodifiableMultiSetTest #95.
- </action>
- <action dev="ggregory" type="add" due-to="dota17">
- Add two test cases in UnmodifiableQueueTest #96.
- </action>
- <action dev="ggregory" type="add" due-to="dota17">
- Update two test cases in AbstractMultiValuedMapTest testPutAll_map1 testPutAll_map2 #97.
- </action>
- <action dev="ggregory" type="update" due-to="dota17">
- TransformedSortedBagTest should work with TransformedSortedBag, not TransformedBag #98.
- </action>
- <action dev="ggregory" type="add" due-to="dota17">
- Add a test case for AbstractMultiValuedMapTest testToString() #100.
- </action>
- <action dev="ggregory" type="update" due-to="dota17">
- Update some map test cases #104.
- </action>
- <action dev="ggregory" type="update" due-to="dota17">
- Add three test cases in UnmodifiableQueueTest #105.
- </action>
- <action issue="COLLECTIONS-674" dev="ggregory" type="add" due-to="dota17">
- Add CollectionUtils removeRange, removeCount #91.
- </action>
- <action dev="ggregory" type="add" due-to="dota17">
- Add a test case AbstractMultiValuedMapTest#testMultiValuedMapIterator() #108.
- </action>
- <action dev="ggregory" type="update" due-to="dota17">
- Remove the parentheses in the error message in CircularFifoQueue #107.
- </action>
- <action dev="ggregory" type="add" due-to="dota17">
- Add junit for getWithNull and subList in LazyListTest; #103.
- </action>
- <action dev="ggregory" type="add" due-to="dota17">
- Add test cases to ArrayListValuedHashMapTest; #106.
- </action>
- <action dev="ggregory" type="add" due-to="dota17">
- Add test cases in UnmodifiableMultiValuedMapTest; #102.
- </action>
- <action dev="ggregory" type="update" due-to="Gary Gregory">
- [test] org.easymock:easymock 4.0.2 -> 4.1.
- </action>
- <action issue="COLLECTIONS-734" dev="ggregory" type="fix" due-to="Chen">
- Encountered an IllegalStateException while traversing with Flat3Map.entrySet(). #115.
- </action>
- <action dev="ggregory" type="update" due-to="Chen">
- Fix inconsistent @throws comments in ListOrderedSet #125.
- </action>
- <action issue="COLLECTIONS-740" dev="ggregory" type="fix" due-to="Pengyu Nie">
- Add missing @throws comment for SwitchTransformer.switchTransformer. #124.
- </action>
- <action issue="COLLECTIONS-739" dev="ggregory" type="fix" due-to="Pengyu Nie">
- Fix inconsistent @throws comments in DefaultedMap #123.
- </action>
- <action dev="ggregory" type="fix" due-to="Dominik Stadler">
- Fix links to release notes and update contents for 4.4 #127.
- </action>
- <action issue="COLLECTIONS-744" dev="ggregory" type="add" due-to="Gary Gregory">
- Add org.apache.commons.collections4.EnumerationUtils.asIterable(Enumeration).
- </action>
- <action issue="COLLECTIONS-728" dev="ggregory" type="add" due-to="Claude Warren">
- BloomFilter contribution.
- </action>
- <action dev="ggregory" type="update" due-to="Gary Gregory">
- [test] Update JUnit from 4.12 to 4.13.
- </action>
- <action dev="ggregory" type="update" due-to="Gary Gregory">
- [build] Update Apache commons-parent from 48 to 50.
- </action>
- <action issue="COLLECTIONS-746" dev="ggregory" type="add" due-to="Gary Gregory">
- Add org.apache.commons.collections4.properties.PropertiesFactory.EMPTY_PROPERTIES.
- </action>
- <action dev="ggregory" type="update" due-to="Gary Gregory">
- [build] Update Jacoco from 0.8.4 to 0.8.5.
- </action>
- <action dev="ggregory" type="update" due-to="Gary Gregory">
- [test] Update org.easymock:easymock 4.1 -> 4.2.
- </action>
- <action issue="COLLECTIONS-747" dev="ggregory" type="fix" due-to="Gary Gregory, Walter Laan">
- MultiKey.getKeys class cast exception.
- </action>
- <action issue="COLLECTIONS-748" dev="ggregory" type="update" due-to="Gary Gregory">
- Let org.apache.commons.collections4.properties.[Sorted]PropertiesFactory accept XML input.
- </action>
- </release>
- <release version="4.4" date="2019-07-05" description="Maintenance release.">
- <action issue="COLLECTIONS-710" dev="ggregory" type="fix" due-to="Yu Shi, Gary Gregory">
- NullPointerExceptions in CompositeCollection, CompositeSet, and CompositeMap.
- </action>
- <action issue="COLLECTIONS-715" dev="ggregory" type="add" due-to="morningmemo, Gary Gregory">
- Implement Collection's removeIf().
- </action>
- <action issue="COLLECTIONS-718" dev="ggregory" type="update" due-to="Eitan Adler">
- Fix LRUMap exception message.
- </action>
- <action issue="COLLECTIONS-719" dev="ggregory" type="add" due-to="Gary Gregory">
- Create a PropertiesFactory and SortedPropertiesFactory.
- </action>
- <action issue="COLLECTIONS-719" dev="ggregory" type="add" due-to="Stephan Windmüller, Bruno P. Kinoshita">
- Support Transformer for LazyList #52.
- </action>
- <action issue="COLLECTIONS-723" dev="ggregory" type="add" due-to="Eitan Adler, SOC, Bruno P. Kinoshita">
- Make use of FunctionalInterface #48.
- </action>
- <action issue="COLLECTIONS-716" dev="ggregory" type="update" due-to="Sebb">
- Don't include email address in Exception messages.
- </action>
- </release>
- <release version="4.3" date="2018-12-21" description="Update from Java 7 to Java 8, bug fixes, and small changes.">
- <action issue="COLLECTIONS-691" dev="kinow" type="fix" due-to="Eitan Adler">
- Use boolean operator for boolean result.
- </action>
- <action issue="COLLECTIONS-688" dev="ggregory" type="update">
- Update platform requirement from Java 7 to 8.
- </action>
- <action issue="COLLECTIONS-689" dev="ggregory" type="update" due-to="Richard Walker">
- Link to Javadoc API broken.
- </action>
- <action issue="COLLECTIONS-692" dev="ggregory" type="update" due-to="Gary Gregory, Eitan Adler">
- Replace use of deprecated Class#newInstance() PR #49.
- </action>
- <action issue="COLLECTIONS-696" dev="ggregory" type="add" due-to="Maxim Solodovnik">
- AbstractReferenceMap made easier for subclassing; PR #51.
- </action>
- <action issue="COLLECTIONS-701" dev="ggregory" type="fix" due-to="Shin Hong, Don Jeba">
- StackOverflowError in SetUniqueList.add() when it receives itself.
- </action>
- <action issue="COLLECTIONS-703" dev="ggregory" type="fix" due-to="Tomas Tulka">
- The PassiveExpiringMap#put() method should return the previous record only if not expired.
- </action>
- <action issue="COLLECTIONS-706" dev="ggregory" type="fix" due-to="Richard Eckart de Castilho, Gary Gregory">
- Add SetUtils.unmodifiableSet(T... items) method.
- </action>
- <action issue="COLLECTIONS-709" dev="ggregory" type="fix" due-to="Robert Wertman">
- MultiSet.Entry::getCount() isn't 0 after removing the last element.
- </action>
- </release>
- <release version="4.2" date="2018-07-11" description="Update from Java 6 to Java 7, bug fixes, and small changes.">
- <action issue="COLLECTIONS-681" dev="kinow" type="add" due-to="Stephan Fuhrmann">
- Add test for MultiSetUtils
- </action>
- <action issue="COLLECTIONS-599" dev="ggregory" type="fix" due-to="Tejas Patel, Saleem Akbar, Gary Gregory">
- HashEntry array object naming data initialized with double the size during deserialization.
- </action>
- <action issue="COLLECTIONS-662" dev="chtompki" type="fix" due-to="Vamsi Kavuri">
- Unit tests MapUtilsTest and ListIteratorWrapperTest no longer fail on Java 9.
- </action>
- <action issue="COLLECTIONS-661" dev="kinow" type="fix">
- Intermittent test failures in Windows for HashSetValuedHashMap.
- </action>
- <action issue="COLLECTIONS-660" dev="kinow" type="fix">
- Uncomment test in AbstractMapTest regarding LRUMap equals.
- </action>
- <action issue="COLLECTIONS-658" dev="britter" type="add">
- Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility.
- </action>
- <action issue="COLLECTIONS-656" dev="ggregory" type="fix">
- Fix site build on Java 8.
- </action>
- <action issue="COLLECTIONS-653" dev="kinow" type="fix">
- Update Javadoc to Build on Java 1.8.
- </action>
- <action issue="COLLECTIONS-606" dev="chtompki" type="fix" due-to="Vamsi Kavuri">
- Build status, Coverage status and Maven central weren't in README.md
- </action>
- <action issue="COLLECTIONS-602" dev="kinow" type="update" due-to="John Mark">
- Improve efficiency of DefaultedMap.get.
- </action>
- <action issue="COLLECTIONS-603" dev="kinow" type="update" due-to="Artem Konovalov">
- Small improvements for generics, conditional statements, and warnings suppressions.
- </action>
- <action issue="COLLECTIONS-655" dev="ggregory" type="update">
- Update platform from Java 6 to Java 7.
- </action>
- <action issue="COLLECTIONS-594" dev="ggregory" type="fix" due-to="Javen O'Neal">
- Web site spelling error: MultiValuedMapeList.
- </action>
- <action issue="COLLECTIONS-597" dev="ggregory" type="fix" due-to="Enrique">
- Correction of Javadoc for org.apache.commons.collections4.functors.CatchAndRethrowClosure.
- </action>
- <action issue="COLLECTIONS-589" dev="ggregory" type="add" due-to="Gary Gregory">
- Add null-safe MapUtils.size(Map<?, ?>) method.
- </action>
- <action issue="COLLECTIONS-586" dev="ggregory" type="add" due-to="Shailender Bathula, Gary Gregory">
- PatriciaTrie prefixMap clear throws NullPointerException.
- </action>
- <action issue="COLLECTIONS-654" dev="ggregory" type="add">
- Add class SortedProperties to sort keys.
- </action>
- <action issue="COLLECTIONS-666" dev="ggregory" type="update" due-to="BELUGA BEHR">
- org.apache.commons.collections4.ListUtils.union(List, List) should pre-allocate result list.
- </action>
- <action issue="COLLECTIONS-669" dev="ggregory" type="update" due-to="BELUGA BEHR, Gary Gregory">
- Update org.apache.commons.collections4.CollectionUtils.addAll(Collection<C>, C[]) to addAll(Collection<C>, C...).
- </action>
- <action issue="COLLECTIONS-668" dev="ggregory" type="add" due-to="Gary Gregory">
- Add CollectionUtils containsAny method for primitive array: org.apache.commons.collections4.CollectionUtils.containsAny(Collection<?>, T...).
- </action>
- <action issue="COLLECTIONS-575" dev="ggregory" type="add" due-to="Guram Savinov, Grzegorz Rożniecki, Bruno P. Kinoshita, Gary Gregory">
- Synchronized queue wrapper in QueueUtils.
- </action>
- <action issue="COLLECTIONS-670" dev="ggregory" type="add" due-to="Gary Gregory">
- Add org.apache.commons.collections4.IteratorUtils.first(Iterator).
- </action>
- <action issue="COLLECTIONS-671" dev="ggregory" type="add" due-to="Gary Gregory">
- Add org.apache.commons.collections4.IterableUtils.first(Iterable).
- </action>
- <action issue="COLLECTIONS-678" dev="ggregory" type="fix" due-to="Oscar Luis Vera Pérez">
- The verification of unsupported iterator methods is not complete.
- </action>
- <action issue="COLLECTIONS-673" dev="ggregory" type="fix" due-to="John Mark, Stephan Fuhrmann">
- ListUtils.partition potential integer overflow.
- </action>
- </release>
- <release version="4.1" date="2015-11-28" description="This is a security and minor release.">
- <action issue="COLLECTIONS-508" dev="tn" type="add">
- Added new interfaces "MultiValuedMap", "ListValuedMap" and "SetValuedMap"
- as a replacement for "MultiMap". Decorators and implementations reside in
- the "multimap" package and a "MultiMapUtils" class has been added.
- The existing interface "MultiMap" as well as the concrete implementation
- "MultiValueMap" has been deprecated.
- </action>
- <action issue="COLLECTIONS-551" dev="tn" type="update">
- Deprecated various method in "CollectionUtils" in favor of similar
- methods in the newly introduced "IterableUtils".
- </action>
- <action issue="COLLECTIONS-580" dev="tn" type="update">
- Serialization support for unsafe classes in the functor package
- has been removed as this can be exploited for remote code execution
- attacks. Classes considered to be unsafe are: CloneTransformer,
- ForClosure, InstantiateFactory, InstantiateTransformer, InvokerTransformer,
- PrototypeCloneFactory, PrototypeSerializationFactory, WhileClosure.
- </action>
- <action issue="COLLECTIONS-580" dev="tn" type="fix">
- Added validation when de-serializing a "MultiValueMap#ReflectionFactory":
- only Collection classes are allowed, otherwise an UnsupportedOperationException
- will be thrown during de-serialization.
- </action>
- <action issue="COLLECTIONS-567" dev="tn" type="add">
- Added new MultiSet interface which is intended to be a replacement for
- the Bag interface. The main difference is that a MultiSet is fully compatible
- to the Collection contract.
- </action>
- <action issue="COLLECTIONS-576" dev="tn" type="fix" due-to="Stephan Roch">
- Subclasses of MultiKey did not re-calculate their hashcode after de-serialization.
- </action>
- <action issue="COLLECTIONS-572" dev="tn" type="add">
- Added set operations to "SetUtils": union, difference, intersection and disjunction.
- The operations return a view of the result that is backed by the input sets.
- </action>
- <action issue="COLLECTIONS-570" dev="tn" type="update">
- All constructors and static factory methods will now throw a "NullPointerException" if
- a required input argument is null. Previously sometimes a "IllegalArgumentException" was used.
- </action>
- <action issue="COLLECTIONS-571" dev="tn" type="update">
- Deprecated methods "synchronizedCollection(Collection)" and "unmodifiableCollection(Collection)"
- in class "CollectionUtils", the corresponding methods in "java.util.Collections" should be used instead.
- </action>
- <action issue="COLLECTIONS-566" dev="tn" type="fix">
- "IteratorUtils#collate(...)" methods did not use natural ordering when a
- null comparator was provided.
- </action>
- <action issue="COLLECTIONS-557" dev="tn" type="add" due-to="Philippe Mouawad">
- Added support to specify the initial size of a "LRUMap".
- </action>
- <action issue="COLLECTIONS-565" dev="tn" type="add">
- Added decorators for "NavigableSet" interface.
- </action>
- <action issue="COLLECTIONS-464,COLLECTIONS-442" dev="tn" type="add">
- Added new class "FluentIterable" to support a fluent API for manipulating
- Iterable instances. Additionally various supporting methods have been
- added to "IterableUtils" and "IteratorUtils".
- </action>
- <action issue="COLLECTIONS-464" dev="tn" type="add">
- Added new "ZippingIterator" and factory methods "IteratorUtils#zippingIterator(...)".
- </action>
- <action issue="COLLECTIONS-464" dev="tn" type="add">
- Added new decorator "SkippingIterator" and factory methods "IteratorUtils#skippingIterator(...)".
- </action>
- <action issue="COLLECTIONS-556" dev="tn" type="add">
- Added method "SetUtils#newIdentityHashSet()" which returns a new identity HashSet
- using reference-equality instead of object-equality.
- </action>
- <action issue="COLLECTIONS-562" dev="tn" type="update">
- Upgraded minimum java requirement to Java 6 (up from Java 5).
- </action>
- <action issue="COLLECTIONS-395" dev="tn" type="add" due-to="David Hawthorne">
- Added method "LRUMap#get(Object, boolean)" that allows to query the map
- without affecting the least recently used order.
- </action>
- <action issue="COLLECTIONS-558" dev="tn" type="fix" due-to="Felix Rabe">
- Changed return type of "ListOrderedSet#remove(int)" from Object to the generic type parameter.
- </action>
- <action issue="COLLECTIONS-555" dev="tn" type="fix" due-to="M Kim">
- Added clarification to javadoc of "TreeBag#add(Object)" wrt null arguments.
- </action>
- <action issue="COLLECTIONS-427" dev="tn" type="add" due-to="Gonçalo Marques">
- Added "toString(...)" methods to newly created "IterableUtils" and existing "IteratorUtils"
- to get a string representation of an Iterable/Iterator instance similar to "Arrays#toString(...)".
- </action>
- <action issue="COLLECTIONS-427" dev="tn" type="fix">
- Reverted performance improvement for "SetUniqueList#retainAll(Collection)"
- introduced in 4.0. Added clarifying javadoc wrt runtime complexity instead.
- </action>
- <action issue="COLLECTIONS-426" dev="tn" type="fix">
- Reverted performance improvement for "ListOrderedSet#retainAll(Collection)"
- introduced in 4.0. Added clarifying javadoc wrt runtime complexity instead.
- </action>
- <action issue="COLLECTIONS-530" dev="tn" type="fix" due-to="Erik">
- Added a Builder for "PredicatedCollection". Elements added to the builder
- that fail the predicate will not throw an IllegalArgumentException. The builder
- supports creating predicated lists, bags, sets and queues.
- </action>
- <action issue="COLLECTIONS-545" dev="tn" type="fix" due-to="Oswaldo Olivo">
- Documented runtime complexity of "CollectionUtils#removeAll(Collection, Collection).
- </action>
- <action issue="COLLECTIONS-543" dev="tn" type="fix">
- "AbstractCollectionDecorator" doesn't forward equals and hashCode anymore.
- </action>
- <action issue="COLLECTIONS-544" dev="tn" type="fix" due-to="Oswaldo Olivo">
- Documented runtime complexity of "CollectionUtils#retainAll(Collection, Collection).
- </action>
- <action issue="COLLECTIONS-542" dev="tn" type="fix">
- "AbstractHashedMap" still inherits from "AbstractMap", contrary to what
- the class javadoc stated. The inheritance will now be removed in v5.0.
- </action>
- <action issue="COLLECTIONS-539" dev="tn" type="add" due-to="Guram Savinov">
- Changed scope of "CircularFifoQueue#isAtFullCapacity()" to public.
- </action>
- <action issue="COLLECTIONS-525" dev="tn" type="fix" due-to="Zigler Zhang">
- The map returned by "PatriciaTrie#prefixMap()" did not contain all keys
- that are prefixed by the given search key in some rare cases.
- </action>
- <action issue="COLLECTIONS-511" dev="tn" type="add" due-to="Nathan Blomquist, Brent Worden">
- Added new methods "IterableUtils#partition(...)" to partition an input collection
- into separate output collections based on evaluation of one or more predicates.
- </action>
- <action issue="COLLECTIONS-537" dev="tn" type="fix" due-to="Frank Jakop">
- Harmonized signature of factory methods for functor-related classes which take
- a collection as input with their array counterparts.
- </action>
- <action issue="COLLECTIONS-540" dev="tn" type="fix" due-to="Daniel Stewart, Issam El Atif">
- Added overloaded method "CollectionUtils#get(Enumeration, int)" and simplified
- code for "CollectionUtils#get(Object, int)".
- </action>
- <action issue="COLLECTIONS-536" dev="tn" type="fix" due-to="Tagir Valeev">
- Improved check for null input in "MapUtils#putAll(Map, Object[])".
- </action>
- <action issue="COLLECTIONS-534" dev="tn" type="fix" due-to="Oswaldo Olivo">
- Added clarifying javadoc wrt runtime complexity of "CollectionBag#retainAll".
- </action>
- <action issue="COLLECTIONS-529" dev="tn" type="add" due-to="Alexander Muthmann, Dipanjan Laha">
- Added methods "removeAll(...)" and "retainAll(...)" to "CollectionUtils" that perform
- equality checks using the provided "Equator" object instead of "Object#equals()".
- </action>
- <action issue="COLLECTIONS-531" dev="tn" type="fix" due-to="Dipanjan Laha">
- Use correct type bounds in
- "CollectionUtils#isEqualCollection(Collection, Collection, Equator)" to
- prevent a "ClassCastException" at runtime for invalid inputs.
- </action>
- <action issue="COLLECTIONS-523" dev="tn" type="fix" due-to="Thiago Andrade">
- Removed unneeded private method in "PassiveExpiringMap".
- </action>
- <action issue="COLLECTIONS-516" dev="tn" type="fix" due-to="Cyrille Artho">
- Added clarification to the javadoc of "MapUtils#toProperties(Map)" in case
- of null keys/values.
- </action>
- <action issue="COLLECTIONS-524" dev="tn" type="fix" due-to="J Goodfellow">
- "ListOrderedSet#listOrderedSet(List)" did not remove duplicates from the
- input list as advertised in the javadoc.
- </action>
- <action issue="COLLECTIONS-521" dev="tn" type="fix" due-to="Maxime Nay">
- "MultiKeyMap" was throwing a "NullPointerException" for various operations
- if two key arguments have been used and the second was "null".
- </action>
- <action issue="COLLECTIONS-522" dev="tn" type="fix" due-to="Erik">
- Updated code example for "PredicatedList".
- </action>
- <action issue="COLLECTIONS-512" dev="tn" type="fix" due-to="Cyrille Artho">
- "TransformingComparator" and "FixedOrderComparator" did not comply with
- the contract of "Object#equals".
- </action>
- <action issue="COLLECTIONS-510" dev="tn" type="fix" due-to="Hollis Waite">
- Fix compilation errors when using source level 1.8 and a recent java 8 compiler.
- </action>
- <action issue="COLLECTIONS-509" dev="tn" type="fix">
- Clarified javadoc of "CollectionBag" wrt changes from the original Bag interface.
- </action>
- <action issue="COLLECTIONS-507" dev="tn" type="fix" due-to="Gerson">
- Removed wrong type bounds for "ComparatorUtils#chainedComparator(...)".
- </action>
- <action issue="COLLECTIONS-506" dev="tn" type="fix" due-to="Anthony Communier">
- Added javadoc clarification to class "CollectionUtils" that input objects which
- override "Object#equals(Object)" must also maintain the general contract of
- "Object#hashCode()" as various utility methods take advantage of sets/maps/bags.
- </action>
- <action issue="COLLECTIONS-503" dev="tn" type="add" due-to="Josh Cain">
- Added new transformer "IfTransformer" and factory methods "TransformerUtils#ifTransformer(...)"
- which replace "TransformerUtils#switchTransformer(Predicate, Transformer, Transformer)".
- </action>
- <action issue="COLLECTIONS-471" dev="tn" type="add" due-to="Radford Tam">
- Added new decorator "BoundedIterator" and factory methods "IteratorUtils#boundedIterator(...)".
- </action>
- </release>
- <release version="4.0" date="2013-11-27" description="
-This is a major release: It combines bug fixes, new features and
-changes to existing features.
-
-Most notable changes are: use of generics and other language features introduced in Java 5 (varargs, Iterable),
-removed deprecated classes / methods and features which are now supported by the JDK,
-replaced Buffer interface with java.util.Queue,
-added concept of split maps with respective interfaces Put / Get (see also package splitmap),
-added new Trie interface together with an implementation of a Patricia Trie.
-
-Because of the base package name change, this release can be used together
-with earlier versions of Commons Collections.
-The minimal version of the Java platform required to compile and use
-Commons Collections is Java 5.
-Users are encouraged to upgrade to this version as, in addition to new
-features, this release includes numerous bug fixes.
- ">
- <action issue="COLLECTIONS-502" dev="tn" type="update">
- Resolved generic parameter inconsistency for various static fields, e.g. BagUtils.EMPTY_BAG,
- TruePredicate.INSTANCE and many others. All accessible static fields use raw types so that
- they can be used directly without explicit casting. To avoid compiler warnings about unchecked
- conversion and/or rawtypes use the corresponding factory methods, e.g. BagUtils.emptyBag().
- </action>
- <action issue="COLLECTIONS-501" dev="tn" type="update">
- Renamed methods "V MultiKeyMap#remove(Object, Object, ...)" to
- "V MultiKeyMap#removeMultiKey(Object, Object, ...)" to avoid future conflicts
- with a default method of the Map interface in Java 8.
- </action>
- <action issue="COLLECTIONS-500" dev="tn" type="update">
- Renamed "V MultiMap#remove(K, V)" to "boolean MultiMap#removeMapping(K, V)"
- to avoid future conflicts with a default method of the Map interface in Java 8.
- </action>
- <action issue="COLLECTIONS-499" dev="tn" type="update">
- Refactored the test framework for Bag implementations to extend from
- "AbstractCollectionTest" by decorating the concrete Bag instance with
- a CollectionBag or CollectionSortedBag.
- </action>
- <action issue="COLLECTIONS-498" dev="tn" type="fix">
- "CollectionBag" will now also respect the contract of the decorated bag in case
- a null argument is provided to either removeAll or retainAll.
- </action>
- <action issue="COLLECTIONS-497" dev="tn" type="add">
- Added bag decorator "CollectionSortedBag" which decorates a SortedBag to make it
- comply with the Collection contract.
- </action>
- <action issue="COLLECTIONS-496" dev="tn" type="update">
- "UnmodifiableBoundedCollection" does now also implement the marker interface "Unmodifiable"
- similar as all other unmodifiable decorators.
- </action>
- <action issue="COLLECTIONS-495" dev="tn" type="fix">
- "UnmodifiableTrie#unmodifiableTrie(Trie)" will not decorate again an already
- unmodifiable Trie. Also the return type has been changed to "Trie" to be consistent
- with other Unmodifiable decorators.
- </action>
- <action issue="COLLECTIONS-494" dev="tn" type="update" due-to="Emmanuel Bourg">
- Moved "Equator" interface to base package for consistency.
- </action>
- <action issue="COLLECTIONS-488" dev="tn" type="add" due-to="Josh Cain">
- Added "CollectionsUtils#matchesAll(Iterable, Predicate)" to test if all elements
- of a collection match a given predicate.
- </action>
- <action issue="COLLECTIONS-485" dev="tn" type="fix" due-to="Hollis Waite">
- Accept wildcard input where possible, e.g. in copy-constructors, Unmodifiable* decorators
- and iterators.
- </action>
- <action issue="COLLECTIONS-481" dev="tn" type="fix" due-to="Hollis Waite">
- No collision detection/resolution was performed when calling "CompositeSet#addComposited(...)"
- with more than one Set as argument. Additionally use varargs parameters instead of arrays
- in CompositeSet and CompositeCollection constructor and addComposited method.
- </action>
- <action issue="COLLECTIONS-480" dev="tn" type="update" due-to="Hollis Waite">
- Narrow return type of "BidiMap#values()" to Set as the values are required to be unique.
- </action>
- <action issue="COLLECTIONS-475" dev="tn" type="fix">
- Fixed conversion of timeout parameters in "PassiveExpiringMap".
- </action>
- <action issue="COLLECTIONS-474" dev="sebb" type="fix" due-to="Ning Chen">
- Exception in "ListOrderedMap#putAll" if map contains null values.
- </action>
- <action issue="COLLECTIONS-473" dev="tn" type="update" due-to="sebb">
- Made field "collection" in class "AbstractCollectionDecorator" private and added
- setter "setCollection(Collection)" with scope protected to set the decorated collection
- during de-serialization.
- </action>
- <action issue="COLLECTIONS-472" dev="tn" type="fix" due-to="Adrian Nistor">
- Improved performance of "AbstractMapBag#containsAll(Collection)" by returning immediately
- after a difference has been found.
- </action>
- <action issue="COLLECTIONS-470" dev="tn" type="update" due-to="sebb">
- Renamed class "TransformedMap" in package "splitmap" to "TransformedSplitMap" to avoid
- name clash with similar class in package "map".
- </action>
- <action issue="COLLECTIONS-468" dev="tn" type="add">
- Added bag decorator "CollectionBag" which decorates a bag to make it comply with the
- Collection contract.
- </action>
- <action issue="COLLECTIONS-466" dev="tn" type="update">
- Replaced "Collection" with "Iterable" for method arguments where applicable.
- </action>
- <action issue="COLLECTIONS-463" dev="tn" type="add" due-to="Andy Seaborne, Claude Warren">
- Added "PushbackIterator" decorator to support pushback of elements during iteration.
- </action>
- <action issue="COLLECTIONS-462" dev="tn" type="add" due-to="Andy Seaborne, Claude Warren">
- Added "PeekingIterator" decorator to support one-element lookahead during iteration.
- </action>
- <action issue="COLLECTIONS-461" dev="tn" type="fix" due-to="Matt Benson, sebb">
- Added additional clarification to javadoc of interface "Put" wrt return type of
- "put(Object, Object)" method.
- </action>
- <action issue="COLLECTIONS-460" dev="tn" type="update">
- Changed "IteratorChain" to use internally a "Queue" instead of a "List". Iterators are
- removed from the queue once used and can be garbage collected after being exhausted.
- Additionally removed the methods "setIterator(Iterator)" and "getIterators()".
- </action>
- <action issue="COLLECTIONS-459" dev="tn" type="update" due-to="sebb">
- Removed method "setArray(Object)" in class ArrayIterator and method "setArray(Object[])"
- in class ObjectArrayIterator and made fields array, startIndex and endIndex final.
- </action>
- <action issue="COLLECTIONS-458" dev="sebb" type="remove">
- Removed unused class "AbstractUntypedCollectionDecorator<E, D>".
- </action>
- <action issue="COLLECTIONS-456" dev="tn" type="add">
- Added methods "ListUtils#longestCommonSubsequence(...)" to get the longest common subsequence
- of arbitrary lists or CharSequences.
- </action>
- <action issue="COLLECTIONS-455" dev="sebb" type="update">
- Changed scope of fields to private where appropriate.
- </action>
- <action issue="COLLECTIONS-454" dev="tn" type="update">
- An iterator over a "Flat3Map#entrySet()" will now return
- independent Map.Entry objects that will not change anymore when
- the iterator progresses.
- </action>
- <action issue="COLLECTIONS-453" dev="tn" type="update">
- Several closure and transformer implementations in the functors package
- will now copy an array as input to their constructor (e.g. ChainedClosure).
- </action>
- <action issue="COLLECTIONS-452" dev="tn" type="update">
- Change base package to org.apache.commons.collections4.
- </action>
- <action issue="COLLECTIONS-451" dev="tn" type="update">
- The constructors for all Utils classes are now private to prevent instantiation.
- </action>
- <action issue="COLLECTIONS-450" dev="tn" type="add" due-to="J. Moldawski">
- Added methods "forAllButLastDo(Collection, Closure)" and "forAllButLastDo(Iterator, Closure)"
- to class "CollectionUtils".
- </action>
- <action issue="COLLECTIONS-447" dev="tn" type="fix" due-to="Jeffrey Barnes">
- Tree traversal with a TreeListIterator will not be affected anymore by
- the removal of an element directly after a call to previous().
- </action>
- <action issue="COLLECTIONS-446" dev="tn" type="add" due-to="Matt Lachman">
- Added method "CollectionUtils#isEqualCollection(Collection, Collection, Equator)".
- </action>
- <action issue="COLLECTIONS-445" dev="tn" type="fix">
- Adapt and/or ignore several unit tests when run on a IBM J9 VM (specification version 1.6.0)
- due to a faulty "java.util.TreeMap" implementation.
- </action>
- <action issue="COLLECTIONS-444" dev="tn" type="fix" due-to="Thomas Vahrst, John Vasileff">
- SetUniqueList.set(int, E) now works correctly if the object to be inserted
- is already placed at the given position.
- </action>
- <action issue="COLLECTIONS-441" dev="tn" type="fix" due-to="Thomas Vahrst">
- MultiKeyMap.clone() now correctly calls super.clone().
- </action>
- <action issue="COLLECTIONS-436" dev="tn" type="add" due-to="Arman Sharif">
- Added "emptyIfNull" methods to classes "CollectionUtils", "ListUtils", "SetUtils"
- and "MapUtils".
- </action>
- <action issue="COLLECTIONS-433" dev="tn" type="fix" due-to="Jeffrey Barnes">
- Improve performance of "TreeList#addAll" and "TreeList(Collection)" by converting
- the input collection into an AVL tree and efficiently merge it into the existing tree.
- </action>
- <action issue="COLLECTIONS-432" dev="tn" type="update">
- Replaced "Buffer" interface with "java.util.Queue". Kept "CircularFifoQueue"
- as well as "Predicated", "Transformed" and "Unmodifiable" decorators.
- </action>
- <action issue="COLLECTIONS-429,COLLECTIONS-434" dev="tn" type="add" due-to="Adrian Nistor, Mert Guldur">
- Added method "CollectionUtils#containsAll(Collection, Collection)" with guaranteed
- runtime complexity of O(n + m) and space complexity of O(n). This method may yield much
- better performance than "Collection#containsAll(Collection)" depending on the use-case and
- type of collection used.
- </action>
- <action issue="COLLECTIONS-427" dev="brentworden" type="fix" due-to="Mert Guldur">
- Fixed performance issue in "SetUniqueList#retainAll" method for large collections.
- </action>
- <action issue="COLLECTIONS-426" dev="brentworden" type="fix" due-to="Adrian Nistor">
- Fixed performance issue in "ListOrderedSet#retainAll" method for large collections.
- </action>
- <action issue="COLLECTIONS-425" dev="tn" type="fix" due-to="Adrian Nistor">
- Improved performance of "ListOrderedMap#remove(Object)" method.
- </action>
- <action issue="COLLECTIONS-424" dev="tn" type="update" due-to="Michael Pradel">
- "CompositeSet" does not inherit from "CompositeCollection" anymore. The inner class
- "SetMutator" has been updated accordingly.
- </action>
- <action issue="COLLECTIONS-422" dev="tn" type="add" due-to="Benoit Corne">
- Added method "CollectionUtils#permutations(Collection)" and class "PermutationIterator"
- to generate unordered permutations of a collection.
- </action>
- <action issue="COLLECTIONS-421" dev="tn" type="fix" due-to="Benedikt Ritter">
- Update javadoc for "ListUtils#lazyList()" and "ListUtils#fixedSizeList()".
- </action>
- <action issue="COLLECTIONS-419" dev="tn" type="fix" due-to="Adrian Nistor">
- Added clarifying javadoc wrt runtime complexity of "AbstractDualBidiMap#retainAll".
- </action>
- <action issue="COLLECTIONS-417" dev="tn" type="fix" due-to="Adrian Nistor">
- Added clarifying javadoc wrt runtime complexity of "AbstractLinkedList#retainAll".
- </action>
- <action issue="COLLECTIONS-415" dev="tn" type="fix" due-to="Adrian Nistor">
- Added clarifying javadoc wrt runtime complexity of "AbstractLinkedList#removeAll".
- </action>
- <action issue="COLLECTIONS-414" dev="tn" type="fix">
- Fixed several compilation issues with older Java 1.6 compilers.
- </action>
- <action issue="COLLECTIONS-413" dev="tn" type="fix" due-to="Adrian Nistor">
- Improved performance of "removeAll()" method for sets returned by "DualHashBidiMap#entrySet()".
- </action>
- <action issue="COLLECTIONS-412" dev="tn" type="fix" due-to="Adrian Nistor">
- Improved performance of "CollectionUtils#subtract" methods.
- </action>
- <action issue="COLLECTIONS-411" dev="tn" type="fix" due-to="Adrian Nistor">
- Fixed possible "IndexOutOfBoundsException" in "ListOrderedMap#putAll".
- </action>
- <action issue="COLLECTIONS-410" dev="tn" type="fix" due-to="Adrian Nistor">
- Improved performance of "SetUniqueList#addAll" method.
- </action>
- <action issue="COLLECTIONS-409" dev="tn" type="fix" due-to="Adrian Nistor">
- Improved performance of "ListOrderedSet#addAll" method.
- </action>
- <action issue="COLLECTIONS-408" dev="tn" type="fix" due-to="Adrian Nistor">
- Improved performance of "SetUniqueList#removeAll".
- </action>
- <action issue="COLLECTIONS-407" dev="tn" type="fix" due-to="Adrian Nistor">
- Improved performance of "ListOrderedSet#remove(Object)" in case the object is
- not contained in the Set.
- </action>
- <action issue="COLLECTIONS-406" dev="tn" type="fix" due-to="Adrian Nistor">
- Improved performance of "ListUtils#subtract" method.
- </action>
- <action issue="COLLECTIONS-405" dev="brentworden" type="add" due-to="Adam Dyga">
- Added "ListUtils#select" and "ListUtils#selectRejected" methods.
- </action>
- <action issue="COLLECTIONS-404" dev="luc" type="add" due-to="Jordane Sarda">
- Added an implementation of Eugene Myers difference algorithm in package
- o.a.c.c.sequence.
- </action>
- <action issue="COLLECTIONS-400" dev="tn" type="fix" due-to="Shin Hwei Tan">
- Added missing null check in "CollectionUtils#addIgnoreNull(Collection, Object)".
- </action>
- <action issue="COLLECTIONS-399" dev="tn" type="add" due-to="Sebb">
- Added new method "get(int)" to "CircularFifoQueue".
- </action>
- <action issue="COLLECTIONS-396" dev="tn" type="add" due-to="Jeff Rodriguez">
- Added "LazyIteratorChain" iterator.
- </action>
- <action issue="COLLECTIONS-393" dev="tn" type="add" due-to="Chris Shayan">
- Added "ListUtils#partition" method to split a List into consecutive sublists.
- </action>
- <action issue="COLLECTIONS-391" dev="tn" type="fix" due-to="Shin Hwei Tan">
- Fixed javadoc for "MapUtils#toProperties(Map)".
- </action>
- <action issue="COLLECTIONS-389" dev="tn" type="fix" due-to="Shin Hwei Tan">
- Clarified javadoc for "TransformerUtils#mapTransformer" for null input.
- </action>
- <action issue="COLLECTIONS-388" dev="tn" type="fix" due-to="Shin Hwei Tan">
- Clarified javadoc for "FactoryUtils#prototypeFactory" for null input.
- </action>
- <action issue="COLLECTIONS-384" dev="ggregory" type="fix" due-to="Shin Hwei Tan">
- Fixed inconsistent javadoc for "MapUtils#synchronizedMap(Map)".
- </action>
- <action issue="COLLECTIONS-383" dev="tn" type="add" due-to="Adrian Cumiskey">
- Added "CollectionUtils#forAllDo" implementation which takes an "Iterator" as input.
- </action>
- <action issue="COLLECTIONS-382" dev="tn" type="update" due-to="Olivier Lamy">
- Change maven coordinates to "org.apache.commons.commons-collections4".
- </action>
- <action issue="COLLECTIONS-381" dev="sebb" type="update" due-to="Olivier Lamy">
- Move the project structure to a standard maven layout.
- </action>
- <action issue="COLLECTIONS-380" dev="tn" type="fix" due-to="Dave Brosius">
- Fixed infinite loop when calling "UnmodifiableBoundedCollection#unmodifiableBoundedCollection()".
- </action>
- <action issue="COLLECTIONS-379" dev="tn" type="fix" due-to="Shin Hwei Tan">
- Fixed javadoc for several methods wrt expected NullPointerExceptions.
- </action>
- <action issue="COLLECTIONS-375" dev="tn" type="add" due-to="Ivan Hristov">
- Added method "ListUtils#defaultIfNull(List, List)".
- </action>
- <action issue="COLLECTIONS-372" dev="tn" type="update">
- TransformingComparator now supports different types for its input/output values.
- </action>
- <action issue="COLLECTIONS-364" dev="sebb" type="fix">
- "DualTreeBidiMap" now uses the correct comparator for the reverse map during de-serialization.
- </action>
- <action issue="COLLECTIONS-363" dev="sebb" type="fix">
- "TransformedMap" in the package "splitmap" can now be serialized.
- </action>
- <action issue="COLLECTIONS-362" dev="brentworden" type="update" due-to="Jean-Noel Rouvignac">
- "CollectionUtils#filter(Iterable, Predicate)" will now return whether the collection
- has been modified.
- </action>
- <action issue="COLLECTIONS-361" dev="tn" type="add" due-to="Jean-Noel Rouvignac">
- Add method "CollectionUtils#filterInverse(Iterable, Predicate)".
- </action>
- <action issue="COLLECTIONS-360" dev="jochen" type="fix" due-to="Sai Zhang">
- "FilterListIterator#hasNext" does not throw a NullPointerException anymore
- to comply to the Java iterator specification.
- </action>
- <action issue="COLLECTIONS-359" dev="bayard" type="fix" due-to="Mark Shead">
- "ListUtils#intersection(List, List)" will now also work correctly if there
- are duplicate elements in the provided lists.
- </action>
- <action issue="COLLECTIONS-352" dev="bayard" type="fix" due-to="Adam Gent">
- "AbstractCollectionDecorator" will now use internally "decorated()" to access
- the decorated collection.
- </action>
- <action issue="COLLECTIONS-351" dev="bayard" type="remove" due-to="Henri Yandell">
- Removed features which are now supported by the JDK.
- </action>
- <action issue="COLLECTIONS-350" dev="bayard" type="fix" due-to="Michael Akerman">
- Removed debug output in "MapUtils#getNumber(Map)".
- </action>
- <action issue="COLLECTIONS-348" dev="brentworden" type="fix" due-to="Paul Benedict">
- Fixed javadoc for all "transformedXXX(XXX)" methods in the respective Utils classes
- to clarify that existing objects in the list are not transformed.
- </action>
- <action issue="COLLECTIONS-343" dev="mbenson" type="fix" due-to="Goran Hacek">
- Singleton classes in package "functors" are now correctly de-serialized.
- </action>
- <action issue="COLLECTIONS-341" dev="mbenson" type="update" due-to="Goran Hacek">
- "NOPClosure" is now a final class.
- </action>
- <action issue="COLLECTIONS-340" dev="mbenson" type="fix" due-to="Goran Hacek">
- Removed broken methods "equals(Object)" and "hashCode()" in class "NOPClosure".
- </action>
- <action issue="COLLECTIONS-336" dev="bayard" type="fix" due-to="sebb">
- Simplified exceptions as the cause is available from the parent.
- </action>
- <action issue="COLLECTIONS-335" dev="jochen" type="fix" due-to="sebb">
- Fixed cache assignment for "TreeBidiMap#entrySet".
- </action>
- <action issue="COLLECTIONS-334" dev="jochen" type="fix" due-to="sebb">
- Synchronized access to lock in "StaticBucketMap#size()".
- </action>
- <action issue="COLLECTIONS-332" dev="jochen" type="fix" due-to="Tom Parker">
- Added clarification to javadoc of "ListOrderedMap" that "IdentityMap" and
- "CaseInsensitiveMap" are not supported.
- </action>
- <action issue="COLLECTIONS-331" dev="jochen" type="fix" due-to="Michael Krkoska">
- Improve javadoc of "CollatingIterator" wrt the used "Comparator" and throw a
- NullPointerException in "CollatingIterator#least" if no comparator is set.
- </action>
- <action issue="COLLECTIONS-330" dev="mbenson" type="fix" due-to="Joerg Schaible">
- "LRUMap#keySet()#remove(Object)" will not throw a "ConcurrentModificationException" anymore.
- </action>
- <action issue="COLLECTIONS-328" dev="bayard" type="fix" due-to="Thomas Rogan, Jilles van Gurp">
- Improved performance of "ListUtils#intersection(List, List)".
- </action>
- <action issue="COLLECTIONS-327" dev="brentworden" type="add" due-to="sebb">
- Added serialVersionUID fields for "CompositeCollection", "CompositeSet",
- "EmptyMapMutator", "EmptySetMutator".
- </action>
- <action issue="COLLECTIONS-324" dev="tn" type="update" due-to="sebb">
- Fields transformer and decorated in class "TransformingComparator" are now final.
- </action>
- <action issue="COLLECTIONS-323" dev="jochen" type="fix" due-to="Maarten Brak">
- Changed behavior of "CaseInsensitiveMap" constructor to be compliant with "HashMap"
- in case the initial capacity is set to zero.
- </action>
- <action issue="COLLECTIONS-322" dev="tn" type="add" due-to="Thomas Vahrst">
- Added NodeListIterator and convenience methods in IteratorUtils to iterate over
- a org.w3c.dom.NodeList.
- </action>
- <action issue="COLLECTIONS-320" dev="bayard" type="fix" due-to="sebb">
- Improved performance of "StaticBucketMap#putAll(Map)" by iterating over the entry set.
- </action>
- <action issue="COLLECTIONS-319" dev="bayard" type="fix" due-to="sebb">
- Avoid redundant null check in "IteratorUtils#getIterator(Object)".
- </action>
- <action issue="COLLECTIONS-317" dev="bayard" type="fix" due-to="sebb">
- Use a private method to populate the object in "AbstractHashedMap(Map)".
- </action>
- <action issue="COLLECTIONS-316" dev="bayard" type="fix" due-to="ori">
- Fixed javadoc of "LRUMap" wrt to the maxSize parameter of the constructor.
- </action>
- <action issue="COLLECTIONS-313" dev="brentworden" type="add" due-to="David J. M. Karlsen">
- Added new abstract class "CatchAndRethrowClosure" that re-throws any checked exception
- as unchecked "FunctorException".
- </action>
- <action issue="COLLECTIONS-312" dev="tn" type="fix" due-to="Peter Lawrey, Gary Gregory">
- Use of final keyword where applicable, minor performance improvements by properly
- initializing the capacity of newly created collections when known in advance.
- </action>
- <action issue="COLLECTIONS-307" dev="tn" type="update" due-to="Christian Semrau, Thomas Vahrst">
- "SetUniqueList#subList()" will now return an unmodifiable list as changes to it
- may invalidate the parent list.
- </action>
- <action issue="COLLECTIONS-307" dev="bayard" type="fix" due-to="Christian Semrau">
- "SetUniqueList#subList()#contains(Object)" will now correctly check the subList
- rather than the parent list.
- </action>
- <action issue="COLLECTIONS-306" dev="brentworden" type="add" due-to="Chris Shayan">
- Added method "CollectionUtils#subtract(Iterable, Iterable, Predicate)".
- </action>
- <action issue="COLLECTIONS-304" dev="bayard" type="fix" due-to="Rafał Figas,Bjorn Townsend">
- "SetUniqueList#set(int, Object)" will now correctly enforce the uniqueness constraint.
- </action>
- <action issue="COLLECTIONS-303" dev="bayard" type="fix" due-to="Emmanuel Bourg">
- Improved javadoc for "Unmodifiable*" classes wrt behavior when the users tries
- to modify the collection.
- </action>
- <action issue="COLLECTIONS-298" dev="bayard" type="update" due-to="Benjamin Bentmann">
- Calling "CollectionUtils#sizeIsEmpty(null)" will now return true.
- </action>
- <action issue="COLLECTIONS-296" dev="tn" type="add" due-to="Julius Davies">
- Added methods "CollectionUtils#collate(...)" to merge two sorted Collections
- into a sorted List using the standard O(n) merge algorithm.
- </action>
- <action issue="COLLECTIONS-294" dev="bayard" type="fix" due-to="Benjamin Bentmann">
- "CaseInsensitiveMap" will now convert input strings to lower-case in a
- locale-independant manner.
- </action>
- <action issue="COLLECTIONS-293" dev="tn" type="add" due-to="Stephen Kestle">
- Added support for using custom "Equator" objects in "EqualPredicate".
- </action>
- <action issue="COLLECTIONS-289" dev="bayard" type="add" due-to="Fredrik Kjellberg">
- Added method "CollatingIterator#getIteratorIndex()".
- </action>
- <action issue="COLLECTIONS-256,COLLECTIONS-288" dev="bayard" type="fix" due-to="Paul Benedict">
- Fixed javadoc for "ListUtils#transformedList(List)" to clarify that existing objects
- in the list are not transformed.
- </action>
- <action issue="COLLECTIONS-286" dev="mbenson" type="add" due-to="Geoffrey De Smet">
- Added method "CollectionUtils#extractSingleton(Collection)".
- </action>
- <action issue="COLLECTIONS-285" dev="tn" type="add" due-to="Christian Gruenberg">
- Added serialization support for "TreeBidiMap".
- </action>
- <action issue="COLLECTIONS-280" dev="bayard" type="update" due-to="Chris Lewis">
- The predicate that rejected an object to be added to a "PredicatedCollection"
- is now contained in the respective exception message.
- </action>
- <action issue="COLLECTIONS-275" dev="tn" type="add" due-to="Stephen Kestle">
- Added "IndexedCollection" collection decorator which provides a map-like
- view on an existing collection.
- </action>
- <action issue="COLLECTIONS-272" dev="tn" type="add" due-to="Chaitanya Mutyala">
- Added serialization support for "FixedOrderComparator" and "TransformingComparator".
- </action>
- <action issue="COLLECTIONS-266" dev="bayard" type="fix" due-to="Joerg Schaible">
- "MultiKey" will now be correctly serialized/de-serialized.
- </action>
- <action issue="COLLECTIONS-265" dev="bayard" type="update" due-to="David Saff">
- "TreeBag" will now only accept "Comparable" objects as input when used with natural ordering.
- </action>
- <action issue="COLLECTIONS-263" dev="tn" type="add" due-to="John Hunsley">
- Added methods "MapUtils#populateMap(MultiMap, ...)" to support also "MultiMap" instances
- as input.
- </action>
- <action issue="COLLECTIONS-262" dev="bayard" type="fix" due-to="Lisen Mu">
- Fixed javadoc for methods "firstKey()" and "lastKey()" in class "AbstractLinkedMap".
- </action>
- <action issue="COLLECTIONS-261" dev="bayard" type="fix" due-to="ori">
- "Flat3Map#remove(Object)" will now return the correct value mapped to the removed key
- if the size of the map is less or equal 3.
- </action>
- <action issue="COLLECTIONS-260" dev="mbenson" type="add" due-to="Stephen Kestle">
- Added constructor "TransformingComparator(Transformer)".
- </action>
- <action issue="COLLECTIONS-258" dev="tn" type="add" due-to="Nathan Blomquist">
- Added "DualLinkedHashBidiMap" bidi map implementation.
- </action>
- <action issue="COLLECTIONS-255" dev="mbenson" type="fix" due-to="Henri Yandell">
- Removed unused variables in "TreeBidiMap".
- </action>
- <action issue="COLLECTIONS-251,COLLECTIONS-321" dev="mbenson" type="update" due-to="Stephen Kestle">
- The static factory methods have been renamed from "getInstance()" to a camel-case
- version of the class name, e.g. "truePredicate()" for class "TruePredicate".
- </action>
- <action issue="COLLECTIONS-249" dev="bayard" type="fix" due-to="Joe Kelly">
- "SetUniqueList.addAll(int, Collection)" now correctly add the collection at the
- provided index.
- </action>
- <action issue="COLLECTIONS-242" dev="skestle" type="add">
- Added "Equator" interface.
- </action>
- <action issue="COLLECTIONS-241" dev="brentworden" type="add" due-to="Elifarley Callado Coelho">
- Added "PassiveExpiringMap" map decorator.
- </action>
- <action issue="COLLECTIONS-240" dev="bayard" type="update" due-to="Wouter de Vaal">
- "MultiValueMap" is now serializable.
- </action>
- <action issue="COLLECTIONS-237" dev="tn" type="add" due-to="Nils Kaiser, Alan Mehlo">
- Added method "MultiValueMap#iterator()" to return a flattened version of
- "entrySet().iterator()". Clarified javadoc for "entrySet()" that the returned Entry
- objects are unflattened, i.e. the Entry object for a given key contains all values
- mapped to this key.
- </action>
- <action issue="COLLECTIONS-235" dev="bayard" type="add" due-to="Nathan Egge">
- Added method "ListUtils#indexOf(List, Predicate)".
- </action>
- <action issue="COLLECTIONS-232" dev="bayard" type="fix" due-to="Mark Hindess">
- Fixed several unit tests which were using parameters to "assertEquals(...)" in wrong order.
- </action>
- <action issue="COLLECTIONS-231" dev="tn" type="update" due-to="Torsten Curdt">
- Return concrete class in static factory methods instead of base class interface
- (except for Unmodifiable decorators).
- </action>
- <action issue="COLLECTIONS-230,COLLECTIONS-297,COLLECTIONS-318" dev="bayard" type="update" due-to="Stepan Koltsov,sebb">
- "CollectionUtils#size(Collection)" now returns 0 when called with null as input.
- </action>
- <action issue="COLLECTIONS-229" dev="scolebourne" type="remove">
- Removed deprecated classes and methods.
- </action>
- <action issue="COLLECTIONS-228" dev="scolebourne" type="fix">
- "MultiValueMap#put(Object, Object)" and "MultiValueMap#putAll(Object, Collection)"
- now correctly return if the map has changed by this operation.
- </action>
- <action issue="COLLECTIONS-226" dev="bayard" type="add" due-to="Vasily Ivanov">
- Added method "ListOrderedMap#putAll(int, Map)".
- </action>
- <action issue="COLLECTIONS-225" dev="tn" type="add" due-to="Sam Berlin, Roger Kapsi">
- Added new "Trie" interface with a first concrete implementation "PatriciaTrie"
- together with decorators "Unmodifiable" and "Synchronized".
- </action>
- <action issue="COLLECTIONS-223" dev="bayard" type="update" due-to="Vasily Ivanov">
- "CollectionUtils#addAll(...)" methods now return if the collection has been changed
- by this operation.
- </action>
- <action issue="COLLECTIONS-221" dev="bayard" type="update" due-to="Pal Denes">
- "CompositeCollection", "CompositeMap" and "CompositeSet" are now serializable.
- </action>
- <action issue="COLLECTIONS-219" dev="scolebourne" type="fix" due-to="Tom Leccese">
- "CollectionUtils#removeAll" wrongly called "ListUtils#retainAll".
- </action>
- <action issue="COLLECTIONS-218" dev="skestle" type="update">
- The "CollectionUtils#select(Collection, Predicate, Collection)" method will now
- return the output collection.
- </action>
- <action issue="COLLECTIONS-217" dev="scolebourne" type="fix" due-to="Matt Bishop">
- Calling "setValue(Object)" on any Entry returned by a "Flat3Map" will now
- correctly set the value for the current entry.
- </action>
- <action issue="COLLECTIONS-216" dev="scolebourne" type="fix" due-to="Hendrik Maryns">
- "MultiKey#toString()" will now use "Arrays#toString(List)".
- </action>
- <action issue="COLLECTIONS-213" dev="brentworden" type="add" due-to="Dusan Chromy">
- Added support for resettable iterators in "IteratorIterable".
- </action>
- <action issue="COLLECTIONS-194" dev="bayard" type="add" due-to="Dave Meikle">
- Added methods "MapUtils#populateMap(Map, Iterable, Transformer, ...)".
- </action>
- <action issue="COLLECTIONS-182" dev="mbenson" type="update" due-to="Jim Cakalic">
- "CollectionUtils#forAllDo(Collection, Closure)" now returns the provided closure.
- </action>
- <action issue="COLLECTIONS-110,COLLECTIONS-243,COLLECTIONS-245,COLLECTIONS-247,
- COLLECTIONS-253,COLLECTIONS-273,COLLECTIONS-282" dev="multiple" type="update">
- Make generic versions of all classes in collections.
- </action>
- <action issue="COLLECTIONS-8" dev="brentworden" type="add" due-to="Rune Peter Bjørnstad">
- Added class "ComparatorPredicate".
- </action>
- </release>
- <release version="3.2.2" date="2015-11-15" description="This is a security and bugfix release.">
- <action issue="COLLECTIONS-580" dev="tn" type="update">
- Serialization support for unsafe classes in the functor package is disabled
- by default as this can be exploited for remote code execution attacks.
- To re-enable the feature the system property "org.apache.commons.collections.enableUnsafeSerialization"
- needs to be set to "true".
- Classes considered to be unsafe are: CloneTransformer, ForClosure, InstantiateFactory,
- InstantiateTransformer, InvokerTransformer, PrototypeCloneFactory,
- PrototypeSerializationFactory, WhileClosure.
- </action>
- <action issue="COLLECTIONS-538" dev="tn" type="fix" due-to="Trejkaz">
- "ExtendedProperties" will now use a privileged action to access the
- "file.separator" system property. In case the class does not have
- permission to read system properties, the "File#separator" field will
- be used instead.
- </action>
- <action issue="COLLECTIONS-447" dev="tn" type="fix" due-to="Jeffrey Barnes">
- Tree traversal with a TreeListIterator will not be affected anymore by
- the removal of an element directly after a call to previous().
- </action>
- <action issue="COLLECTIONS-444" dev="tn" type="fix" due-to="Thomas Vahrst, John Vasileff">
- SetUniqueList.set(int, Object) now works correctly if the object to be inserted
- is already placed at the given position.
- </action>
- <action issue="COLLECTIONS-350" dev="bayard" type="fix" due-to="Michael Akerman">
- Removed debug output in "MapUtils#getNumber(Map)".
- </action>
- <action issue="COLLECTIONS-335" dev="jochen" type="fix" due-to="sebb">
- Fixed cache assignment for "TreeBidiMap#entrySet".
- </action>
- <action issue="COLLECTIONS-334" dev="jochen" type="fix" due-to="sebb">
- Synchronized access to lock in "StaticBucketMap#size()".
- </action>
- <action issue="COLLECTIONS-307" dev="bayard" type="fix" due-to="Christian Semrau">
- "SetUniqueList#subList()#contains(Object)" will now correctly check the subList
- rather than the parent list.
- </action>
- <action issue="COLLECTIONS-304" dev="bayard" type="fix" due-to="Rafał Figas,Bjorn Townsend">
- "SetUniqueList#set(int, Object)" will now correctly enforce the uniqueness constraint.
- </action>
- <action issue="COLLECTIONS-294" dev="bayard" type="fix" due-to="Benjamin Bentmann">
- "CaseInsensitiveMap" will now convert input strings to lower-case in a
- locale-independent manner.
- </action>
- <action issue="COLLECTIONS-266" dev="bayard" type="fix" due-to="Joerg Schaible">
- "MultiKey" will now be correctly serialized/de-serialized.
- </action>
- <action issue="COLLECTIONS-261" dev="bayard" type="fix" due-to="ori">
- "Flat3Map#remove(Object)" will now return the correct value mapped to the removed key
- if the size of the map is less or equal 3.
- </action>
- <action issue="COLLECTIONS-249" dev="bayard" type="fix" due-to="Joe Kelly">
- "SetUniqueList.addAll(int, Collection)" now correctly add the collection at the
- provided index.
- </action>
- <action issue="COLLECTIONS-228" dev="scolebourne" type="fix">
- "MultiValueMap#put(Object, Object)" and "MultiValueMap#putAll(Object, Collection)"
- now correctly return if the map has changed by this operation.
- </action>
- <action issue="COLLECTIONS-219" dev="scolebourne" type="fix" due-to="Tom Leccese">
- "CollectionUtils#removeAll" wrongly called "ListUtils#retainAll".
- </action>
- <action issue="COLLECTIONS-217" dev="scolebourne" type="fix" due-to="Matt Bishop">
- Calling "setValue(Object)" on any Entry returned by a "Flat3Map" will now
- correctly set the value for the current entry.
- </action>
- </release>
- </body>
-</document>
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<document>
+ <properties>
+ <title>Apache Commons Collections Release Notes</title>
+ </properties>
+ <body>
+ <release version="4.5" date="2020-MM-DD" description="Maintenance release.">
+ <action issue="COLLECTIONS-697" dev="eax" type="update" due-to="Ranjan George">
+ JavaDoc for FixedSizeList should warn that modifying underlying list is still allowed and is not prevented
+ </action>
+ <action issue="COLLECTIONS-738" dev="kinow" type="update" due-to="Pengyu Nie">
+ Remove the redundant assertNull in IterableUtilsTest.find and update Javadocs.
+ </action>
+ <action issue="COLLECTIONS-724" dev="ggregory" type="update" due-to="Eitan Adler">
+ Simplify two remove-if loops #77.
+ </action>
+ <action issue="COLLECTIONS-726" dev="ggregory" type="update" due-to="liuhaozzu, Gary Gregory">
+ Add lambdas function to provide default values in MapUtils #81.
+ </action>
+ <action issue="COLLECTIONS-727" dev="ggregory" type="fix" due-to="XiangzheXu, XZ-X">
+ A potential misleading comment #82.
+ </action>
+ <action issue="COLLECTIONS-679" dev="ggregory" type="fix" due-to="David Mollitor, Mikko Maunu">
+ Using existing class in example given in Javadocs. #85.
+ </action>
+ <action issue="COLLECTIONS-729" dev="ggregory" type="fix" due-to="dota17">
+ Add test cases to IteratorUtilsTest #86.
+ </action>
+ <action dev="ggregory" type="fix" due-to="dota17">
+ Fix typos in release notes and Javadoc for AbstractHashedMap and AbstractHashedMapTest #88.
+ </action>
+ <action issue="COLLECTIONS-704" dev="ggregory" type="update" due-to="dota17">
+ Update size to capacity for GrowthList #90.
+ </action>
+ <action dev="ggregory" type="add" due-to="dota17">
+ Test subMap and tailMap #94.
+ </action>
+ <action dev="ggregory" type="add" due-to="dota17">
+ Add junit for add, remove, setCount and entrySet in the UnmodifiableMultiSetTest #95.
+ </action>
+ <action dev="ggregory" type="add" due-to="dota17">
+ Add two test cases in UnmodifiableQueueTest #96.
+ </action>
+ <action dev="ggregory" type="add" due-to="dota17">
+ Update two test cases in AbstractMultiValuedMapTest testPutAll_map1 testPutAll_map2 #97.
+ </action>
+ <action dev="ggregory" type="update" due-to="dota17">
+ TransformedSortedBagTest should work with TransformedSortedBag, not TransformedBag #98.
+ </action>
+ <action dev="ggregory" type="add" due-to="dota17">
+ Add a test case for AbstractMultiValuedMapTest testToString() #100.
+ </action>
+ <action dev="ggregory" type="update" due-to="dota17">
+ Update some map test cases #104.
+ </action>
+ <action dev="ggregory" type="update" due-to="dota17">
+ Add three test cases in UnmodifiableQueueTest #105.
+ </action>
+ <action issue="COLLECTIONS-674" dev="ggregory" type="add" due-to="dota17">
+ Add CollectionUtils removeRange, removeCount #91.
+ </action>
+ <action dev="ggregory" type="add" due-to="dota17">
+ Add a test case AbstractMultiValuedMapTest#testMultiValuedMapIterator() #108.
+ </action>
+ <action dev="ggregory" type="update" due-to="dota17">
+ Remove the parentheses in the error message in CircularFifoQueue #107.
+ </action>
+ <action dev="ggregory" type="add" due-to="dota17">
+ Add junit for getWithNull and subList in LazyListTest; #103.
+ </action>
+ <action dev="ggregory" type="add" due-to="dota17">
+ Add test cases to ArrayListValuedHashMapTest; #106.
+ </action>
+ <action dev="ggregory" type="add" due-to="dota17">
+ Add test cases in UnmodifiableMultiValuedMapTest; #102.
+ </action>
+ <action dev="ggregory" type="update" due-to="Gary Gregory">
+ [test] org.easymock:easymock 4.0.2 -> 4.1.
+ </action>
+ <action issue="COLLECTIONS-734" dev="ggregory" type="fix" due-to="Chen">
+ Encountered an IllegalStateException while traversing with Flat3Map.entrySet(). #115.
+ </action>
+ <action dev="ggregory" type="update" due-to="Chen">
+ Fix inconsistent @throws comments in ListOrderedSet #125.
+ </action>
+ <action issue="COLLECTIONS-740" dev="ggregory" type="fix" due-to="Pengyu Nie">
+ Add missing @throws comment for SwitchTransformer.switchTransformer. #124.
+ </action>
+ <action issue="COLLECTIONS-739" dev="ggregory" type="fix" due-to="Pengyu Nie">
+ Fix inconsistent @throws comments in DefaultedMap #123.
+ </action>
+ <action dev="ggregory" type="fix" due-to="Dominik Stadler">
+ Fix links to release notes and update contents for 4.4 #127.
+ </action>
+ <action issue="COLLECTIONS-744" dev="ggregory" type="add" due-to="Gary Gregory">
+ Add org.apache.commons.collections4.EnumerationUtils.asIterable(Enumeration).
+ </action>
+ <action issue="COLLECTIONS-728" dev="ggregory" type="add" due-to="Claude Warren">
+ BloomFilter contribution.
+ </action>
+ <action dev="ggregory" type="update" due-to="Gary Gregory">
+ [test] Update JUnit from 4.12 to 4.13.
+ </action>
+ <action dev="ggregory" type="update" due-to="Gary Gregory">
+ [build] Update Apache commons-parent from 48 to 50.
+ </action>
+ <action issue="COLLECTIONS-746" dev="ggregory" type="add" due-to="Gary Gregory">
+ Add org.apache.commons.collections4.properties.PropertiesFactory.EMPTY_PROPERTIES.
+ </action>
+ <action dev="ggregory" type="update" due-to="Gary Gregory">
+ [build] Update Jacoco from 0.8.4 to 0.8.5.
+ </action>
+ <action dev="ggregory" type="update" due-to="Gary Gregory">
+ [test] Update org.easymock:easymock 4.1 -> 4.2.
+ </action>
+ <action issue="COLLECTIONS-747" dev="ggregory" type="fix" due-to="Gary Gregory, Walter Laan">
+ MultiKey.getKeys class cast exception.
+ </action>
+ <action issue="COLLECTIONS-748" dev="ggregory" type="update" due-to="Gary Gregory">
+ Let org.apache.commons.collections4.properties.[Sorted]PropertiesFactory accept XML input.
+ </action>
+ </release>
+ <release version="4.4" date="2019-07-05" description="Maintenance release.">
+ <action issue="COLLECTIONS-710" dev="ggregory" type="fix" due-to="Yu Shi, Gary Gregory">
+ NullPointerExceptions in CompositeCollection, CompositeSet, and CompositeMap.
+ </action>
+ <action issue="COLLECTIONS-715" dev="ggregory" type="add" due-to="morningmemo, Gary Gregory">
+ Implement Collection's removeIf().
+ </action>
+ <action issue="COLLECTIONS-718" dev="ggregory" type="update" due-to="Eitan Adler">
+ Fix LRUMap exception message.
+ </action>
+ <action issue="COLLECTIONS-719" dev="ggregory" type="add" due-to="Gary Gregory">
+ Create a PropertiesFactory and SortedPropertiesFactory.
+ </action>
+ <action issue="COLLECTIONS-719" dev="ggregory" type="add" due-to="Stephan Windmüller, Bruno P. Kinoshita">
+ Support Transformer for LazyList #52.
+ </action>
+ <action issue="COLLECTIONS-723" dev="ggregory" type="add" due-to="Eitan Adler, SOC, Bruno P. Kinoshita">
+ Make use of FunctionalInterface #48.
+ </action>
+ <action issue="COLLECTIONS-716" dev="ggregory" type="update" due-to="Sebb">
+ Don't include email address in Exception messages.
+ </action>
+ </release>
+ <release version="4.3" date="2018-12-21" description="Update from Java 7 to Java 8, bug fixes, and small changes.">
+ <action issue="COLLECTIONS-691" dev="kinow" type="fix" due-to="Eitan Adler">
+ Use boolean operator for boolean result.
+ </action>
+ <action issue="COLLECTIONS-688" dev="ggregory" type="update">
+ Update platform requirement from Java 7 to 8.
+ </action>
+ <action issue="COLLECTIONS-689" dev="ggregory" type="update" due-to="Richard Walker">
+ Link to Javadoc API broken.
+ </action>
+ <action issue="COLLECTIONS-692" dev="ggregory" type="update" due-to="Gary Gregory, Eitan Adler">
+ Replace use of deprecated Class#newInstance() PR #49.
+ </action>
+ <action issue="COLLECTIONS-696" dev="ggregory" type="add" due-to="Maxim Solodovnik">
+ AbstractReferenceMap made easier for subclassing; PR #51.
+ </action>
+ <action issue="COLLECTIONS-701" dev="ggregory" type="fix" due-to="Shin Hong, Don Jeba">
+ StackOverflowError in SetUniqueList.add() when it receives itself.
+ </action>
+ <action issue="COLLECTIONS-703" dev="ggregory" type="fix" due-to="Tomas Tulka">
+ The PassiveExpiringMap#put() method should return the previous record only if not expired.
+ </action>
+ <action issue="COLLECTIONS-706" dev="ggregory" type="fix" due-to="Richard Eckart de Castilho, Gary Gregory">
+ Add SetUtils.unmodifiableSet(T... items) method.
+ </action>
+ <action issue="COLLECTIONS-709" dev="ggregory" type="fix" due-to="Robert Wertman">
+ MultiSet.Entry::getCount() isn't 0 after removing the last element.
+ </action>
+ </release>
+ <release version="4.2" date="2018-07-11" description="Update from Java 6 to Java 7, bug fixes, and small changes.">
+ <action issue="COLLECTIONS-681" dev="kinow" type="add" due-to="Stephan Fuhrmann">
+ Add test for MultiSetUtils
+ </action>
+ <action issue="COLLECTIONS-599" dev="ggregory" type="fix" due-to="Tejas Patel, Saleem Akbar, Gary Gregory">
+ HashEntry array object naming data initialized with double the size during deserialization.
+ </action>
+ <action issue="COLLECTIONS-662" dev="chtompki" type="fix" due-to="Vamsi Kavuri">
+ Unit tests MapUtilsTest and ListIteratorWrapperTest no longer fail on Java 9.
+ </action>
+ <action issue="COLLECTIONS-661" dev="kinow" type="fix">
+ Intermittent test failures in Windows for HashSetValuedHashMap.
+ </action>
+ <action issue="COLLECTIONS-660" dev="kinow" type="fix">
+ Uncomment test in AbstractMapTest regarding LRUMap equals.
+ </action>
+ <action issue="COLLECTIONS-658" dev="britter" type="add">
+ Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility.
+ </action>
+ <action issue="COLLECTIONS-656" dev="ggregory" type="fix">
+ Fix site build on Java 8.
+ </action>
+ <action issue="COLLECTIONS-653" dev="kinow" type="fix">
+ Update Javadoc to Build on Java 1.8.
+ </action>
+ <action issue="COLLECTIONS-606" dev="chtompki" type="fix" due-to="Vamsi Kavuri">
+ Build status, Coverage status and Maven central weren't in README.md
+ </action>
+ <action issue="COLLECTIONS-602" dev="kinow" type="update" due-to="John Mark">
+ Improve efficiency of DefaultedMap.get.
+ </action>
+ <action issue="COLLECTIONS-603" dev="kinow" type="update" due-to="Artem Konovalov">
+ Small improvements for generics, conditional statements, and warnings suppressions.
+ </action>
+ <action issue="COLLECTIONS-655" dev="ggregory" type="update">
+ Update platform from Java 6 to Java 7.
+ </action>
+ <action issue="COLLECTIONS-594" dev="ggregory" type="fix" due-to="Javen O'Neal">
+ Web site spelling error: MultiValuedMapeList.
+ </action>
+ <action issue="COLLECTIONS-597" dev="ggregory" type="fix" due-to="Enrique">
+ Correction of Javadoc for org.apache.commons.collections4.functors.CatchAndRethrowClosure.
+ </action>
+ <action issue="COLLECTIONS-589" dev="ggregory" type="add" due-to="Gary Gregory">
+ Add null-safe MapUtils.size(Map<?, ?>) method.
+ </action>
+ <action issue="COLLECTIONS-586" dev="ggregory" type="add" due-to="Shailender Bathula, Gary Gregory">
+ PatriciaTrie prefixMap clear throws NullPointerException.
+ </action>
+ <action issue="COLLECTIONS-654" dev="ggregory" type="add">
+ Add class SortedProperties to sort keys.
+ </action>
+ <action issue="COLLECTIONS-666" dev="ggregory" type="update" due-to="BELUGA BEHR">
+ org.apache.commons.collections4.ListUtils.union(List, List) should pre-allocate result list.
+ </action>
+ <action issue="COLLECTIONS-669" dev="ggregory" type="update" due-to="BELUGA BEHR, Gary Gregory">
+ Update org.apache.commons.collections4.CollectionUtils.addAll(Collection<C>, C[]) to addAll(Collection<C>, C...).
+ </action>
+ <action issue="COLLECTIONS-668" dev="ggregory" type="add" due-to="Gary Gregory">
+ Add CollectionUtils containsAny method for primitive array: org.apache.commons.collections4.CollectionUtils.containsAny(Collection<?>, T...).
+ </action>
+ <action issue="COLLECTIONS-575" dev="ggregory" type="add" due-to="Guram Savinov, Grzegorz Rożniecki, Bruno P. Kinoshita, Gary Gregory">
+ Synchronized queue wrapper in QueueUtils.
+ </action>
+ <action issue="COLLECTIONS-670" dev="ggregory" type="add" due-to="Gary Gregory">
+ Add org.apache.commons.collections4.IteratorUtils.first(Iterator).
+ </action>
+ <action issue="COLLECTIONS-671" dev="ggregory" type="add" due-to="Gary Gregory">
+ Add org.apache.commons.collections4.IterableUtils.first(Iterable).
+ </action>
+ <action issue="COLLECTIONS-678" dev="ggregory" type="fix" due-to="Oscar Luis Vera Pérez">
+ The verification of unsupported iterator methods is not complete.
+ </action>
+ <action issue="COLLECTIONS-673" dev="ggregory" type="fix" due-to="John Mark, Stephan Fuhrmann">
+ ListUtils.partition potential integer overflow.
+ </action>
+ </release>
+ <release version="4.1" date="2015-11-28" description="This is a security and minor release.">
+ <action issue="COLLECTIONS-508" dev="tn" type="add">
+ Added new interfaces "MultiValuedMap", "ListValuedMap" and "SetValuedMap"
+ as a replacement for "MultiMap". Decorators and implementations reside in
+ the "multimap" package and a "MultiMapUtils" class has been added.
+ The existing interface "MultiMap" as well as the concrete implementation
+ "MultiValueMap" has been deprecated.
+ </action>
+ <action issue="COLLECTIONS-551" dev="tn" type="update">
+ Deprecated various method in "CollectionUtils" in favor of similar
+ methods in the newly introduced "IterableUtils".
+ </action>
+ <action issue="COLLECTIONS-580" dev="tn" type="update">
+ Serialization support for unsafe classes in the functor package
+ has been removed as this can be exploited for remote code execution
+ attacks. Classes considered to be unsafe are: CloneTransformer,
+ ForClosure, InstantiateFactory, InstantiateTransformer, InvokerTransformer,
+ PrototypeCloneFactory, PrototypeSerializationFactory, WhileClosure.
+ </action>
+ <action issue="COLLECTIONS-580" dev="tn" type="fix">
+ Added validation when de-serializing a "MultiValueMap#ReflectionFactory":
+ only Collection classes are allowed, otherwise an UnsupportedOperationException
+ will be thrown during de-serialization.
+ </action>
+ <action issue="COLLECTIONS-567" dev="tn" type="add">
+ Added new MultiSet interface which is intended to be a replacement for
+ the Bag interface. The main difference is that a MultiSet is fully compatible
+ to the Collection contract.
+ </action>
+ <action issue="COLLECTIONS-576" dev="tn" type="fix" due-to="Stephan Roch">
+ Subclasses of MultiKey did not re-calculate their hashcode after de-serialization.
+ </action>
+ <action issue="COLLECTIONS-572" dev="tn" type="add">
+ Added set operations to "SetUtils": union, difference, intersection and disjunction.
+ The operations return a view of the result that is backed by the input sets.
+ </action>
+ <action issue="COLLECTIONS-570" dev="tn" type="update">
+ All constructors and static factory methods will now throw a "NullPointerException" if
+ a required input argument is null. Previously sometimes a "IllegalArgumentException" was used.
+ </action>
+ <action issue="COLLECTIONS-571" dev="tn" type="update">
+ Deprecated methods "synchronizedCollection(Collection)" and "unmodifiableCollection(Collection)"
+ in class "CollectionUtils", the corresponding methods in "java.util.Collections" should be used instead.
+ </action>
+ <action issue="COLLECTIONS-566" dev="tn" type="fix">
+ "IteratorUtils#collate(...)" methods did not use natural ordering when a
+ null comparator was provided.
+ </action>
+ <action issue="COLLECTIONS-557" dev="tn" type="add" due-to="Philippe Mouawad">
+ Added support to specify the initial size of a "LRUMap".
+ </action>
+ <action issue="COLLECTIONS-565" dev="tn" type="add">
+ Added decorators for "NavigableSet" interface.
+ </action>
+ <action issue="COLLECTIONS-464,COLLECTIONS-442" dev="tn" type="add">
+ Added new class "FluentIterable" to support a fluent API for manipulating
+ Iterable instances. Additionally various supporting methods have been
+ added to "IterableUtils" and "IteratorUtils".
+ </action>
+ <action issue="COLLECTIONS-464" dev="tn" type="add">
+ Added new "ZippingIterator" and factory methods "IteratorUtils#zippingIterator(...)".
+ </action>
+ <action issue="COLLECTIONS-464" dev="tn" type="add">
+ Added new decorator "SkippingIterator" and factory methods "IteratorUtils#skippingIterator(...)".
+ </action>
+ <action issue="COLLECTIONS-556" dev="tn" type="add">
+ Added method "SetUtils#newIdentityHashSet()" which returns a new identity HashSet
+ using reference-equality instead of object-equality.
+ </action>
+ <action issue="COLLECTIONS-562" dev="tn" type="update">
+ Upgraded minimum java requirement to Java 6 (up from Java 5).
+ </action>
+ <action issue="COLLECTIONS-395" dev="tn" type="add" due-to="David Hawthorne">
+ Added method "LRUMap#get(Object, boolean)" that allows to query the map
+ without affecting the least recently used order.
+ </action>
+ <action issue="COLLECTIONS-558" dev="tn" type="fix" due-to="Felix Rabe">
+ Changed return type of "ListOrderedSet#remove(int)" from Object to the generic type parameter.
+ </action>
+ <action issue="COLLECTIONS-555" dev="tn" type="fix" due-to="M Kim">
+ Added clarification to javadoc of "TreeBag#add(Object)" wrt null arguments.
+ </action>
+ <action issue="COLLECTIONS-427" dev="tn" type="add" due-to="Gonçalo Marques">
+ Added "toString(...)" methods to newly created "IterableUtils" and existing "IteratorUtils"
+ to get a string representation of an Iterable/Iterator instance similar to "Arrays#toString(...)".
+ </action>
+ <action issue="COLLECTIONS-427" dev="tn" type="fix">
+ Reverted performance improvement for "SetUniqueList#retainAll(Collection)"
+ introduced in 4.0. Added clarifying javadoc wrt runtime complexity instead.
+ </action>
+ <action issue="COLLECTIONS-426" dev="tn" type="fix">
+ Reverted performance improvement for "ListOrderedSet#retainAll(Collection)"
+ introduced in 4.0. Added clarifying javadoc wrt runtime complexity instead.
+ </action>
+ <action issue="COLLECTIONS-530" dev="tn" type="fix" due-to="Erik">
+ Added a Builder for "PredicatedCollection". Elements added to the builder
+ that fail the predicate will not throw an IllegalArgumentException. The builder
+ supports creating predicated lists, bags, sets and queues.
+ </action>
+ <action issue="COLLECTIONS-545" dev="tn" type="fix" due-to="Oswaldo Olivo">
+ Documented runtime complexity of "CollectionUtils#removeAll(Collection, Collection).
+ </action>
+ <action issue="COLLECTIONS-543" dev="tn" type="fix">
+ "AbstractCollectionDecorator" doesn't forward equals and hashCode anymore.
+ </action>
+ <action issue="COLLECTIONS-544" dev="tn" type="fix" due-to="Oswaldo Olivo">
+ Documented runtime complexity of "CollectionUtils#retainAll(Collection, Collection).
+ </action>
+ <action issue="COLLECTIONS-542" dev="tn" type="fix">
+ "AbstractHashedMap" still inherits from "AbstractMap", contrary to what
+ the class javadoc stated. The inheritance will now be removed in v5.0.
+ </action>
+ <action issue="COLLECTIONS-539" dev="tn" type="add" due-to="Guram Savinov">
+ Changed scope of "CircularFifoQueue#isAtFullCapacity()" to public.
+ </action>
+ <action issue="COLLECTIONS-525" dev="tn" type="fix" due-to="Zigler Zhang">
+ The map returned by "PatriciaTrie#prefixMap()" did not contain all keys
+ that are prefixed by the given search key in some rare cases.
+ </action>
+ <action issue="COLLECTIONS-511" dev="tn" type="add" due-to="Nathan Blomquist, Brent Worden">
+ Added new methods "IterableUtils#partition(...)" to partition an input collection
+ into separate output collections based on evaluation of one or more predicates.
+ </action>
+ <action issue="COLLECTIONS-537" dev="tn" type="fix" due-to="Frank Jakop">
+ Harmonized signature of factory methods for functor-related classes which take
+ a collection as input with their array counterparts.
+ </action>
+ <action issue="COLLECTIONS-540" dev="tn" type="fix" due-to="Daniel Stewart, Issam El Atif">
+ Added overloaded method "CollectionUtils#get(Enumeration, int)" and simplified
+ code for "CollectionUtils#get(Object, int)".
+ </action>
+ <action issue="COLLECTIONS-536" dev="tn" type="fix" due-to="Tagir Valeev">
+ Improved check for null input in "MapUtils#putAll(Map, Object[])".
+ </action>
+ <action issue="COLLECTIONS-534" dev="tn" type="fix" due-to="Oswaldo Olivo">
+ Added clarifying javadoc wrt runtime complexity of "CollectionBag#retainAll".
+ </action>
+ <action issue="COLLECTIONS-529" dev="tn" type="add" due-to="Alexander Muthmann, Dipanjan Laha">
+ Added methods "removeAll(...)" and "retainAll(...)" to "CollectionUtils" that perform
+ equality checks using the provided "Equator" object instead of "Object#equals()".
+ </action>
+ <action issue="COLLECTIONS-531" dev="tn" type="fix" due-to="Dipanjan Laha">
+ Use correct type bounds in
+ "CollectionUtils#isEqualCollection(Collection, Collection, Equator)" to
+ prevent a "ClassCastException" at runtime for invalid inputs.
+ </action>
+ <action issue="COLLECTIONS-523" dev="tn" type="fix" due-to="Thiago Andrade">
+ Removed unneeded private method in "PassiveExpiringMap".
+ </action>
+ <action issue="COLLECTIONS-516" dev="tn" type="fix" due-to="Cyrille Artho">
+ Added clarification to the javadoc of "MapUtils#toProperties(Map)" in case
+ of null keys/values.
+ </action>
+ <action issue="COLLECTIONS-524" dev="tn" type="fix" due-to="J Goodfellow">
+ "ListOrderedSet#listOrderedSet(List)" did not remove duplicates from the
+ input list as advertised in the javadoc.
+ </action>
+ <action issue="COLLECTIONS-521" dev="tn" type="fix" due-to="Maxime Nay">
+ "MultiKeyMap" was throwing a "NullPointerException" for various operations
+ if two key arguments have been used and the second was "null".
+ </action>
+ <action issue="COLLECTIONS-522" dev="tn" type="fix" due-to="Erik">
+ Updated code example for "PredicatedList".
+ </action>
+ <action issue="COLLECTIONS-512" dev="tn" type="fix" due-to="Cyrille Artho">
+ "TransformingComparator" and "FixedOrderComparator" did not comply with
+ the contract of "Object#equals".
+ </action>
+ <action issue="COLLECTIONS-510" dev="tn" type="fix" due-to="Hollis Waite">
+ Fix compilation errors when using source level 1.8 and a recent java 8 compiler.
+ </action>
+ <action issue="COLLECTIONS-509" dev="tn" type="fix">
+ Clarified javadoc of "CollectionBag" wrt changes from the original Bag interface.
+ </action>
+ <action issue="COLLECTIONS-507" dev="tn" type="fix" due-to="Gerson">
+ Removed wrong type bounds for "ComparatorUtils#chainedComparator(...)".
+ </action>
+ <action issue="COLLECTIONS-506" dev="tn" type="fix" due-to="Anthony Communier">
+ Added javadoc clarification to class "CollectionUtils" that input objects which
+ override "Object#equals(Object)" must also maintain the general contract of
+ "Object#hashCode()" as various utility methods take advantage of sets/maps/bags.
+ </action>
+ <action issue="COLLECTIONS-503" dev="tn" type="add" due-to="Josh Cain">
+ Added new transformer "IfTransformer" and factory methods "TransformerUtils#ifTransformer(...)"
+ which replace "TransformerUtils#switchTransformer(Predicate, Transformer, Transformer)".
+ </action>
+ <action issue="COLLECTIONS-471" dev="tn" type="add" due-to="Radford Tam">
+ Added new decorator "BoundedIterator" and factory methods "IteratorUtils#boundedIterator(...)".
+ </action>
+ </release>
+ <release version="4.0" date="2013-11-27" description="
+This is a major release: It combines bug fixes, new features and
+changes to existing features.
+
+Most notable changes are: use of generics and other language features introduced in Java 5 (varargs, Iterable),
+removed deprecated classes / methods and features which are now supported by the JDK,
+replaced Buffer interface with java.util.Queue,
+added concept of split maps with respective interfaces Put / Get (see also package splitmap),
+added new Trie interface together with an implementation of a Patricia Trie.
+
+Because of the base package name change, this release can be used together
+with earlier versions of Commons Collections.
+The minimal version of the Java platform required to compile and use
+Commons Collections is Java 5.
+Users are encouraged to upgrade to this version as, in addition to new
+features, this release includes numerous bug fixes.
+ ">
+ <action issue="COLLECTIONS-502" dev="tn" type="update">
+ Resolved generic parameter inconsistency for various static fields, e.g. BagUtils.EMPTY_BAG,
+ TruePredicate.INSTANCE and many others. All accessible static fields use raw types so that
+ they can be used directly without explicit casting. To avoid compiler warnings about unchecked
+ conversion and/or rawtypes use the corresponding factory methods, e.g. BagUtils.emptyBag().
+ </action>
+ <action issue="COLLECTIONS-501" dev="tn" type="update">
+ Renamed methods "V MultiKeyMap#remove(Object, Object, ...)" to
+ "V MultiKeyMap#removeMultiKey(Object, Object, ...)" to avoid future conflicts
+ with a default method of the Map interface in Java 8.
+ </action>
+ <action issue="COLLECTIONS-500" dev="tn" type="update">
+ Renamed "V MultiMap#remove(K, V)" to "boolean MultiMap#removeMapping(K, V)"
+ to avoid future conflicts with a default method of the Map interface in Java 8.
+ </action>
+ <action issue="COLLECTIONS-499" dev="tn" type="update">
+ Refactored the test framework for Bag implementations to extend from
+ "AbstractCollectionTest" by decorating the concrete Bag instance with
+ a CollectionBag or CollectionSortedBag.
+ </action>
+ <action issue="COLLECTIONS-498" dev="tn" type="fix">
+ "CollectionBag" will now also respect the contract of the decorated bag in case
+ a null argument is provided to either removeAll or retainAll.
+ </action>
+ <action issue="COLLECTIONS-497" dev="tn" type="add">
+ Added bag decorator "CollectionSortedBag" which decorates a SortedBag to make it
+ comply with the Collection contract.
+ </action>
+ <action issue="COLLECTIONS-496" dev="tn" type="update">
+ "UnmodifiableBoundedCollection" does now also implement the marker interface "Unmodifiable"
+ similar as all other unmodifiable decorators.
+ </action>
+ <action issue="COLLECTIONS-495" dev="tn" type="fix">
+ "UnmodifiableTrie#unmodifiableTrie(Trie)" will not decorate again an already
+ unmodifiable Trie. Also the return type has been changed to "Trie" to be consistent
+ with other Unmodifiable decorators.
+ </action>
+ <action issue="COLLECTIONS-494" dev="tn" type="update" due-to="Emmanuel Bourg">
+ Moved "Equator" interface to base package for consistency.
+ </action>
+ <action issue="COLLECTIONS-488" dev="tn" type="add" due-to="Josh Cain">
+ Added "CollectionsUtils#matchesAll(Iterable, Predicate)" to test if all elements
+ of a collection match a given predicate.
+ </action>
+ <action issue="COLLECTIONS-485" dev="tn" type="fix" due-to="Hollis Waite">
+ Accept wildcard input where possible, e.g. in copy-constructors, Unmodifiable* decorators
+ and iterators.
+ </action>
+ <action issue="COLLECTIONS-481" dev="tn" type="fix" due-to="Hollis Waite">
+ No collision detection/resolution was performed when calling "CompositeSet#addComposited(...)"
+ with more than one Set as argument. Additionally use varargs parameters instead of arrays
+ in CompositeSet and CompositeCollection constructor and addComposited method.
+ </action>
+ <action issue="COLLECTIONS-480" dev="tn" type="update" due-to="Hollis Waite">
+ Narrow return type of "BidiMap#values()" to Set as the values are required to be unique.
+ </action>
+ <action issue="COLLECTIONS-475" dev="tn" type="fix">
+ Fixed conversion of timeout parameters in "PassiveExpiringMap".
+ </action>
+ <action issue="COLLECTIONS-474" dev="sebb" type="fix" due-to="Ning Chen">
+ Exception in "ListOrderedMap#putAll" if map contains null values.
+ </action>
+ <action issue="COLLECTIONS-473" dev="tn" type="update" due-to="sebb">
+ Made field "collection" in class "AbstractCollectionDecorator" private and added
+ setter "setCollection(Collection)" with scope protected to set the decorated collection
+ during de-serialization.
+ </action>
+ <action issue="COLLECTIONS-472" dev="tn" type="fix" due-to="Adrian Nistor">
+ Improved performance of "AbstractMapBag#containsAll(Collection)" by returning immediately
+ after a difference has been found.
+ </action>
+ <action issue="COLLECTIONS-470" dev="tn" type="update" due-to="sebb">
+ Renamed class "TransformedMap" in package "splitmap" to "TransformedSplitMap" to avoid
+ name clash with similar class in package "map".
+ </action>
+ <action issue="COLLECTIONS-468" dev="tn" type="add">
+ Added bag decorator "CollectionBag" which decorates a bag to make it comply with the
+ Collection contract.
+ </action>
+ <action issue="COLLECTIONS-466" dev="tn" type="update">
+ Replaced "Collection" with "Iterable" for method arguments where applicable.
+ </action>
+ <action issue="COLLECTIONS-463" dev="tn" type="add" due-to="Andy Seaborne, Claude Warren">
+ Added "PushbackIterator" decorator to support pushback of elements during iteration.
+ </action>
+ <action issue="COLLECTIONS-462" dev="tn" type="add" due-to="Andy Seaborne, Claude Warren">
+ Added "PeekingIterator" decorator to support one-element lookahead during iteration.
+ </action>
+ <action issue="COLLECTIONS-461" dev="tn" type="fix" due-to="Matt Benson, sebb">
+ Added additional clarification to javadoc of interface "Put" wrt return type of
+ "put(Object, Object)" method.
+ </action>
+ <action issue="COLLECTIONS-460" dev="tn" type="update">
+ Changed "IteratorChain" to use internally a "Queue" instead of a "List". Iterators are
+ removed from the queue once used and can be garbage collected after being exhausted.
+ Additionally removed the methods "setIterator(Iterator)" and "getIterators()".
+ </action>
+ <action issue="COLLECTIONS-459" dev="tn" type="update" due-to="sebb">
+ Removed method "setArray(Object)" in class ArrayIterator and method "setArray(Object[])"
+ in class ObjectArrayIterator and made fields array, startIndex and endIndex final.
+ </action>
+ <action issue="COLLECTIONS-458" dev="sebb" type="remove">
+ Removed unused class "AbstractUntypedCollectionDecorator<E, D>".
+ </action>
+ <action issue="COLLECTIONS-456" dev="tn" type="add">
+ Added methods "ListUtils#longestCommonSubsequence(...)" to get the longest common subsequence
+ of arbitrary lists or CharSequences.
+ </action>
+ <action issue="COLLECTIONS-455" dev="sebb" type="update">
+ Changed scope of fields to private where appropriate.
+ </action>
+ <action issue="COLLECTIONS-454" dev="tn" type="update">
+ An iterator over a "Flat3Map#entrySet()" will now return
+ independent Map.Entry objects that will not change anymore when
+ the iterator progresses.
+ </action>
+ <action issue="COLLECTIONS-453" dev="tn" type="update">
+ Several closure and transformer implementations in the functors package
+ will now copy an array as input to their constructor (e.g. ChainedClosure).
+ </action>
+ <action issue="COLLECTIONS-452" dev="tn" type="update">
+ Change base package to org.apache.commons.collections4.
+ </action>
+ <action issue="COLLECTIONS-451" dev="tn" type="update">
+ The constructors for all Utils classes are now private to prevent instantiation.
+ </action>
+ <action issue="COLLECTIONS-450" dev="tn" type="add" due-to="J. Moldawski">
+ Added methods "forAllButLastDo(Collection, Closure)" and "forAllButLastDo(Iterator, Closure)"
+ to class "CollectionUtils".
+ </action>
+ <action issue="COLLECTIONS-447" dev="tn" type="fix" due-to="Jeffrey Barnes">
+ Tree traversal with a TreeListIterator will not be affected anymore by
+ the removal of an element directly after a call to previous().
+ </action>
+ <action issue="COLLECTIONS-446" dev="tn" type="add" due-to="Matt Lachman">
+ Added method "CollectionUtils#isEqualCollection(Collection, Collection, Equator)".
+ </action>
+ <action issue="COLLECTIONS-445" dev="tn" type="fix">
+ Adapt and/or ignore several unit tests when run on a IBM J9 VM (specification version 1.6.0)
+ due to a faulty "java.util.TreeMap" implementation.
+ </action>
+ <action issue="COLLECTIONS-444" dev="tn" type="fix" due-to="Thomas Vahrst, John Vasileff">
+ SetUniqueList.set(int, E) now works correctly if the object to be inserted
+ is already placed at the given position.
+ </action>
+ <action issue="COLLECTIONS-441" dev="tn" type="fix" due-to="Thomas Vahrst">
+ MultiKeyMap.clone() now correctly calls super.clone().
+ </action>
+ <action issue="COLLECTIONS-436" dev="tn" type="add" due-to="Arman Sharif">
+ Added "emptyIfNull" methods to classes "CollectionUtils", "ListUtils", "SetUtils"
+ and "MapUtils".
+ </action>
+ <action issue="COLLECTIONS-433" dev="tn" type="fix" due-to="Jeffrey Barnes">
+ Improve performance of "TreeList#addAll" and "TreeList(Collection)" by converting
+ the input collection into an AVL tree and efficiently merge it into the existing tree.
+ </action>
+ <action issue="COLLECTIONS-432" dev="tn" type="update">
+ Replaced "Buffer" interface with "java.util.Queue". Kept "CircularFifoQueue"
+ as well as "Predicated", "Transformed" and "Unmodifiable" decorators.
+ </action>
+ <action issue="COLLECTIONS-429,COLLECTIONS-434" dev="tn" type="add" due-to="Adrian Nistor, Mert Guldur">
+ Added method "CollectionUtils#containsAll(Collection, Collection)" with guaranteed
+ runtime complexity of O(n + m) and space complexity of O(n). This method may yield much
+ better performance than "Collection#containsAll(Collection)" depending on the use-case and
+ type of collection used.
+ </action>
+ <action issue="COLLECTIONS-427" dev="brentworden" type="fix" due-to="Mert Guldur">
+ Fixed performance issue in "SetUniqueList#retainAll" method for large collections.
+ </action>
+ <action issue="COLLECTIONS-426" dev="brentworden" type="fix" due-to="Adrian Nistor">
+ Fixed performance issue in "ListOrderedSet#retainAll" method for large collections.
+ </action>
+ <action issue="COLLECTIONS-425" dev="tn" type="fix" due-to="Adrian Nistor">
+ Improved performance of "ListOrderedMap#remove(Object)" method.
+ </action>
+ <action issue="COLLECTIONS-424" dev="tn" type="update" due-to="Michael Pradel">
+ "CompositeSet" does not inherit from "CompositeCollection" anymore. The inner class
+ "SetMutator" has been updated accordingly.
+ </action>
+ <action issue="COLLECTIONS-422" dev="tn" type="add" due-to="Benoit Corne">
+ Added method "CollectionUtils#permutations(Collection)" and class "PermutationIterator"
+ to generate unordered permutations of a collection.
+ </action>
+ <action issue="COLLECTIONS-421" dev="tn" type="fix" due-to="Benedikt Ritter">
+ Update javadoc for "ListUtils#lazyList()" and "ListUtils#fixedSizeList()".
+ </action>
+ <action issue="COLLECTIONS-419" dev="tn" type="fix" due-to="Adrian Nistor">
+ Added clarifying javadoc wrt runtime complexity of "AbstractDualBidiMap#retainAll".
+ </action>
+ <action issue="COLLECTIONS-417" dev="tn" type="fix" due-to="Adrian Nistor">
+ Added clarifying javadoc wrt runtime complexity of "AbstractLinkedList#retainAll".
+ </action>
+ <action issue="COLLECTIONS-415" dev="tn" type="fix" due-to="Adrian Nistor">
+ Added clarifying javadoc wrt runtime complexity of "AbstractLinkedList#removeAll".
+ </action>
+ <action issue="COLLECTIONS-414" dev="tn" type="fix">
+ Fixed several compilation issues with older Java 1.6 compilers.
+ </action>
+ <action issue="COLLECTIONS-413" dev="tn" type="fix" due-to="Adrian Nistor">
+ Improved performance of "removeAll()" method for sets returned by "DualHashBidiMap#entrySet()".
+ </action>
+ <action issue="COLLECTIONS-412" dev="tn" type="fix" due-to="Adrian Nistor">
+ Improved performance of "CollectionUtils#subtract" methods.
+ </action>
+ <action issue="COLLECTIONS-411" dev="tn" type="fix" due-to="Adrian Nistor">
+ Fixed possible "IndexOutOfBoundsException" in "ListOrderedMap#putAll".
+ </action>
+ <action issue="COLLECTIONS-410" dev="tn" type="fix" due-to="Adrian Nistor">
+ Improved performance of "SetUniqueList#addAll" method.
+ </action>
+ <action issue="COLLECTIONS-409" dev="tn" type="fix" due-to="Adrian Nistor">
+ Improved performance of "ListOrderedSet#addAll" method.
+ </action>
+ <action issue="COLLECTIONS-408" dev="tn" type="fix" due-to="Adrian Nistor">
+ Improved performance of "SetUniqueList#removeAll".
+ </action>
+ <action issue="COLLECTIONS-407" dev="tn" type="fix" due-to="Adrian Nistor">
+ Improved performance of "ListOrderedSet#remove(Object)" in case the object is
+ not contained in the Set.
+ </action>
+ <action issue="COLLECTIONS-406" dev="tn" type="fix" due-to="Adrian Nistor">
+ Improved performance of "ListUtils#subtract" method.
+ </action>
+ <action issue="COLLECTIONS-405" dev="brentworden" type="add" due-to="Adam Dyga">
+ Added "ListUtils#select" and "ListUtils#selectRejected" methods.
+ </action>
+ <action issue="COLLECTIONS-404" dev="luc" type="add" due-to="Jordane Sarda">
+ Added an implementation of Eugene Myers difference algorithm in package
+ o.a.c.c.sequence.
+ </action>
+ <action issue="COLLECTIONS-400" dev="tn" type="fix" due-to="Shin Hwei Tan">
+ Added missing null check in "CollectionUtils#addIgnoreNull(Collection, Object)".
+ </action>
+ <action issue="COLLECTIONS-399" dev="tn" type="add" due-to="Sebb">
+ Added new method "get(int)" to "CircularFifoQueue".
+ </action>
+ <action issue="COLLECTIONS-396" dev="tn" type="add" due-to="Jeff Rodriguez">
+ Added "LazyIteratorChain" iterator.
+ </action>
+ <action issue="COLLECTIONS-393" dev="tn" type="add" due-to="Chris Shayan">
+ Added "ListUtils#partition" method to split a List into consecutive sublists.
+ </action>
+ <action issue="COLLECTIONS-391" dev="tn" type="fix" due-to="Shin Hwei Tan">
+ Fixed javadoc for "MapUtils#toProperties(Map)".
+ </action>
+ <action issue="COLLECTIONS-389" dev="tn" type="fix" due-to="Shin Hwei Tan">
+ Clarified javadoc for "TransformerUtils#mapTransformer" for null input.
+ </action>
+ <action issue="COLLECTIONS-388" dev="tn" type="fix" due-to="Shin Hwei Tan">
+ Clarified javadoc for "FactoryUtils#prototypeFactory" for null input.
+ </action>
+ <action issue="COLLECTIONS-384" dev="ggregory" type="fix" due-to="Shin Hwei Tan">
+ Fixed inconsistent javadoc for "MapUtils#synchronizedMap(Map)".
+ </action>
+ <action issue="COLLECTIONS-383" dev="tn" type="add" due-to="Adrian Cumiskey">
+ Added "CollectionUtils#forAllDo" implementation which takes an "Iterator" as input.
+ </action>
+ <action issue="COLLECTIONS-382" dev="tn" type="update" due-to="Olivier Lamy">
+ Change maven coordinates to "org.apache.commons.commons-collections4".
+ </action>
+ <action issue="COLLECTIONS-381" dev="sebb" type="update" due-to="Olivier Lamy">
+ Move the project structure to a standard maven layout.
+ </action>
+ <action issue="COLLECTIONS-380" dev="tn" type="fix" due-to="Dave Brosius">
+ Fixed infinite loop when calling "UnmodifiableBoundedCollection#unmodifiableBoundedCollection()".
+ </action>
+ <action issue="COLLECTIONS-379" dev="tn" type="fix" due-to="Shin Hwei Tan">
+ Fixed javadoc for several methods wrt expected NullPointerExceptions.
+ </action>
+ <action issue="COLLECTIONS-375" dev="tn" type="add" due-to="Ivan Hristov">
+ Added method "ListUtils#defaultIfNull(List, List)".
+ </action>
+ <action issue="COLLECTIONS-372" dev="tn" type="update">
+ TransformingComparator now supports different types for its input/output values.
+ </action>
+ <action issue="COLLECTIONS-364" dev="sebb" type="fix">
+ "DualTreeBidiMap" now uses the correct comparator for the reverse map during de-serialization.
+ </action>
+ <action issue="COLLECTIONS-363" dev="sebb" type="fix">
+ "TransformedMap" in the package "splitmap" can now be serialized.
+ </action>
+ <action issue="COLLECTIONS-362" dev="brentworden" type="update" due-to="Jean-Noel Rouvignac">
+ "CollectionUtils#filter(Iterable, Predicate)" will now return whether the collection
+ has been modified.
+ </action>
+ <action issue="COLLECTIONS-361" dev="tn" type="add" due-to="Jean-Noel Rouvignac">
+ Add method "CollectionUtils#filterInverse(Iterable, Predicate)".
+ </action>
+ <action issue="COLLECTIONS-360" dev="jochen" type="fix" due-to="Sai Zhang">
+ "FilterListIterator#hasNext" does not throw a NullPointerException anymore
+ to comply to the Java iterator specification.
+ </action>
+ <action issue="COLLECTIONS-359" dev="bayard" type="fix" due-to="Mark Shead">
+ "ListUtils#intersection(List, List)" will now also work correctly if there
+ are duplicate elements in the provided lists.
+ </action>
+ <action issue="COLLECTIONS-352" dev="bayard" type="fix" due-to="Adam Gent">
+ "AbstractCollectionDecorator" will now use internally "decorated()" to access
+ the decorated collection.
+ </action>
+ <action issue="COLLECTIONS-351" dev="bayard" type="remove" due-to="Henri Yandell">
+ Removed features which are now supported by the JDK.
+ </action>
+ <action issue="COLLECTIONS-350" dev="bayard" type="fix" due-to="Michael Akerman">
+ Removed debug output in "MapUtils#getNumber(Map)".
+ </action>
+ <action issue="COLLECTIONS-348" dev="brentworden" type="fix" due-to="Paul Benedict">
+ Fixed javadoc for all "transformedXXX(XXX)" methods in the respective Utils classes
+ to clarify that existing objects in the list are not transformed.
+ </action>
+ <action issue="COLLECTIONS-343" dev="mbenson" type="fix" due-to="Goran Hacek">
+ Singleton classes in package "functors" are now correctly de-serialized.
+ </action>
+ <action issue="COLLECTIONS-341" dev="mbenson" type="update" due-to="Goran Hacek">
+ "NOPClosure" is now a final class.
+ </action>
+ <action issue="COLLECTIONS-340" dev="mbenson" type="fix" due-to="Goran Hacek">
+ Removed broken methods "equals(Object)" and "hashCode()" in class "NOPClosure".
+ </action>
+ <action issue="COLLECTIONS-336" dev="bayard" type="fix" due-to="sebb">
+ Simplified exceptions as the cause is available from the parent.
+ </action>
+ <action issue="COLLECTIONS-335" dev="jochen" type="fix" due-to="sebb">
+ Fixed cache assignment for "TreeBidiMap#entrySet".
+ </action>
+ <action issue="COLLECTIONS-334" dev="jochen" type="fix" due-to="sebb">
+ Synchronized access to lock in "StaticBucketMap#size()".
+ </action>
+ <action issue="COLLECTIONS-332" dev="jochen" type="fix" due-to="Tom Parker">
+ Added clarification to javadoc of "ListOrderedMap" that "IdentityMap" and
+ "CaseInsensitiveMap" are not supported.
+ </action>
+ <action issue="COLLECTIONS-331" dev="jochen" type="fix" due-to="Michael Krkoska">
+ Improve javadoc of "CollatingIterator" wrt the used "Comparator" and throw a
+ NullPointerException in "CollatingIterator#least" if no comparator is set.
+ </action>
+ <action issue="COLLECTIONS-330" dev="mbenson" type="fix" due-to="Joerg Schaible">
+ "LRUMap#keySet()#remove(Object)" will not throw a "ConcurrentModificationException" anymore.
+ </action>
+ <action issue="COLLECTIONS-328" dev="bayard" type="fix" due-to="Thomas Rogan, Jilles van Gurp">
+ Improved performance of "ListUtils#intersection(List, List)".
+ </action>
+ <action issue="COLLECTIONS-327" dev="brentworden" type="add" due-to="sebb">
+ Added serialVersionUID fields for "CompositeCollection", "CompositeSet",
+ "EmptyMapMutator", "EmptySetMutator".
+ </action>
+ <action issue="COLLECTIONS-324" dev="tn" type="update" due-to="sebb">
+ Fields transformer and decorated in class "TransformingComparator" are now final.
+ </action>
+ <action issue="COLLECTIONS-323" dev="jochen" type="fix" due-to="Maarten Brak">
+ Changed behavior of "CaseInsensitiveMap" constructor to be compliant with "HashMap"
+ in case the initial capacity is set to zero.
+ </action>
+ <action issue="COLLECTIONS-322" dev="tn" type="add" due-to="Thomas Vahrst">
+ Added NodeListIterator and convenience methods in IteratorUtils to iterate over
+ a org.w3c.dom.NodeList.
+ </action>
+ <action issue="COLLECTIONS-320" dev="bayard" type="fix" due-to="sebb">
+ Improved performance of "StaticBucketMap#putAll(Map)" by iterating over the entry set.
+ </action>
+ <action issue="COLLECTIONS-319" dev="bayard" type="fix" due-to="sebb">
+ Avoid redundant null check in "IteratorUtils#getIterator(Object)".
+ </action>
+ <action issue="COLLECTIONS-317" dev="bayard" type="fix" due-to="sebb">
+ Use a private method to populate the object in "AbstractHashedMap(Map)".
+ </action>
+ <action issue="COLLECTIONS-316" dev="bayard" type="fix" due-to="ori">
+ Fixed javadoc of "LRUMap" wrt to the maxSize parameter of the constructor.
+ </action>
+ <action issue="COLLECTIONS-313" dev="brentworden" type="add" due-to="David J. M. Karlsen">
+ Added new abstract class "CatchAndRethrowClosure" that re-throws any checked exception
+ as unchecked "FunctorException".
+ </action>
+ <action issue="COLLECTIONS-312" dev="tn" type="fix" due-to="Peter Lawrey, Gary Gregory">
+ Use of final keyword where applicable, minor performance improvements by properly
+ initializing the capacity of newly created collections when known in advance.
+ </action>
+ <action issue="COLLECTIONS-307" dev="tn" type="update" due-to="Christian Semrau, Thomas Vahrst">
+ "SetUniqueList#subList()" will now return an unmodifiable list as changes to it
+ may invalidate the parent list.
+ </action>
+ <action issue="COLLECTIONS-307" dev="bayard" type="fix" due-to="Christian Semrau">
+ "SetUniqueList#subList()#contains(Object)" will now correctly check the subList
+ rather than the parent list.
+ </action>
+ <action issue="COLLECTIONS-306" dev="brentworden" type="add" due-to="Chris Shayan">
+ Added method "CollectionUtils#subtract(Iterable, Iterable, Predicate)".
+ </action>
+ <action issue="COLLECTIONS-304" dev="bayard" type="fix" due-to="Rafał Figas,Bjorn Townsend">
+ "SetUniqueList#set(int, Object)" will now correctly enforce the uniqueness constraint.
+ </action>
+ <action issue="COLLECTIONS-303" dev="bayard" type="fix" due-to="Emmanuel Bourg">
+ Improved javadoc for "Unmodifiable*" classes wrt behavior when the users tries
+ to modify the collection.
+ </action>
+ <action issue="COLLECTIONS-298" dev="bayard" type="update" due-to="Benjamin Bentmann">
+ Calling "CollectionUtils#sizeIsEmpty(null)" will now return true.
+ </action>
+ <action issue="COLLECTIONS-296" dev="tn" type="add" due-to="Julius Davies">
+ Added methods "CollectionUtils#collate(...)" to merge two sorted Collections
+ into a sorted List using the standard O(n) merge algorithm.
+ </action>
+ <action issue="COLLECTIONS-294" dev="bayard" type="fix" due-to="Benjamin Bentmann">
+ "CaseInsensitiveMap" will now convert input strings to lower-case in a
+ locale-independant manner.
+ </action>
+ <action issue="COLLECTIONS-293" dev="tn" type="add" due-to="Stephen Kestle">
+ Added support for using custom "Equator" objects in "EqualPredicate".
+ </action>
+ <action issue="COLLECTIONS-289" dev="bayard" type="add" due-to="Fredrik Kjellberg">
+ Added method "CollatingIterator#getIteratorIndex()".
+ </action>
+ <action issue="COLLECTIONS-256,COLLECTIONS-288" dev="bayard" type="fix" due-to="Paul Benedict">
+ Fixed javadoc for "ListUtils#transformedList(List)" to clarify that existing objects
+ in the list are not transformed.
+ </action>
+ <action issue="COLLECTIONS-286" dev="mbenson" type="add" due-to="Geoffrey De Smet">
+ Added method "CollectionUtils#extractSingleton(Collection)".
+ </action>
+ <action issue="COLLECTIONS-285" dev="tn" type="add" due-to="Christian Gruenberg">
+ Added serialization support for "TreeBidiMap".
+ </action>
+ <action issue="COLLECTIONS-280" dev="bayard" type="update" due-to="Chris Lewis">
+ The predicate that rejected an object to be added to a "PredicatedCollection"
+ is now contained in the respective exception message.
+ </action>
+ <action issue="COLLECTIONS-275" dev="tn" type="add" due-to="Stephen Kestle">
+ Added "IndexedCollection" collection decorator which provides a map-like
+ view on an existing collection.
+ </action>
+ <action issue="COLLECTIONS-272" dev="tn" type="add" due-to="Chaitanya Mutyala">
+ Added serialization support for "FixedOrderComparator" and "TransformingComparator".
+ </action>
+ <action issue="COLLECTIONS-266" dev="bayard" type="fix" due-to="Joerg Schaible">
+ "MultiKey" will now be correctly serialized/de-serialized.
+ </action>
+ <action issue="COLLECTIONS-265" dev="bayard" type="update" due-to="David Saff">
+ "TreeBag" will now only accept "Comparable" objects as input when used with natural ordering.
+ </action>
+ <action issue="COLLECTIONS-263" dev="tn" type="add" due-to="John Hunsley">
+ Added methods "MapUtils#populateMap(MultiMap, ...)" to support also "MultiMap" instances
+ as input.
+ </action>
+ <action issue="COLLECTIONS-262" dev="bayard" type="fix" due-to="Lisen Mu">
+ Fixed javadoc for methods "firstKey()" and "lastKey()" in class "AbstractLinkedMap".
+ </action>
+ <action issue="COLLECTIONS-261" dev="bayard" type="fix" due-to="ori">
+ "Flat3Map#remove(Object)" will now return the correct value mapped to the removed key
+ if the size of the map is less or equal 3.
+ </action>
+ <action issue="COLLECTIONS-260" dev="mbenson" type="add" due-to="Stephen Kestle">
+ Added constructor "TransformingComparator(Transformer)".
+ </action>
+ <action issue="COLLECTIONS-258" dev="tn" type="add" due-to="Nathan Blomquist">
+ Added "DualLinkedHashBidiMap" bidi map implementation.
+ </action>
+ <action issue="COLLECTIONS-255" dev="mbenson" type="fix" due-to="Henri Yandell">
+ Removed unused variables in "TreeBidiMap".
+ </action>
+ <action issue="COLLECTIONS-251,COLLECTIONS-321" dev="mbenson" type="update" due-to="Stephen Kestle">
+ The static factory methods have been renamed from "getInstance()" to a camel-case
+ version of the class name, e.g. "truePredicate()" for class "TruePredicate".
+ </action>
+ <action issue="COLLECTIONS-249" dev="bayard" type="fix" due-to="Joe Kelly">
+ "SetUniqueList.addAll(int, Collection)" now correctly add the collection at the
+ provided index.
+ </action>
+ <action issue="COLLECTIONS-242" dev="skestle" type="add">
+ Added "Equator" interface.
+ </action>
+ <action issue="COLLECTIONS-241" dev="brentworden" type="add" due-to="Elifarley Callado Coelho">
+ Added "PassiveExpiringMap" map decorator.
+ </action>
+ <action issue="COLLECTIONS-240" dev="bayard" type="update" due-to="Wouter de Vaal">
+ "MultiValueMap" is now serializable.
+ </action>
+ <action issue="COLLECTIONS-237" dev="tn" type="add" due-to="Nils Kaiser, Alan Mehlo">
+ Added method "MultiValueMap#iterator()" to return a flattened version of
+ "entrySet().iterator()". Clarified javadoc for "entrySet()" that the returned Entry
+ objects are unflattened, i.e. the Entry object for a given key contains all values
+ mapped to this key.
+ </action>
+ <action issue="COLLECTIONS-235" dev="bayard" type="add" due-to="Nathan Egge">
+ Added method "ListUtils#indexOf(List, Predicate)".
+ </action>
+ <action issue="COLLECTIONS-232" dev="bayard" type="fix" due-to="Mark Hindess">
+ Fixed several unit tests which were using parameters to "assertEquals(...)" in wrong order.
+ </action>
+ <action issue="COLLECTIONS-231" dev="tn" type="update" due-to="Torsten Curdt">
+ Return concrete class in static factory methods instead of base class interface
+ (except for Unmodifiable decorators).
+ </action>
+ <action issue="COLLECTIONS-230,COLLECTIONS-297,COLLECTIONS-318" dev="bayard" type="update" due-to="Stepan Koltsov,sebb">
+ "CollectionUtils#size(Collection)" now returns 0 when called with null as input.
+ </action>
+ <action issue="COLLECTIONS-229" dev="scolebourne" type="remove">
+ Removed deprecated classes and methods.
+ </action>
+ <action issue="COLLECTIONS-228" dev="scolebourne" type="fix">
+ "MultiValueMap#put(Object, Object)" and "MultiValueMap#putAll(Object, Collection)"
+ now correctly return if the map has changed by this operation.
+ </action>
+ <action issue="COLLECTIONS-226" dev="bayard" type="add" due-to="Vasily Ivanov">
+ Added method "ListOrderedMap#putAll(int, Map)".
+ </action>
+ <action issue="COLLECTIONS-225" dev="tn" type="add" due-to="Sam Berlin, Roger Kapsi">
+ Added new "Trie" interface with a first concrete implementation "PatriciaTrie"
+ together with decorators "Unmodifiable" and "Synchronized".
+ </action>
+ <action issue="COLLECTIONS-223" dev="bayard" type="update" due-to="Vasily Ivanov">
+ "CollectionUtils#addAll(...)" methods now return if the collection has been changed
+ by this operation.
+ </action>
+ <action issue="COLLECTIONS-221" dev="bayard" type="update" due-to="Pal Denes">
+ "CompositeCollection", "CompositeMap" and "CompositeSet" are now serializable.
+ </action>
+ <action issue="COLLECTIONS-219" dev="scolebourne" type="fix" due-to="Tom Leccese">
+ "CollectionUtils#removeAll" wrongly called "ListUtils#retainAll".
+ </action>
+ <action issue="COLLECTIONS-218" dev="skestle" type="update">
+ The "CollectionUtils#select(Collection, Predicate, Collection)" method will now
+ return the output collection.
+ </action>
+ <action issue="COLLECTIONS-217" dev="scolebourne" type="fix" due-to="Matt Bishop">
+ Calling "setValue(Object)" on any Entry returned by a "Flat3Map" will now
+ correctly set the value for the current entry.
+ </action>
+ <action issue="COLLECTIONS-216" dev="scolebourne" type="fix" due-to="Hendrik Maryns">
+ "MultiKey#toString()" will now use "Arrays#toString(List)".
+ </action>
+ <action issue="COLLECTIONS-213" dev="brentworden" type="add" due-to="Dusan Chromy">
+ Added support for resettable iterators in "IteratorIterable".
+ </action>
+ <action issue="COLLECTIONS-194" dev="bayard" type="add" due-to="Dave Meikle">
+ Added methods "MapUtils#populateMap(Map, Iterable, Transformer, ...)".
+ </action>
+ <action issue="COLLECTIONS-182" dev="mbenson" type="update" due-to="Jim Cakalic">
+ "CollectionUtils#forAllDo(Collection, Closure)" now returns the provided closure.
+ </action>
+ <action issue="COLLECTIONS-110,COLLECTIONS-243,COLLECTIONS-245,COLLECTIONS-247,
+ COLLECTIONS-253,COLLECTIONS-273,COLLECTIONS-282" dev="multiple" type="update">
+ Make generic versions of all classes in collections.
+ </action>
+ <action issue="COLLECTIONS-8" dev="brentworden" type="add" due-to="Rune Peter Bjørnstad">
+ Added class "ComparatorPredicate".
+ </action>
+ </release>
+ <release version="3.2.2" date="2015-11-15" description="This is a security and bugfix release.">
+ <action issue="COLLECTIONS-580" dev="tn" type="update">
+ Serialization support for unsafe classes in the functor package is disabled
+ by default as this can be exploited for remote code execution attacks.
+ To re-enable the feature the system property "org.apache.commons.collections.enableUnsafeSerialization"
+ needs to be set to "true".
+ Classes considered to be unsafe are: CloneTransformer, ForClosure, InstantiateFactory,
+ InstantiateTransformer, InvokerTransformer, PrototypeCloneFactory,
+ PrototypeSerializationFactory, WhileClosure.
+ </action>
+ <action issue="COLLECTIONS-538" dev="tn" type="fix" due-to="Trejkaz">
+ "ExtendedProperties" will now use a privileged action to access the
+ "file.separator" system property. In case the class does not have
+ permission to read system properties, the "File#separator" field will
+ be used instead.
+ </action>
+ <action issue="COLLECTIONS-447" dev="tn" type="fix" due-to="Jeffrey Barnes">
+ Tree traversal with a TreeListIterator will not be affected anymore by
+ the removal of an element directly after a call to previous().
+ </action>
+ <action issue="COLLECTIONS-444" dev="tn" type="fix" due-to="Thomas Vahrst, John Vasileff">
+ SetUniqueList.set(int, Object) now works correctly if the object to be inserted
+ is already placed at the given position.
+ </action>
+ <action issue="COLLECTIONS-350" dev="bayard" type="fix" due-to="Michael Akerman">
+ Removed debug output in "MapUtils#getNumber(Map)".
+ </action>
+ <action issue="COLLECTIONS-335" dev="jochen" type="fix" due-to="sebb">
+ Fixed cache assignment for "TreeBidiMap#entrySet".
+ </action>
+ <action issue="COLLECTIONS-334" dev="jochen" type="fix" due-to="sebb">
+ Synchronized access to lock in "StaticBucketMap#size()".
+ </action>
+ <action issue="COLLECTIONS-307" dev="bayard" type="fix" due-to="Christian Semrau">
+ "SetUniqueList#subList()#contains(Object)" will now correctly check the subList
+ rather than the parent list.
+ </action>
+ <action issue="COLLECTIONS-304" dev="bayard" type="fix" due-to="Rafał Figas,Bjorn Townsend">
+ "SetUniqueList#set(int, Object)" will now correctly enforce the uniqueness constraint.
+ </action>
+ <action issue="COLLECTIONS-294" dev="bayard" type="fix" due-to="Benjamin Bentmann">
+ "CaseInsensitiveMap" will now convert input strings to lower-case in a
+ locale-independent manner.
+ </action>
+ <action issue="COLLECTIONS-266" dev="bayard" type="fix" due-to="Joerg Schaible">
+ "MultiKey" will now be correctly serialized/de-serialized.
+ </action>
+ <action issue="COLLECTIONS-261" dev="bayard" type="fix" due-to="ori">
+ "Flat3Map#remove(Object)" will now return the correct value mapped to the removed key
+ if the size of the map is less or equal 3.
+ </action>
+ <action issue="COLLECTIONS-249" dev="bayard" type="fix" due-to="Joe Kelly">
+ "SetUniqueList.addAll(int, Collection)" now correctly add the collection at the
+ provided index.
+ </action>
+ <action issue="COLLECTIONS-228" dev="scolebourne" type="fix">
+ "MultiValueMap#put(Object, Object)" and "MultiValueMap#putAll(Object, Collection)"
+ now correctly return if the map has changed by this operation.
+ </action>
+ <action issue="COLLECTIONS-219" dev="scolebourne" type="fix" due-to="Tom Leccese">
+ "CollectionUtils#removeAll" wrongly called "ListUtils#retainAll".
+ </action>
+ <action issue="COLLECTIONS-217" dev="scolebourne" type="fix" due-to="Matt Bishop">
+ Calling "setValue(Object)" on any Entry returned by a "Flat3Map" will now
+ correctly set the value for the current entry.
+ </action>
+ </release>
+ </body>
+</document>
diff --git a/src/conf/checkstyle-suppressions.xml b/src/conf/checkstyle-suppressions.xml
index fec4638..62f4161 100644
--- a/src/conf/checkstyle-suppressions.xml
+++ b/src/conf/checkstyle-suppressions.xml
@@ -28,7 +28,7 @@
<!-- Ignore missing javadoc for Get/Put interfaces, they refer to java.util.Map -->
<suppress checks="JavadocMethod" files="Get.java" />
<suppress checks="JavadocMethod" files="Put.java" />
-
+
<!-- Ignore missing javadoc param for unsupported method -->
<suppress checks="JavadocMethod" files="FilterListIterator.java" lines="116,166" />
</suppressions>
diff --git a/src/conf/checkstyle.xml b/src/conf/checkstyle.xml
index c2bfec2..3079b6b 100644
--- a/src/conf/checkstyle.xml
+++ b/src/conf/checkstyle.xml
@@ -20,7 +20,7 @@ limitations under the License.
"-//Puppy Crawl//DTD Check Configuration 1.1//EN"
"http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
-<!-- Apache Commons Lang customization of default Checkstyle behavior -->
+<!-- Apache Commons Collections customization of default Checkstyle behavior -->
<module name="Checker">
<property name="localeLanguage" value="en"/>
<module name="JavadocPackage"/>
diff --git a/src/main/java/org/apache/commons/collections4/CollectionUtils.java b/src/main/java/org/apache/commons/collections4/CollectionUtils.java
index c32838f..6b60b6c 100644
--- a/src/main/java/org/apache/commons/collections4/CollectionUtils.java
+++ b/src/main/java/org/apache/commons/collections4/CollectionUtils.java
@@ -73,7 +73,7 @@ public class CollectionUtils {
* @param a the first collection
* @param b the second collection
*/
- public CardinalityHelper(final Iterable<? extends O> a, final Iterable<? extends O> b) {
+ CardinalityHelper(final Iterable<? extends O> a, final Iterable<? extends O> b) {
cardinalityA = CollectionUtils.<O>getCardinalityMap(a);
cardinalityB = CollectionUtils.<O>getCardinalityMap(b);
}
@@ -140,7 +140,7 @@ public class CollectionUtils {
* @param a the first collection
* @param b the second collection
*/
- public SetOperationCardinalityHelper(final Iterable<? extends O> a, final Iterable<? extends O> b) {
+ SetOperationCardinalityHelper(final Iterable<? extends O> a, final Iterable<? extends O> b) {
super(a, b);
elements = new HashSet<>();
addAll(elements, a);
@@ -555,15 +555,15 @@ public class CollectionUtils {
* @return {@code true} iff the collections contain the same elements with the same cardinalities.
*/
public static boolean isEqualCollection(final Collection<?> a, final Collection<?> b) {
- if(a.size() != b.size()) {
+ if (a.size() != b.size()) {
return false;
}
final CardinalityHelper<Object> helper = new CardinalityHelper<>(a, b);
- if(helper.cardinalityA.size() != helper.cardinalityB.size()) {
+ if (helper.cardinalityA.size() != helper.cardinalityB.size()) {
return false;
}
- for( final Object obj : helper.cardinalityA.keySet()) {
- if(helper.freqA(obj) != helper.freqB(obj)) {
+ for (final Object obj : helper.cardinalityA.keySet()) {
+ if (helper.freqA(obj) != helper.freqB(obj)) {
return false;
}
}
@@ -598,7 +598,7 @@ public class CollectionUtils {
final Equator<? super E> equator) {
Objects.requireNonNull(equator, "equator");
- if(a.size() != b.size()) {
+ if (a.size() != b.size()) {
return false;
}
@@ -622,7 +622,7 @@ public class CollectionUtils {
private final Equator<? super O> equator;
private final O object;
- public EquatorWrapper(final Equator<? super O> equator, final O object) {
+ EquatorWrapper(final Equator<? super O> equator, final O object) {
this.equator = equator;
this.object = object;
}
@@ -1318,7 +1318,7 @@ public class CollectionUtils {
if (i < 0) {
throw new IndexOutOfBoundsException("Index cannot be negative: " + i);
}
- if (object instanceof Map<?,?>) {
+ if (object instanceof Map<?, ?>) {
final Map<?, ?> map = (Map<?, ?>) object;
final Iterator<?> iterator = map.entrySet().iterator();
return IteratorUtils.get(iterator, i);
@@ -1355,7 +1355,7 @@ public class CollectionUtils {
* @return the object at the specified index
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public static <K,V> Map.Entry<K, V> get(final Map<K,V> map, final int index) {
+ public static <K, V> Map.Entry<K, V> get(final Map<K, V> map, final int index) {
checkIndexBounds(index);
return get(map.entrySet(), index);
}
@@ -1383,7 +1383,7 @@ public class CollectionUtils {
return 0;
}
int total = 0;
- if (object instanceof Map<?,?>) {
+ if (object instanceof Map<?, ?>) {
total = ((Map<?, ?>) object).size();
} else if (object instanceof Collection<?>) {
total = ((Collection<?>) object).size();
diff --git a/src/main/java/org/apache/commons/collections4/Equator.java b/src/main/java/org/apache/commons/collections4/Equator.java
index 5b5dd3a..63cce0f 100644
--- a/src/main/java/org/apache/commons/collections4/Equator.java
+++ b/src/main/java/org/apache/commons/collections4/Equator.java
@@ -1,12 +1,18 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
- * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
- * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
- * for the specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.collections4;
diff --git a/src/main/java/org/apache/commons/collections4/IterableUtils.java b/src/main/java/org/apache/commons/collections4/IterableUtils.java
index 55c3123..125002d 100644
--- a/src/main/java/org/apache/commons/collections4/IterableUtils.java
+++ b/src/main/java/org/apache/commons/collections4/IterableUtils.java
@@ -478,7 +478,7 @@ public class IterableUtils {
private static final class UnmodifiableIterable<E> extends FluentIterable<E> {
private final Iterable<E> unmodifiable;
- public UnmodifiableIterable(final Iterable<E> iterable) {
+ UnmodifiableIterable(final Iterable<E> iterable) {
super();
this.unmodifiable = iterable;
}
diff --git a/src/main/java/org/apache/commons/collections4/IteratorUtils.java b/src/main/java/org/apache/commons/collections4/IteratorUtils.java
index bf3779f..d6c5283 100644
--- a/src/main/java/org/apache/commons/collections4/IteratorUtils.java
+++ b/src/main/java/org/apache/commons/collections4/IteratorUtils.java
@@ -808,7 +808,7 @@ public class IteratorUtils {
* Convenience method, allows easy iteration over NodeLists:
* <pre>
* Iterator<Node> iterator = IteratorUtils.nodeListIterator(node);
- * for(Node childNode : IteratorUtils.asIterable(iterator)) {
+ * for (Node childNode : IteratorUtils.asIterable(iterator)) {
* ...
* }
* </pre>
@@ -1247,7 +1247,7 @@ public class IteratorUtils {
Objects.requireNonNull(predicate, "predicate");
if (iterator != null) {
- for(int index = 0; iterator.hasNext(); index++) {
+ for (int index = 0; iterator.hasNext(); index++) {
final E element = iterator.next();
if (predicate.evaluate(element)) {
return index;
@@ -1469,7 +1469,7 @@ public class IteratorUtils {
stringBuilder.append(transformer.transform(element));
stringBuilder.append(delimiter);
}
- if(stringBuilder.length() > prefix.length()) {
+ if (stringBuilder.length() > prefix.length()) {
stringBuilder.setLength(stringBuilder.length() - delimiter.length());
}
}
diff --git a/src/main/java/org/apache/commons/collections4/ListUtils.java b/src/main/java/org/apache/commons/collections4/ListUtils.java
index b439d38..fa3ef9e 100644
--- a/src/main/java/org/apache/commons/collections4/ListUtils.java
+++ b/src/main/java/org/apache/commons/collections4/ListUtils.java
@@ -611,7 +611,7 @@ public class ListUtils {
private static final class LcsVisitor<E> implements CommandVisitor<E> {
private final ArrayList<E> sequence;
- public LcsVisitor() {
+ LcsVisitor() {
sequence = new ArrayList<>();
}
@@ -639,23 +639,21 @@ public class ListUtils {
* A simple wrapper to use a CharSequence as List.
*/
private static final class CharSequenceAsList extends AbstractList<Character> {
+ private final CharSequence sequence;
- private final CharSequence sequence;
-
- public CharSequenceAsList(final CharSequence sequence) {
- this.sequence = sequence;
- }
-
- @Override
- public Character get( final int index ) {
- return Character.valueOf(sequence.charAt( index ));
- }
+ CharSequenceAsList(final CharSequence sequence) {
+ this.sequence = sequence;
+ }
- @Override
- public int size() {
- return sequence.length();
- }
+ @Override
+ public Character get(final int index) {
+ return Character.valueOf(sequence.charAt(index));
+ }
+ @Override
+ public int size() {
+ return sequence.length();
+ }
}
//-----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/SetUtils.java b/src/main/java/org/apache/commons/collections4/SetUtils.java
index 97e46e5..3b833af 100644
--- a/src/main/java/org/apache/commons/collections4/SetUtils.java
+++ b/src/main/java/org/apache/commons/collections4/SetUtils.java
@@ -58,7 +58,7 @@ public class SetUtils {
* @param <E> the element type
* @since 4.1
*/
- public static abstract class SetView<E> extends AbstractSet<E> {
+ public abstract static class SetView<E> extends AbstractSet<E> {
/**
* Copies the contents of this view into the provided set.
diff --git a/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java b/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java
index b5b9845..8f97088 100644
--- a/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java
+++ b/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java
@@ -191,7 +191,7 @@ public abstract class AbstractMapBag<E> implements Bag<E> {
*
* @param parent the parent bag
*/
- public BagIterator(final AbstractMapBag<E> parent) {
+ BagIterator(final AbstractMapBag<E> parent) {
this.parent = parent;
this.entryIterator = parent.map.entrySet().iterator();
this.current = null;
@@ -507,7 +507,7 @@ public abstract class AbstractMapBag<E> implements Bag<E> {
@Override
public Set<E> uniqueSet() {
if (uniqueSet == null) {
- uniqueSet = UnmodifiableSet.<E> unmodifiableSet(map.keySet());
+ uniqueSet = UnmodifiableSet.<E>unmodifiableSet(map.keySet());
}
return uniqueSet;
}
diff --git a/src/main/java/org/apache/commons/collections4/bag/CollectionBag.java b/src/main/java/org/apache/commons/collections4/bag/CollectionBag.java
index 4ae4d42..a725823 100644
--- a/src/main/java/org/apache/commons/collections4/bag/CollectionBag.java
+++ b/src/main/java/org/apache/commons/collections4/bag/CollectionBag.java
@@ -111,7 +111,7 @@ public final class CollectionBag<E> extends AbstractBagDecorator<E> {
public boolean containsAll(final Collection<?> coll) {
final Iterator<?> e = coll.iterator();
while (e.hasNext()) {
- if(!contains(e.next())) {
+ if (!contains(e.next())) {
return false;
}
}
diff --git a/src/main/java/org/apache/commons/collections4/bag/CollectionSortedBag.java b/src/main/java/org/apache/commons/collections4/bag/CollectionSortedBag.java
index ef433e5..abcfb3d 100644
--- a/src/main/java/org/apache/commons/collections4/bag/CollectionSortedBag.java
+++ b/src/main/java/org/apache/commons/collections4/bag/CollectionSortedBag.java
@@ -92,7 +92,7 @@ public final class CollectionSortedBag<E> extends AbstractSortedBagDecorator<E>
public boolean containsAll(final Collection<?> coll) {
final Iterator<?> e = coll.iterator();
while (e.hasNext()) {
- if(!contains(e.next())) {
+ if (!contains(e.next())) {
return false;
}
}
diff --git a/src/main/java/org/apache/commons/collections4/bag/TreeBag.java b/src/main/java/org/apache/commons/collections4/bag/TreeBag.java
index 9ce1d8a..6455867 100644
--- a/src/main/java/org/apache/commons/collections4/bag/TreeBag.java
+++ b/src/main/java/org/apache/commons/collections4/bag/TreeBag.java
@@ -88,7 +88,7 @@ public class TreeBag<E> extends AbstractMapBag<E> implements SortedBag<E>, Seria
*/
@Override
public boolean add(final E object) {
- if(comparator() == null && !(object instanceof Comparable)) {
+ if (comparator() == null && !(object instanceof Comparable)) {
Objects.requireNonNull(object, "object");
throw new IllegalArgumentException("Objects of type " + object.getClass() + " cannot be added to " +
"a naturally ordered TreeBag as it does not implement Comparable");
diff --git a/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java b/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java
index e3aa316..6e0f74f 100644
--- a/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java
+++ b/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java
@@ -108,7 +108,7 @@ public final class UnmodifiableBag<E>
//-----------------------------------------------------------------------
@Override
public Iterator<E> iterator() {
- return UnmodifiableIterator.<E> unmodifiableIterator(decorated().iterator());
+ return UnmodifiableIterator.<E>unmodifiableIterator(decorated().iterator());
}
@Override
@@ -163,7 +163,7 @@ public final class UnmodifiableBag<E>
@Override
public Set<E> uniqueSet() {
final Set<E> set = decorated().uniqueSet();
- return UnmodifiableSet.<E> unmodifiableSet(set);
+ return UnmodifiableSet.<E>unmodifiableSet(set);
}
}
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java
index c8c91ad..33e2611 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java
@@ -344,7 +344,7 @@ public abstract class AbstractDualBidiMap<K, V> implements BidiMap<K, V> {
/**
* Inner class View.
*/
- protected static abstract class View<K, V, E> extends AbstractCollectionDecorator<E> {
+ protected abstract static class View<K, V, E> extends AbstractCollectionDecorator<E> {
/** Generated serial version ID. */
private static final long serialVersionUID = 4621510560119690639L;
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
index 0022b5d..7af7f2c 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
@@ -1465,7 +1465,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
stream.defaultReadObject();
rootNode = new Node[2];
final int size = stream.readInt();
- for(int i = 0; i < size; i++){
+ for (int i = 0; i < size; i++){
final K k =(K) stream.readObject();
final V v =(V) stream.readObject();
put(k, v);
@@ -1521,7 +1521,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/**
* Create a new TreeBidiMap.KeyView.
*/
- public KeyView(final DataElement orderType) {
+ KeyView(final DataElement orderType) {
super(orderType);
}
@@ -1548,7 +1548,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/**
* Create a new TreeBidiMap.ValueView.
*/
- public ValueView(final DataElement orderType) {
+ ValueView(final DataElement orderType) {
super(orderType);
}
@@ -1792,7 +1792,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/**
* Create a new TreeBidiMap.InverseViewMapIterator.
*/
- public InverseViewMapIterator(final DataElement orderType) {
+ InverseViewMapIterator(final DataElement orderType) {
super(orderType);
}
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilter.java
index 1339dac..e568bf5 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilter.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -168,7 +167,7 @@ public abstract class AbstractBloomFilter implements BloomFilter {
* @param other the other Bloom filter.
*/
@Override
- abstract public void merge(BloomFilter other);
+ public abstract void merge(BloomFilter other);
/**
* Merge the decomposed Bloom filter defined by the hasher into this Bloom
@@ -179,7 +178,7 @@ public abstract class AbstractBloomFilter implements BloomFilter {
* this filter, or if the hasher is not the specified one
*/
@Override
- abstract public void merge(Hasher hasher);
+ public abstract void merge(Hasher hasher);
@Override
public int orCardinality(final BloomFilter other) {
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java
index eb1aff4..2781844 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -64,7 +63,7 @@ public class BitSetBloomFilter extends AbstractBloomFilter {
if (other instanceof BitSetBloomFilter) {
verifyShape(other);
final BitSet result = (BitSet) bitSet.clone();
- result.and(((BitSetBloomFilter)other).bitSet);
+ result.and(((BitSetBloomFilter) other).bitSet);
return result.cardinality();
}
return super.andCardinality(other);
@@ -101,7 +100,7 @@ public class BitSetBloomFilter extends AbstractBloomFilter {
public void merge(final BloomFilter other) {
verifyShape(other);
if (other instanceof BitSetBloomFilter) {
- bitSet.or(((BitSetBloomFilter)other).bitSet);
+ bitSet.or(((BitSetBloomFilter) other).bitSet);
} else {
bitSet.or(BitSet.valueOf(other.getBits()));
}
@@ -118,7 +117,7 @@ public class BitSetBloomFilter extends AbstractBloomFilter {
if (other instanceof BitSetBloomFilter) {
verifyShape(other);
final BitSet result = (BitSet) bitSet.clone();
- result.or(((BitSetBloomFilter)other).bitSet);
+ result.or(((BitSetBloomFilter) other).bitSet);
return result.cardinality();
}
return super.orCardinality(other);
@@ -134,7 +133,7 @@ public class BitSetBloomFilter extends AbstractBloomFilter {
if (other instanceof BitSetBloomFilter) {
verifyShape(other);
final BitSet result = (BitSet) bitSet.clone();
- result.xor(((BitSetBloomFilter)other).bitSet);
+ result.xor(((BitSetBloomFilter) other).bitSet);
return result.cardinality();
}
return super.xorCardinality(other);
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java
index a485f53..9d98202 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java
index a373465..d3df6c2 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -105,7 +104,7 @@ public class CountingBloomFilter extends AbstractBloomFilter {
public int andCardinality(final BloomFilter other) {
if (other instanceof CountingBloomFilter) {
final Set<Integer> result = new HashSet<>(counts.keySet());
- result.retainAll(((CountingBloomFilter)other).counts.keySet());
+ result.retainAll(((CountingBloomFilter) other).counts.keySet());
return result.size();
}
return super.andCardinality(other);
@@ -229,7 +228,7 @@ public class CountingBloomFilter extends AbstractBloomFilter {
public void remove(final Hasher hasher) {
verifyHasher(hasher);
final Set<Integer> lst = new HashSet<>();
- hasher.getBits(getShape()).forEachRemaining((Consumer<Integer>)lst::add);
+ hasher.getBits(getShape()).forEachRemaining((Consumer<Integer>) lst::add);
remove(lst.stream());
}
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilter.java
index 4ab8c51..8390144 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilter.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/SetOperations.java b/src/main/java/org/apache/commons/collections4/bloomfilter/SetOperations.java
index 80017a3..48c4362 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/SetOperations.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/SetOperations.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -35,7 +34,7 @@ public final class SetOperations {
* @return the jaccard distance.
*/
public static double cosineDistance(final BloomFilter first, final BloomFilter second) {
- return 1.0 - cosineSimilarity(first,second);
+ return 1.0 - cosineSimilarity(first, second);
}
/**
@@ -64,9 +63,9 @@ public final class SetOperations {
* @return an estimate of the size of the intersection between the two filters.
*/
public static long estimateIntersectionSize(final BloomFilter first, final BloomFilter second) {
- verifyShape(first,second);
+ verifyShape(first, second);
// do subtraction early to avoid Long overflow.
- return estimateSize(first) - estimateUnionSize(first,second) + estimateSize(second);
+ return estimateSize(first) - estimateUnionSize(first, second) + estimateSize(second);
}
/**
@@ -93,7 +92,7 @@ public final class SetOperations {
* @return an estimate of the size of the union between the two filters.
*/
public static long estimateUnionSize(final BloomFilter first, final BloomFilter second) {
- verifyShape(first,second);
+ verifyShape(first, second);
final Shape shape = first.getShape();
final double estimate = -(shape.getNumberOfBits() *
Math.log(1.0 - first.orCardinality(second) * 1.0 / shape.getNumberOfBits())) /
@@ -109,7 +108,7 @@ public final class SetOperations {
* @return the Hamming distance.
*/
public static int hammingDistance(final BloomFilter first, final BloomFilter second) {
- verifyShape(first,second);
+ verifyShape(first, second);
return first.xorCardinality(second);
}
@@ -123,7 +122,7 @@ public final class SetOperations {
* @return the Jaccard distance.
*/
public static double jaccardDistance(final BloomFilter first, final BloomFilter second) {
- return 1.0 - jaccardSimilarity(first,second);
+ return 1.0 - jaccardSimilarity(first, second);
}
/**
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasher.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasher.java
index 68991c5..251402f 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasher.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasher.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunction.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunction.java
index 11b18e4..cbdfd0f 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunction.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunction.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
index 7a58d44..13ed43f 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImpl.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImpl.java
index 5a55f1b..c75973a 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImpl.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImpl.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionValidator.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionValidator.java
index 602dcde..21d2cb0 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionValidator.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionValidator.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java
index 2596396..0ba46aa 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Shape.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Shape.java
index 956575f..34513ba 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Shape.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Shape.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -291,7 +290,7 @@ public class Shape {
* @return the number of bytes in the Bloom filter.
*/
public int getNumberOfBytes() {
- return Double.valueOf(Math.ceil(numberOfBits / (double)Byte.SIZE )).intValue();
+ return Double.valueOf(Math.ceil(numberOfBits / (double) Byte.SIZE )).intValue();
}
/**
@@ -347,4 +346,4 @@ public class Shape {
HashFunctionIdentity.asCommonString(hashFunctionIdentity),
numberOfItems, numberOfBits, numberOfHashFunctions);
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasher.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasher.java
index b17bf8e..676cc2f 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasher.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasher.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5Cyclic.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5Cyclic.java
index f6d4e59..de2063f 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5Cyclic.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5Cyclic.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86Cyclic.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86Cyclic.java
index d4782c9..7f24d06 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86Cyclic.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86Cyclic.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86Iterative.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86Iterative.java
index f612f8c..678d011 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86Iterative.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86Iterative.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterative.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterative.java
index ad97aba..d5cef31 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterative.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterative.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/package-info.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/package-info.java
index 4edb958..1a1096a 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/package-info.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/package-info.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,9 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
/**
* Implementations of org.apache.commons.collections4.bloomfilter.hasher.HasherFunction
* interface.
+ *
* @since 4.5
*/
package org.apache.commons.collections4.bloomfilter.hasher.function;
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/package-info.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/package-info.java
index 43888b7..505f947 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/package-info.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/package-info.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,9 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
/**
* Implementations of org.apache.commons.collections4.bloomfilter.Hasher
* interface.
+ *
* @since 4.5
*/
package org.apache.commons.collections4.bloomfilter.hasher;
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/package-info.java b/src/main/java/org/apache/commons/collections4/bloomfilter/package-info.java
index 0c71933..bfc3d67 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/package-info.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/package-info.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
/**
* A collection of extensible Bloom filter classes and interfaces.
*
diff --git a/src/main/java/org/apache/commons/collections4/comparators/BooleanComparator.java b/src/main/java/org/apache/commons/collections4/comparators/BooleanComparator.java
index 7d27355..8b41506 100644
--- a/src/main/java/org/apache/commons/collections4/comparators/BooleanComparator.java
+++ b/src/main/java/org/apache/commons/collections4/comparators/BooleanComparator.java
@@ -173,7 +173,7 @@ public final class BooleanComparator implements Comparator<Boolean>, Serializabl
public boolean equals(final Object object) {
return (this == object) ||
((object instanceof BooleanComparator) &&
- (this.trueFirst == ((BooleanComparator)object).trueFirst));
+ (this.trueFirst == ((BooleanComparator) object).trueFirst));
}
//-----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java b/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
index 0af0d5d..83ff884 100644
--- a/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
+++ b/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
@@ -182,7 +182,7 @@ public class ComparatorChain<E> implements Comparator<E>, Serializable {
public void setComparator(final int index, final Comparator<E> comparator, final boolean reverse) {
checkLocked();
- comparatorChain.set(index,comparator);
+ comparatorChain.set(index, comparator);
if (reverse == true) {
orderingBits.set(index);
} else {
@@ -278,7 +278,7 @@ public class ComparatorChain<E> implements Comparator<E>, Serializable {
for (int comparatorIndex = 0; comparators.hasNext(); ++comparatorIndex) {
final Comparator<? super E> comparator = comparators.next();
- int retval = comparator.compare(o1,o2);
+ int retval = comparator.compare(o1, o2);
if (retval != 0) {
// invert the order if it is a reverse sort
if (orderingBits.get(comparatorIndex) == true) {
diff --git a/src/main/java/org/apache/commons/collections4/comparators/NullComparator.java b/src/main/java/org/apache/commons/collections4/comparators/NullComparator.java
index 6693735..176c74b 100644
--- a/src/main/java/org/apache/commons/collections4/comparators/NullComparator.java
+++ b/src/main/java/org/apache/commons/collections4/comparators/NullComparator.java
@@ -132,9 +132,15 @@ public class NullComparator<E> implements Comparator<E>, Serializable {
**/
@Override
public int compare(final E o1, final E o2) {
- if(o1 == o2) { return 0; }
- if(o1 == null) { return this.nullsAreHigh ? 1 : -1; }
- if(o2 == null) { return this.nullsAreHigh ? -1 : 1; }
+ if (o1 == o2) {
+ return 0;
+ }
+ if (o1 == null) {
+ return this.nullsAreHigh ? 1 : -1;
+ }
+ if (o2 == null) {
+ return this.nullsAreHigh ? -1 : 1;
+ }
return this.nonNullComparator.compare(o1, o2);
}
@@ -163,14 +169,19 @@ public class NullComparator<E> implements Comparator<E>, Serializable {
**/
@Override
public boolean equals(final Object obj) {
- if(obj == null) { return false; }
- if(obj == this) { return true; }
- if(!obj.getClass().equals(this.getClass())) { return false; }
+ if (obj == null) {
+ return false;
+ }
+ if (obj == this) {
+ return true;
+ }
+ if (!obj.getClass().equals(this.getClass())) {
+ return false;
+ }
final NullComparator<?> other = (NullComparator<?>) obj;
return this.nullsAreHigh == other.nullsAreHigh &&
this.nonNullComparator.equals(other.nonNullComparator);
}
-
}
diff --git a/src/main/java/org/apache/commons/collections4/functors/IfTransformer.java b/src/main/java/org/apache/commons/collections4/functors/IfTransformer.java
index f9e7911..0f804bc 100644
--- a/src/main/java/org/apache/commons/collections4/functors/IfTransformer.java
+++ b/src/main/java/org/apache/commons/collections4/functors/IfTransformer.java
@@ -107,7 +107,7 @@ public class IfTransformer<I, O> implements Transformer<I, O>, Serializable {
*/
@Override
public O transform(final I input) {
- if(iPredicate.evaluate(input)){
+ if (iPredicate.evaluate(input)){
return iTrueTransformer.transform(input);
}
return iFalseTransformer.transform(input);
diff --git a/src/main/java/org/apache/commons/collections4/iterators/BoundedIterator.java b/src/main/java/org/apache/commons/collections4/iterators/BoundedIterator.java
index 266b28c..972f616 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/BoundedIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/BoundedIterator.java
@@ -1,15 +1,18 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
- * or agreed to in writing, software distributed under the License is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.collections4.iterators;
diff --git a/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java b/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java
index cda26ef..3299714 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/IteratorChain.java
@@ -208,7 +208,7 @@ public class IteratorChain<E> implements Iterator<E> {
protected void updateCurrentIterator() {
if (currentIterator == null) {
if (iteratorChain.isEmpty()) {
- currentIterator = EmptyIterator.<E> emptyIterator();
+ currentIterator = EmptyIterator.<E>emptyIterator();
} else {
currentIterator = iteratorChain.remove();
}
diff --git a/src/main/java/org/apache/commons/collections4/iterators/IteratorIterable.java b/src/main/java/org/apache/commons/collections4/iterators/IteratorIterable.java
index f193d83..17ee47e 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/IteratorIterable.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/IteratorIterable.java
@@ -1,15 +1,18 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
- * or agreed to in writing, software distributed under the License is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.collections4.iterators;
@@ -129,7 +132,7 @@ public class IteratorIterable<E> implements Iterable<E> {
@Override
public Iterator<E> iterator() {
if (iterator instanceof ResettableIterator) {
- ((ResettableIterator<? extends E>)iterator).reset();
+ ((ResettableIterator<? extends E>) iterator).reset();
}
return typeSafeIterator;
}
diff --git a/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java
index 955483e..f278f87 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java
@@ -1,9 +1,10 @@
/*
- * Copyright 2013 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/src/main/java/org/apache/commons/collections4/iterators/PeekingIterator.java b/src/main/java/org/apache/commons/collections4/iterators/PeekingIterator.java
index d28060b..80fe2cb 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/PeekingIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/PeekingIterator.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java b/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java
index a529354..f6d393d 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java
index 5f4ea60..62d1f91 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java
@@ -137,7 +137,7 @@ public class SingletonListIterator<E> implements ResettableListIterator<E> {
*/
@Override
public void remove() {
- if(!nextCalled || removed) {
+ if (!nextCalled || removed) {
throw new IllegalStateException();
}
object = null;
diff --git a/src/main/java/org/apache/commons/collections4/iterators/SkippingIterator.java b/src/main/java/org/apache/commons/collections4/iterators/SkippingIterator.java
index f86559b..afa970c 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/SkippingIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/SkippingIterator.java
@@ -1,15 +1,18 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
- * or agreed to in writing, software distributed under the License is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.collections4.iterators;
diff --git a/src/main/java/org/apache/commons/collections4/iterators/ZippingIterator.java b/src/main/java/org/apache/commons/collections4/iterators/ZippingIterator.java
index 0844385..2b30a2a 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/ZippingIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/ZippingIterator.java
@@ -112,7 +112,7 @@ public class ZippingIterator<E> implements Iterator<E> {
return true;
}
- while(iterators.hasNext()) {
+ while (iterators.hasNext()) {
final Iterator<? extends E> childIterator = iterators.next();
if (childIterator.hasNext()) {
nextIterator = childIterator;
diff --git a/src/main/java/org/apache/commons/collections4/keyvalue/MultiKey.java b/src/main/java/org/apache/commons/collections4/keyvalue/MultiKey.java
index c1080f8..1980e76 100644
--- a/src/main/java/org/apache/commons/collections4/keyvalue/MultiKey.java
+++ b/src/main/java/org/apache/commons/collections4/keyvalue/MultiKey.java
@@ -227,8 +227,7 @@ public class MultiKey<K> implements Serializable {
* Calculate the hash code of the instance using the provided keys.
* @param keys the keys to calculate the hash code for
*/
- private void calculateHashCode(final Object[] keys)
- {
+ private void calculateHashCode(final Object[] keys) {
int total = 0;
for (final Object key : keys) {
if (key != null) {
diff --git a/src/main/java/org/apache/commons/collections4/keyvalue/TiedMapEntry.java b/src/main/java/org/apache/commons/collections4/keyvalue/TiedMapEntry.java
index 0400f45..f1306b6 100644
--- a/src/main/java/org/apache/commons/collections4/keyvalue/TiedMapEntry.java
+++ b/src/main/java/org/apache/commons/collections4/keyvalue/TiedMapEntry.java
@@ -108,7 +108,7 @@ public class TiedMapEntry<K, V> implements Map.Entry<K, V>, KeyValue<K, V>, Seri
if (obj instanceof Map.Entry == false) {
return false;
}
- final Map.Entry<?,?> other = (Map.Entry<?,?>) obj;
+ final Map.Entry<?, ?> other = (Map.Entry<?, ?>) obj;
final Object value = getValue();
return
(key == null ? other.getKey() == null : key.equals(other.getKey())) &&
diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java
index 2378d65..a9bdb39 100644
--- a/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java
@@ -1164,7 +1164,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab
* @param <K> the type of the keys in the map
* @param <V> the type of the values in the map
*/
- protected static abstract class HashIterator<K, V> {
+ protected abstract static class HashIterator<K, V> {
/** The parent map */
private final AbstractHashedMap<K, V> parent;
@@ -1349,11 +1349,11 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab
if (obj instanceof Map == false) {
return false;
}
- final Map<?,?> map = (Map<?,?>) obj;
+ final Map<?, ?> map = (Map<?, ?>) obj;
if (map.size() != size()) {
return false;
}
- final MapIterator<?,?> it = mapIterator();
+ final MapIterator<?, ?> it = mapIterator();
try {
while (it.hasNext()) {
final Object key = it.next();
diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java
index 25b980b..b173e82 100644
--- a/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java
@@ -543,7 +543,7 @@ public abstract class AbstractLinkedMap<K, V> extends AbstractHashedMap<K, V> im
/**
* Base Iterator that iterates in link order.
*/
- protected static abstract class LinkIterator<K, V> {
+ protected abstract static class LinkIterator<K, V> {
/** The parent map */
protected final AbstractLinkedMap<K, V> parent;
diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
index e422756..bd5c03d 100644
--- a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
@@ -679,7 +679,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
return false;
}
- final Map.Entry<?, ?> entry = (Map.Entry<?, ?>)obj;
+ final Map.Entry<?, ?> entry = (Map.Entry<?, ?>) obj;
final Object entryKey = entry.getKey(); // convert to hard reference
final Object entryValue = entry.getValue(); // convert to hard reference
if (entryKey == null || entryValue == null) {
@@ -794,7 +794,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
int expectedModCount;
- public ReferenceBaseIterator(final AbstractReferenceMap<K, V> parent) {
+ ReferenceBaseIterator(final AbstractReferenceMap<K, V> parent) {
super();
this.parent = parent;
index = parent.size() != 0 ? parent.data.length : 0;
@@ -876,7 +876,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
static class ReferenceEntrySetIterator<K, V>
extends ReferenceBaseIterator<K, V> implements Iterator<Map.Entry<K, V>> {
- public ReferenceEntrySetIterator(final AbstractReferenceMap<K, V> parent) {
+ ReferenceEntrySetIterator(final AbstractReferenceMap<K, V> parent) {
super(parent);
}
@@ -973,7 +973,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
/** the hashCode of the key (even if the reference points to a value) */
private final int hash;
- public SoftRef(final int hash, final T r, final ReferenceQueue<? super T> q) {
+ SoftRef(final int hash, final T r, final ReferenceQueue<? super T> q) {
super(r, q);
this.hash = hash;
}
@@ -991,7 +991,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
/** the hashCode of the key (even if the reference points to a value) */
private final int hash;
- public WeakRef(final int hash, final T r, final ReferenceQueue<? super T> q) {
+ WeakRef(final int hash, final T r, final ReferenceQueue<? super T> q) {
super(r, q);
this.hash = hash;
}
diff --git a/src/main/java/org/apache/commons/collections4/map/Flat3Map.java b/src/main/java/org/apache/commons/collections4/map/Flat3Map.java
index fbb71c7..4be81a7 100644
--- a/src/main/java/org/apache/commons/collections4/map/Flat3Map.java
+++ b/src/main/java/org/apache/commons/collections4/map/Flat3Map.java
@@ -809,7 +809,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
private final int index;
private volatile boolean removed;
- public FlatMapEntry(final Flat3Map<K, V> parent, final int index) {
+ FlatMapEntry(final Flat3Map<K, V> parent, final int index) {
this.parent = parent;
this.index = index;
this.removed = false;
@@ -918,7 +918,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
}
- static abstract class EntryIterator<K, V> {
+ abstract static class EntryIterator<K, V> {
private final Flat3Map<K, V> parent;
private int nextIndex = 0;
private FlatMapEntry<K, V> currentEntry = null;
@@ -926,7 +926,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
/**
* Create a new Flat3Map.EntryIterator.
*/
- public EntryIterator(final Flat3Map<K, V> parent) {
+ EntryIterator(final Flat3Map<K, V> parent) {
this.parent = parent;
}
@@ -1031,7 +1031,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
/**
* KeySetIterator
*/
- static class KeySetIterator<K> extends EntryIterator<K, Object> implements Iterator<K>{
+ static class KeySetIterator<K> extends EntryIterator<K, Object> implements Iterator<K> {
@SuppressWarnings("unchecked")
KeySetIterator(final Flat3Map<K, ?> parent) {
diff --git a/src/main/java/org/apache/commons/collections4/map/LRUMap.java b/src/main/java/org/apache/commons/collections4/map/LRUMap.java
index 8fbf872..a49b0dc 100644
--- a/src/main/java/org/apache/commons/collections4/map/LRUMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/LRUMap.java
@@ -269,7 +269,7 @@ public class LRUMap<K, V>
if (entry.after != header) {
modCount++;
// remove
- if(entry.before == null) {
+ if (entry.before == null) {
throw new IllegalStateException("Entry.before is null." +
" This should not occur if your keys are immutable, and you have used synchronization properly.");
}
diff --git a/src/main/java/org/apache/commons/collections4/map/LazyMap.java b/src/main/java/org/apache/commons/collections4/map/LazyMap.java
index d12ce49..ceeaeb1 100644
--- a/src/main/java/org/apache/commons/collections4/map/LazyMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/LazyMap.java
@@ -86,7 +86,7 @@ public class LazyMap<K, V> extends AbstractMapDecorator<K, V> implements Seriali
* @throws NullPointerException if map or factory is null
* @since 4.0
*/
- public static <K, V> LazyMap<K, V> lazyMap(final Map<K, V> map, final Factory< ? extends V> factory) {
+ public static <K, V> LazyMap<K, V> lazyMap(final Map<K, V> map, final Factory<? extends V> factory) {
return new LazyMap<>(map, factory);
}
@@ -113,7 +113,7 @@ public class LazyMap<K, V> extends AbstractMapDecorator<K, V> implements Seriali
* @param factory the factory to use, must not be null
* @throws NullPointerException if map or factory is null
*/
- protected LazyMap(final Map<K,V> map, final Factory<? extends V> factory) {
+ protected LazyMap(final Map<K, V> map, final Factory<? extends V> factory) {
super(map);
this.factory = FactoryTransformer.factoryTransformer(Objects.requireNonNull(factory, "factory"));
}
@@ -125,7 +125,7 @@ public class LazyMap<K, V> extends AbstractMapDecorator<K, V> implements Seriali
* @param factory the factory to use, must not be null
* @throws NullPointerException if map or factory is null
*/
- protected LazyMap(final Map<K,V> map, final Transformer<? super K, ? extends V> factory) {
+ protected LazyMap(final Map<K, V> map, final Transformer<? super K, ? extends V> factory) {
super(map);
this.factory = Objects.requireNonNull(factory, "factory");
}
diff --git a/src/main/java/org/apache/commons/collections4/map/LazySortedMap.java b/src/main/java/org/apache/commons/collections4/map/LazySortedMap.java
index 36418e7..47bbe8b 100644
--- a/src/main/java/org/apache/commons/collections4/map/LazySortedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/LazySortedMap.java
@@ -63,7 +63,7 @@ import org.apache.commons.collections4.Transformer;
* @param <V> the type of the values in this map
* @since 3.0
*/
-public class LazySortedMap<K,V> extends LazyMap<K,V> implements SortedMap<K,V> {
+public class LazySortedMap<K, V> extends LazyMap<K, V> implements SortedMap<K, V> {
/** Serialization version */
private static final long serialVersionUID = 2715322183617658933L;
@@ -108,7 +108,7 @@ public class LazySortedMap<K,V> extends LazyMap<K,V> implements SortedMap<K,V> {
* @param factory the factory to use, must not be null
* @throws NullPointerException if map or factory is null
*/
- protected LazySortedMap(final SortedMap<K,V> map, final Factory<? extends V> factory) {
+ protected LazySortedMap(final SortedMap<K, V> map, final Factory<? extends V> factory) {
super(map, factory);
}
@@ -119,7 +119,7 @@ public class LazySortedMap<K,V> extends LazyMap<K,V> implements SortedMap<K,V> {
* @param factory the factory to use, must not be null
* @throws NullPointerException if map or factory is null
*/
- protected LazySortedMap(final SortedMap<K,V> map, final Transformer<? super K, ? extends V> factory) {
+ protected LazySortedMap(final SortedMap<K, V> map, final Transformer<? super K, ? extends V> factory) {
super(map, factory);
}
@@ -129,8 +129,8 @@ public class LazySortedMap<K,V> extends LazyMap<K,V> implements SortedMap<K,V> {
*
* @return the decorated map
*/
- protected SortedMap<K,V> getSortedMap() {
- return (SortedMap<K,V>) map;
+ protected SortedMap<K, V> getSortedMap() {
+ return (SortedMap<K, V>) map;
}
//-----------------------------------------------------------------------
@@ -150,20 +150,20 @@ public class LazySortedMap<K,V> extends LazyMap<K,V> implements SortedMap<K,V> {
}
@Override
- public SortedMap<K,V> subMap(final K fromKey, final K toKey) {
- final SortedMap<K,V> map = getSortedMap().subMap(fromKey, toKey);
+ public SortedMap<K, V> subMap(final K fromKey, final K toKey) {
+ final SortedMap<K, V> map = getSortedMap().subMap(fromKey, toKey);
return new LazySortedMap<>(map, factory);
}
@Override
- public SortedMap<K,V> headMap(final K toKey) {
- final SortedMap<K,V> map = getSortedMap().headMap(toKey);
+ public SortedMap<K, V> headMap(final K toKey) {
+ final SortedMap<K, V> map = getSortedMap().headMap(toKey);
return new LazySortedMap<>(map, factory);
}
@Override
- public SortedMap<K,V> tailMap(final K fromKey) {
- final SortedMap<K,V> map = getSortedMap().tailMap(fromKey);
+ public SortedMap<K, V> tailMap(final K fromKey) {
+ final SortedMap<K, V> map = getSortedMap().tailMap(fromKey);
return new LazySortedMap<>(map, factory);
}
diff --git a/src/main/java/org/apache/commons/collections4/map/ListOrderedMap.java b/src/main/java/org/apache/commons/collections4/map/ListOrderedMap.java
index 46b8a68..e50fac9 100644
--- a/src/main/java/org/apache/commons/collections4/map/ListOrderedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/ListOrderedMap.java
@@ -600,7 +600,7 @@ public class ListOrderedMap<K, V>
private final List<K> insertOrder;
private Set<Map.Entry<K, V>> entrySet;
- public EntrySetView(final ListOrderedMap<K, V> parent, final List<K> insertOrder) {
+ EntrySetView(final ListOrderedMap<K, V> parent, final List<K> insertOrder) {
super();
this.parent = parent;
this.insertOrder = insertOrder;
diff --git a/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java b/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java
index c0aa64b..2a22186 100644
--- a/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java
@@ -91,7 +91,7 @@ public class MultiValueMap<K, V> extends AbstractMapDecorator<K, Object> impleme
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
public static <K, V> MultiValueMap<K, V> multiValueMap(final Map<K, ? super Collection<V>> map) {
- return MultiValueMap.<K, V, ArrayList> multiValueMap((Map<K, ? super Collection>) map, ArrayList.class);
+ return MultiValueMap.<K, V, ArrayList>multiValueMap((Map<K, ? super Collection>) map, ArrayList.class);
}
/**
@@ -517,7 +517,7 @@ public class MultiValueMap<K, V> extends AbstractMapDecorator<K, Object> impleme
private final Collection<V> values;
private final Iterator<V> iterator;
- public ValuesIterator(final Object key) {
+ ValuesIterator(final Object key) {
this.key = key;
this.values = getCollection(key);
this.iterator = values.iterator();
@@ -552,7 +552,7 @@ public class MultiValueMap<K, V> extends AbstractMapDecorator<K, Object> impleme
private final Class<T> clazz;
- public ReflectionFactory(final Class<T> clazz) {
+ ReflectionFactory(final Class<T> clazz) {
this.clazz = clazz;
}
diff --git a/src/main/java/org/apache/commons/collections4/map/SingletonMap.java b/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
index 68d6be3..3587bc3 100644
--- a/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
@@ -572,11 +572,11 @@ public class SingletonMap<K, V>
if (obj instanceof Map == false) {
return false;
}
- final Map<?,?> other = (Map<?,?>) obj;
+ final Map<?, ?> other = (Map<?, ?>) obj;
if (other.size() != 1) {
return false;
}
- final Map.Entry<?,?> entry = other.entrySet().iterator().next();
+ final Map.Entry<?, ?> entry = other.entrySet().iterator().next();
return isEqualKey(entry.getKey()) && isEqualValue(entry.getValue());
}
diff --git a/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java b/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java
index ecd0a23..8a2c51c 100644
--- a/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java
@@ -500,7 +500,7 @@ public final class StaticBucketMap<K, V> extends AbstractIterableMap<K, V> {
/**
* The lock object, which also includes a count of the nodes in this lock.
*/
- private final static class Lock {
+ private static final class Lock {
public int size;
}
diff --git a/src/main/java/org/apache/commons/collections4/multimap/AbstractListValuedMap.java b/src/main/java/org/apache/commons/collections4/multimap/AbstractListValuedMap.java
index ca7bc2d..878bfb9 100644
--- a/src/main/java/org/apache/commons/collections4/multimap/AbstractListValuedMap.java
+++ b/src/main/java/org/apache/commons/collections4/multimap/AbstractListValuedMap.java
@@ -109,7 +109,7 @@ public abstract class AbstractListValuedMap<K, V> extends AbstractMultiValuedMap
*/
private class WrappedList extends WrappedCollection implements List<V> {
- public WrappedList(final K key) {
+ WrappedList(final K key) {
super(key);
}
@@ -220,13 +220,13 @@ public abstract class AbstractListValuedMap<K, V> extends AbstractMultiValuedMap
private List<V> values;
private ListIterator<V> iterator;
- public ValuesListIterator(final K key) {
+ ValuesListIterator(final K key) {
this.key = key;
this.values = ListUtils.emptyIfNull(getMap().get(key));
this.iterator = values.listIterator();
}
- public ValuesListIterator(final K key, final int index) {
+ ValuesListIterator(final K key, final int index) {
this.key = key;
this.values = ListUtils.emptyIfNull(getMap().get(key));
this.iterator = values.listIterator(index);
diff --git a/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java b/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java
index d5414e3..b05d901 100644
--- a/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java
+++ b/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java
@@ -398,7 +398,7 @@ public abstract class AbstractMultiValuedMap<K, V> implements MultiValuedMap<K,
protected final K key;
- public WrappedCollection(final K key) {
+ WrappedCollection(final K key) {
this.key = key;
}
@@ -636,7 +636,7 @@ public abstract class AbstractMultiValuedMap<K, V> implements MultiValuedMap<K,
*/
private class MultiValuedMapEntry extends AbstractMapEntry<K, V> {
- public MultiValuedMapEntry(final K key, final V value) {
+ MultiValuedMapEntry(final K key, final V value) {
super(key, value);
}
@@ -656,7 +656,7 @@ public abstract class AbstractMultiValuedMap<K, V> implements MultiValuedMap<K,
private Entry<K, V> current = null;
- public MultiValuedMapIterator() {
+ MultiValuedMapIterator() {
this.it = AbstractMultiValuedMap.this.entries().iterator();
}
@@ -734,7 +734,7 @@ public abstract class AbstractMultiValuedMap<K, V> implements MultiValuedMap<K,
private final Collection<V> values;
private final Iterator<V> iterator;
- public ValuesIterator(final Object key) {
+ ValuesIterator(final Object key) {
this.key = key;
this.values = getMap().get(key);
this.iterator = values.iterator();
diff --git a/src/main/java/org/apache/commons/collections4/multimap/AbstractSetValuedMap.java b/src/main/java/org/apache/commons/collections4/multimap/AbstractSetValuedMap.java
index 08e4316..b25a9ae 100644
--- a/src/main/java/org/apache/commons/collections4/multimap/AbstractSetValuedMap.java
+++ b/src/main/java/org/apache/commons/collections4/multimap/AbstractSetValuedMap.java
@@ -109,7 +109,7 @@ public abstract class AbstractSetValuedMap<K, V> extends AbstractMultiValuedMap<
*/
private class WrappedSet extends WrappedCollection implements Set<V> {
- public WrappedSet(final K key) {
+ WrappedSet(final K key) {
super(key);
}
@@ -133,5 +133,4 @@ public abstract class AbstractSetValuedMap<K, V> extends AbstractMultiValuedMap<
}
}
-
}
diff --git a/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java
index 511f402..d086e3d 100644
--- a/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java
+++ b/src/main/java/org/apache/commons/collections4/multiset/AbstractMapMultiSet.java
@@ -165,7 +165,7 @@ public abstract class AbstractMapMultiSet<E> extends AbstractMultiSet<E> {
*
* @param parent the parent multiset
*/
- public MapBasedMultiSetIterator(final AbstractMapMultiSet<E> parent) {
+ MapBasedMultiSetIterator(final AbstractMapMultiSet<E> parent) {
this.parent = parent;
this.entryIterator = parent.map.entrySet().iterator();
this.current = null;
diff --git a/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java
index 1c4248c..a0a6813 100644
--- a/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java
+++ b/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java
@@ -138,7 +138,7 @@ public abstract class AbstractMultiSet<E> extends AbstractCollection<E> implemen
*
* @param parent the parent multiset
*/
- public MultiSetIterator(final AbstractMultiSet<E> parent) {
+ MultiSetIterator(final AbstractMultiSet<E> parent) {
this.parent = parent;
this.entryIterator = parent.entrySet().iterator();
this.current = null;
@@ -404,7 +404,7 @@ public abstract class AbstractMultiSet<E> extends AbstractCollection<E> implemen
/**
* Inner class AbstractEntry.
*/
- protected static abstract class AbstractEntry<E> implements Entry<E> {
+ protected abstract static class AbstractEntry<E> implements Entry<E> {
@Override
public boolean equals(final Object object) {
diff --git a/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java
index 2376c3c..e5c39d1 100644
--- a/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java
+++ b/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java
@@ -104,7 +104,7 @@ public final class UnmodifiableMultiSet<E>
//-----------------------------------------------------------------------
@Override
public Iterator<E> iterator() {
- return UnmodifiableIterator.<E> unmodifiableIterator(decorated().iterator());
+ return UnmodifiableIterator.<E>unmodifiableIterator(decorated().iterator());
}
@Override
diff --git a/src/main/java/org/apache/commons/collections4/overview.html b/src/main/java/org/apache/commons/collections4/overview.html
index ba9e932..af3f718 100644
--- a/src/main/java/org/apache/commons/collections4/overview.html
+++ b/src/main/java/org/apache/commons/collections4/overview.html
@@ -1,19 +1,19 @@
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
<body>
<p>
Commons-Collections contains implementations, enhancements and utilities
diff --git a/src/main/java/org/apache/commons/collections4/properties/AbstractPropertiesFactory.java b/src/main/java/org/apache/commons/collections4/properties/AbstractPropertiesFactory.java
index 249905b..00423fa 100644
--- a/src/main/java/org/apache/commons/collections4/properties/AbstractPropertiesFactory.java
+++ b/src/main/java/org/apache/commons/collections4/properties/AbstractPropertiesFactory.java
@@ -40,7 +40,7 @@ import java.util.Properties;
*/
public abstract class AbstractPropertiesFactory<T extends Properties> {
- /**
+ /**
* Enumerat5es property formats.
*
* @since 4.5
@@ -82,7 +82,7 @@ public abstract class AbstractPropertiesFactory<T extends Properties> {
* @throws IllegalArgumentException Thrown if the input contains a malformed Unicode escape sequence.
*/
public T load(final ClassLoader classLoader, final String name) throws IOException {
- try (final InputStream inputStream = classLoader.getResourceAsStream(name)) {
+ try (InputStream inputStream = classLoader.getResourceAsStream(name)) {
return load(inputStream, PropertyFormat.toPropertyFormat(name));
}
}
@@ -100,7 +100,7 @@ public abstract class AbstractPropertiesFactory<T extends Properties> {
* the file.
*/
public T load(final File file) throws FileNotFoundException, IOException {
- try (final FileInputStream inputStream = new FileInputStream(file)) {
+ try (FileInputStream inputStream = new FileInputStream(file)) {
return load(inputStream, PropertyFormat.toPropertyFormat(file.getName()));
}
}
@@ -154,7 +154,7 @@ public abstract class AbstractPropertiesFactory<T extends Properties> {
* @throws IllegalArgumentException Thrown if the input contains a malformed Unicode escape sequence.
*/
public T load(final Path path) throws IOException {
- try (final InputStream inputStream = Files.newInputStream(path)) {
+ try (InputStream inputStream = Files.newInputStream(path)) {
return load(inputStream, PropertyFormat.toPropertyFormat(Objects.toString(path.getFileName(), null)));
}
}
@@ -182,7 +182,7 @@ public abstract class AbstractPropertiesFactory<T extends Properties> {
* @throws IllegalArgumentException Thrown if the input contains a malformed Unicode escape sequence.
*/
public T load(final String name) throws IOException {
- try (final FileInputStream inputStream = new FileInputStream(name)) {
+ try (FileInputStream inputStream = new FileInputStream(name)) {
return load(inputStream, PropertyFormat.toPropertyFormat(name));
}
}
@@ -208,7 +208,7 @@ public abstract class AbstractPropertiesFactory<T extends Properties> {
* @throws IllegalArgumentException Thrown if the input contains a malformed Unicode escape sequence.
*/
public T load(final URL url) throws IOException {
- try (final InputStream inputStream = url.openStream()) {
+ try (InputStream inputStream = url.openStream()) {
return load(inputStream, PropertyFormat.toPropertyFormat(url.getFile()));
}
}
diff --git a/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java b/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java
index b03e735..4376b22 100644
--- a/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java
+++ b/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java
@@ -183,7 +183,7 @@ public class SequencesComparator<T> {
vDown[1+offset] = start1;
vUp[1+offset] = end1 + 1;
- for (int d = 0; d <= offset ; ++d) {
+ for (int d = 0; d <= offset; ++d) {
// Down
for (int k = -d; k <= d; k += 2) {
// First step
@@ -314,7 +314,7 @@ public class SequencesComparator<T> {
* @param end end index of the snake
* @param diag diagonal number
*/
- public Snake(final int start, final int end, final int diag) {
+ Snake(final int start, final int end, final int diag) {
this.start = start;
this.end = end;
this.diag = diag;
diff --git a/src/main/java/org/apache/commons/collections4/trie/AbstractBitwiseTrie.java b/src/main/java/org/apache/commons/collections4/trie/AbstractBitwiseTrie.java
index e6a5334..ab5ffe2 100644
--- a/src/main/java/org/apache/commons/collections4/trie/AbstractBitwiseTrie.java
+++ b/src/main/java/org/apache/commons/collections4/trie/AbstractBitwiseTrie.java
@@ -150,11 +150,11 @@ public abstract class AbstractBitwiseTrie<K, V> extends AbstractMap<K, V>
protected V value;
- public BasicEntry(final K key) {
+ BasicEntry(final K key) {
this.key = key;
}
- public BasicEntry(final K key, final V value) {
+ BasicEntry(final K key, final V value) {
this.key = key;
this.value = value;
}
@@ -198,7 +198,7 @@ public abstract class AbstractBitwiseTrie<K, V> extends AbstractMap<K, V>
return false;
}
- final Map.Entry<?, ?> other = (Map.Entry<?, ?>)o;
+ final Map.Entry<?, ?> other = (Map.Entry<?, ?>) o;
if (compare(key, other.getKey())
&& compare(value, other.getValue())) {
return true;
diff --git a/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java b/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java
index 9b694a8..f06ea3d 100644
--- a/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java
+++ b/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java
@@ -55,7 +55,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
*/
private transient volatile Set<K> keySet;
private transient volatile Collection<V> values;
- private transient volatile Set<Map.Entry<K,V>> entrySet;
+ private transient volatile Set<Map.Entry<K, V>> entrySet;
/** The current size of the {@link org.apache.commons.collections4.Trie}. */
private transient int size = 0;
@@ -192,7 +192,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
TrieEntry<K, V> addEntry(final TrieEntry<K, V> entry, final int lengthInBits) {
TrieEntry<K, V> current = root.left;
TrieEntry<K, V> path = root;
- while(true) {
+ while (true) {
if (current.bitIndex >= entry.bitIndex
|| current.bitIndex <= path.bitIndex) {
entry.predecessor = entry;
@@ -247,14 +247,14 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
* <p>
* This may throw ClassCastException if the object is not of type K.
*/
- TrieEntry<K,V> getEntry(final Object k) {
+ TrieEntry<K, V> getEntry(final Object k) {
final K key = castKey(k);
if (key == null) {
return null;
}
final int lengthInBits = lengthInBits(key);
- final TrieEntry<K,V> entry = getNearestEntryForKey(key, lengthInBits);
+ final TrieEntry<K, V> entry = getNearestEntryForKey(key, lengthInBits);
return !entry.isEmpty() && compareKeys(key, entry.key) ? entry : null;
}
@@ -385,7 +385,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
}
@Override
- public Set<Map.Entry<K,V>> entrySet() {
+ public Set<Map.Entry<K, V>> entrySet() {
if (entrySet == null) {
entrySet = new EntrySet();
}
@@ -453,7 +453,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
TrieEntry<K, V> getNearestEntryForKey(final K key, final int lengthInBits) {
TrieEntry<K, V> current = root.left;
TrieEntry<K, V> path = root;
- while(true) {
+ while (true) {
if (current.bitIndex <= path.bitIndex) {
return current;
}
@@ -752,7 +752,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
* Goes left through the tree until it finds a valid node.
*/
TrieEntry<K, V> followLeft(TrieEntry<K, V> node) {
- while(true) {
+ while (true) {
TrieEntry<K, V> child = node.left;
// if we hit root and it didn't have a node, go right instead.
if (child.isEmpty()) {
@@ -878,7 +878,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
* Returns an entry strictly higher than the given key,
* or null if no such entry exists.
*/
- TrieEntry<K,V> higherEntry(final K key) {
+ TrieEntry<K, V> higherEntry(final K key) {
// TODO: Cleanup so that we don't actually have to add/remove from the
// tree. (We do it here because there are other well-defined
// functions to perform the search.)
@@ -931,7 +931,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
* Returns a key-value mapping associated with the least key greater
* than or equal to the given key, or null if there is no such key.
*/
- TrieEntry<K,V> ceilingEntry(final K key) {
+ TrieEntry<K, V> ceilingEntry(final K key) {
// Basically:
// Follow the steps of adding an entry, but instead...
//
@@ -990,7 +990,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
* Returns a key-value mapping associated with the greatest key
* strictly less than the given key, or null if there is no such key.
*/
- TrieEntry<K,V> lowerEntry(final K key) {
+ TrieEntry<K, V> lowerEntry(final K key) {
// Basically:
// Follow the steps of adding an entry, but instead...
//
@@ -1042,7 +1042,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
* Returns a key-value mapping associated with the greatest key
* less than or equal to the given key, or null if there is no such key.
*/
- TrieEntry<K,V> floorEntry(final K key) {
+ TrieEntry<K, V> floorEntry(final K key) {
// TODO: Cleanup so that we don't actually have to add/remove from the
// tree. (We do it here because there are other well-defined
// functions to perform the search.)
@@ -1091,7 +1091,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
TrieEntry<K, V> subtree(final K prefix, final int offsetInBits, final int lengthInBits) {
TrieEntry<K, V> current = root.left;
TrieEntry<K, V> path = root;
- while(true) {
+ while (true) {
if (current.bitIndex <= path.bitIndex || lengthInBits <= current.bitIndex) {
break;
}
@@ -1264,7 +1264,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
/**
* A {@link org.apache.commons.collections4.Trie} is a set of {@link TrieEntry} nodes.
*/
- protected static class TrieEntry<K,V> extends BasicEntry<K, V> {
+ protected static class TrieEntry<K, V> extends BasicEntry<K, V> {
private static final long serialVersionUID = 4596023148184140013L;
@@ -1272,16 +1272,16 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
protected int bitIndex;
/** The parent of this entry. */
- protected TrieEntry<K,V> parent;
+ protected TrieEntry<K, V> parent;
/** The left child of this entry. */
- protected TrieEntry<K,V> left;
+ protected TrieEntry<K, V> left;
/** The right child of this entry. */
- protected TrieEntry<K,V> right;
+ protected TrieEntry<K, V> right;
/** The entry who uplinks to this entry. */
- protected TrieEntry<K,V> predecessor;
+ protected TrieEntry<K, V> predecessor;
public TrieEntry(final K key, final V value, final int bitIndex) {
super(key, value);
@@ -1365,7 +1365,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
buffer.append(", ");
if (predecessor != null) {
- if(predecessor.bitIndex == -1) {
+ if (predecessor.bitIndex == -1) {
buffer.append("predecessor=").append("ROOT");
} else {
buffer.append("predecessor=").append(predecessor.getKey()).append(" [").
@@ -1382,10 +1382,10 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
/**
* This is a entry set view of the {@link Trie} as returned by {@link Map#entrySet()}.
*/
- private class EntrySet extends AbstractSet<Map.Entry<K,V>> {
+ private class EntrySet extends AbstractSet<Map.Entry<K, V>> {
@Override
- public Iterator<Map.Entry<K,V>> iterator() {
+ public Iterator<Map.Entry<K, V>> iterator() {
return new EntryIterator();
}
@@ -1395,7 +1395,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
return false;
}
- final TrieEntry<K,V> candidate = getEntry(((Map.Entry<?, ?>)o).getKey());
+ final TrieEntry<K, V> candidate = getEntry(((Map.Entry<?, ?>) o).getKey());
return candidate != null && candidate.equals(o);
}
@@ -1425,9 +1425,9 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
/**
* An {@link Iterator} that returns {@link Entry} Objects.
*/
- private class EntryIterator extends TrieIterator<Map.Entry<K,V>> {
+ private class EntryIterator extends TrieIterator<Map.Entry<K, V>> {
@Override
- public Map.Entry<K,V> next() {
+ public Map.Entry<K, V> next() {
return nextEntry();
}
}
@@ -1552,12 +1552,12 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
/**
* Returns the next {@link TrieEntry}.
*/
- protected TrieEntry<K,V> nextEntry() {
+ protected TrieEntry<K, V> nextEntry() {
if (expectedModCount != AbstractPatriciaTrie.this.modCount) {
throw new ConcurrentModificationException();
}
- final TrieEntry<K,V> e = next;
+ final TrieEntry<K, V> e = next;
if (e == null) {
throw new NoSuchElementException();
}
@@ -1650,12 +1650,12 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
return nextEntry;
}
- protected TrieEntry<K,V> previousEntry() {
+ protected TrieEntry<K, V> previousEntry() {
if (expectedModCount != AbstractPatriciaTrie.this.modCount) {
throw new ConcurrentModificationException();
}
- final TrieEntry<K,V> e = previous;
+ final TrieEntry<K, V> e = previous;
if (e == null) {
throw new NoSuchElementException();
}
@@ -1881,7 +1881,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
@Override
public K firstKey() {
- Map.Entry<K,V> e = null;
+ Map.Entry<K, V> e = null;
if (fromKey == null) {
e = firstEntry();
} else {
@@ -1901,7 +1901,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
@Override
public K lastKey() {
- Map.Entry<K,V> e;
+ Map.Entry<K, V> e;
if (toKey == null) {
e = lastEntry();
} else {
@@ -1965,7 +1965,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
/**
* Creates a {@link RangeEntrySet}.
*/
- public RangeEntrySet(final RangeMap delegate) {
+ RangeEntrySet(final RangeMap delegate) {
this.delegate = Objects.requireNonNull(delegate, "delegate");
}
@@ -2049,14 +2049,14 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
/**
* An {@link Iterator} for {@link RangeEntrySet}s.
*/
- private final class EntryIterator extends TrieIterator<Map.Entry<K,V>> {
+ private final class EntryIterator extends TrieIterator<Map.Entry<K, V>> {
private final K excludedKey;
/**
* Creates a {@link EntryIterator}.
*/
- private EntryIterator(final TrieEntry<K,V> first, final TrieEntry<K,V> last) {
+ private EntryIterator(final TrieEntry<K, V> first, final TrieEntry<K, V> last) {
super(first);
this.excludedKey = last != null ? last.getKey() : null;
}
@@ -2067,7 +2067,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
}
@Override
- public Map.Entry<K,V> next() {
+ public Map.Entry<K, V> next() {
if (next == null || compare(next.key, excludedKey)) {
throw new NoSuchElementException();
}
@@ -2124,7 +2124,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
fromKey = entry == null ? null : entry.getKey();
if (fromKey != null) {
- final TrieEntry<K, V> prior = previousEntry((TrieEntry<K, V>)entry);
+ final TrieEntry<K, V> prior = previousEntry((TrieEntry<K, V>) entry);
fromKey = prior == null ? null : prior.getKey();
}
@@ -2138,7 +2138,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
toKey = entry == null ? null : entry.getKey();
if (toKey != null) {
- entry = nextEntry((TrieEntry<K, V>)entry);
+ entry = nextEntry((TrieEntry<K, V>) entry);
toKey = entry == null ? null : entry.getKey();
}
@@ -2152,7 +2152,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
public K firstKey() {
fixup();
- Map.Entry<K,V> e = null;
+ Map.Entry<K, V> e = null;
if (fromKey == null) {
e = firstEntry();
} else {
@@ -2171,7 +2171,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
public K lastKey() {
fixup();
- Map.Entry<K,V> e = null;
+ Map.Entry<K, V> e = null;
if (toKey == null) {
e = lastEntry();
} else {
@@ -2275,7 +2275,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
/**
* Creates a {@link PrefixRangeEntrySet}.
*/
- public PrefixRangeEntrySet(final PrefixRangeMap delegate) {
+ PrefixRangeEntrySet(final PrefixRangeMap delegate) {
super(delegate);
this.delegate = delegate;
}
@@ -2286,14 +2286,14 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
}
@Override
- public Iterator<Map.Entry<K,V>> iterator() {
+ public Iterator<Map.Entry<K, V>> iterator() {
if (AbstractPatriciaTrie.this.modCount != expectedModCount) {
prefixStart = subtree(delegate.prefix, delegate.offsetInBits, delegate.lengthInBits);
expectedModCount = AbstractPatriciaTrie.this.modCount;
}
if (prefixStart == null) {
- final Set<Map.Entry<K,V>> empty = Collections.emptySet();
+ final Set<Map.Entry<K, V>> empty = Collections.emptySet();
return empty.iterator();
} else if (delegate.lengthInBits > prefixStart.bitIndex) {
return new SingletonIterator(prefixStart);
@@ -2311,7 +2311,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
private int hit = 0;
- public SingletonIterator(final TrieEntry<K, V> entry) {
+ SingletonIterator(final TrieEntry<K, V> entry) {
this.entry = entry;
}
@@ -2368,7 +2368,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
}
@Override
- public Map.Entry<K,V> next() {
+ public Map.Entry<K, V> next() {
final Map.Entry<K, V> entry = nextEntry();
if (lastOne) {
next = null;
@@ -2419,7 +2419,7 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
stream.defaultReadObject();
root = new TrieEntry<>(null, null, -1);
final int size = stream.readInt();
- for(int i = 0; i < size; i++){
+ for (int i = 0; i < size; i++){
final K k = (K) stream.readObject();
final V v = (V) stream.readObject();
put(k, v);
diff --git a/src/main/java/org/apache/commons/collections4/trie/analyzer/StringKeyAnalyzer.java b/src/main/java/org/apache/commons/collections4/trie/analyzer/StringKeyAnalyzer.java
index 9552e5a..a6d25a5 100644
--- a/src/main/java/org/apache/commons/collections4/trie/analyzer/StringKeyAnalyzer.java
+++ b/src/main/java/org/apache/commons/collections4/trie/analyzer/StringKeyAnalyzer.java
@@ -74,7 +74,7 @@ public class StringKeyAnalyzer extends KeyAnalyzer<String> {
// then figure out which bit makes the difference
// and return it.
char k = 0, f = 0;
- for(int i = 0; i < length; i++) {
+ for (int i = 0; i < length; i++) {
final int index1 = beginIndex1 + i;
final int index2 = beginIndex2 + i;
diff --git a/src/site/xdoc/bloomFilters.xml b/src/site/xdoc/bloomFilters.xml
index ce1b9fb..3f551d7 100644
--- a/src/site/xdoc/bloomFilters.xml
+++ b/src/site/xdoc/bloomFilters.xml
@@ -1,13 +1,13 @@
<?xml version="1.0"?>
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
- license agreements. See the NOTICE file distributed with this work for additional
- information regarding copyright ownership. The ASF licenses this file to
- You under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of
- the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
- by applicable law or agreed to in writing, software distributed under the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied. See the License for the specific
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ You under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. -->
<document>
@@ -442,7 +442,7 @@ hadoopBloomFilter.add( new Key( "pear".getBytes () ) ); ]]></source>
</li>
</ol>
<subsection id="S2.SS1"
- name="2.1 Exploring the HashFunctionIdentity
+ name="2.1 Exploring the HashFunctionIdentity
and HashFunction">
<p>
@@ -961,7 +961,7 @@ for ( Map.Entry < BloomFilter , Collection < T >> entry : shards ) {
}
}
}
-// result is either null or contains the desired value.
+// result is either null or contains the desired value.
]]></source>
</subsection>
<subsection id="S3.SS3" name="3.3 Future directions">
@@ -1134,4 +1134,4 @@ for ( Map.Entry < BloomFilter , Collection < T >> entry : shards ) {
</section>
</body>
-</document>
\ No newline at end of file
+</document>
diff --git a/src/site/xdoc/history.xml b/src/site/xdoc/history.xml
index d8e1203..fb19a53 100644
--- a/src/site/xdoc/history.xml
+++ b/src/site/xdoc/history.xml
@@ -104,10 +104,10 @@ Notably MultiValueMap is a new more flexible implementation of MultiHashMap.
</p>
<p>
-<b>Collections 3.2.2</b> Serialization support for unsafe classes in the functor package is disabled by default as
-this can be exploited for remote code execution attacks. To re-enable the feature the system property
-"org.apache.commons.collections.enableUnsafeSerialization" needs to be set to "true". Classes considered to be
-unsafe are: CloneTransformer, ForClosure, InstantiateFactory, InstantiateTransformer, InvokerTransformer,
+<b>Collections 3.2.2</b> Serialization support for unsafe classes in the functor package is disabled by default as
+this can be exploited for remote code execution attacks. To re-enable the feature the system property
+"org.apache.commons.collections.enableUnsafeSerialization" needs to be set to "true". Classes considered to be
+unsafe are: CloneTransformer, ForClosure, InstantiateFactory, InstantiateTransformer, InvokerTransformer,
PrototypeCloneFactory, PrototypeSerializationFactory, WhileClosure. Fixes COLLECTIONS-580. Other bug fixes as well.
</p>
@@ -130,11 +130,11 @@ API for Iterable instances (FluentIterable).
</p>
<p>
Additionally, serialization support for unsafe classes in the functor package
-has been completely removed (see entry for Collections 3.2.2 for more details).
+has been completely removed (see entry for Collections 3.2.2 for more details).
</p>
<p>
-<b>Collections 4.2</b> fixes some bugs in 4.1 and adds a few new enhancements:
+<b>Collections 4.2</b> fixes some bugs in 4.1 and adds a few new enhancements:
Updates the platform requirement from Java 6 to 7,
adds Automatic-Module-Name MANIFEST entry for Java 9 compatibility, and
adds a few new APIs.
diff --git a/src/site/xdoc/pick.xml b/src/site/xdoc/pick.xml
index 3a610e5..a9bc1fd 100644
--- a/src/site/xdoc/pick.xml
+++ b/src/site/xdoc/pick.xml
@@ -33,18 +33,18 @@ Commons-Collections and the Java Collections Framework provide a wide variety of
<script>
<![CDATA[
function showHide(showObj,hideObj) {
- if (document.getElementById) { // DOM3 = IE5, NS6
+ if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById(showObj).style.display='block';
document.getElementById(hideObj).style.display='none';
- } else {
- if (document.layers) { // Netscape 4
+ } else {
+ if (document.layers) { // Netscape 4
document.layers[showObj].display='block';
document.layers[hideObj].display='none';
} else { // IE 4
eval("document.all."+showObj+".style.display='block'");
eval("document.all."+hideObj+".style.display='none'");
- }
- }
+ }
+ }
}
function showMapMain() {
showHide('mapmain','collectionmain');
diff --git a/src/site/xdoc/release_3_2_2.xml b/src/site/xdoc/release_3_2_2.xml
index 47f50b2..f6e7548 100644
--- a/src/site/xdoc/release_3_2_2.xml
+++ b/src/site/xdoc/release_3_2_2.xml
@@ -44,8 +44,8 @@ All users are strongly encouraged to updated to this release.
<h3>Compatibility</h3>
<p>
This release is fully source and binary compatible with 3.2. For changes since the
-3.1 release see the <a href="release_3_2.html">3.2 Release Notes</a>. Note that the method
-'protected java.util.Set createSetBasedOnList(java.util.Set, java.util.List)' has been
+3.1 release see the <a href="release_3_2.html">3.2 Release Notes</a>. Note that the method
+'protected java.util.Set createSetBasedOnList(java.util.Set, java.util.List)' has been
added.
</p>
diff --git a/src/site/xdoc/release_4_0.xml b/src/site/xdoc/release_4_0.xml
index 447f878..9766d08 100644
--- a/src/site/xdoc/release_4_0.xml
+++ b/src/site/xdoc/release_4_0.xml
@@ -76,7 +76,7 @@ have changed.
<li>BoundedBuffer: use either ArrayBlockingBuffer(capacity) or LinkedBlockingBuffer(capacity) in java.util.concurrent</li>
<li>UnboundedFifoBuffer: use either java.util.LinkedList or java.util.concurrent.LinkedBlockingBuffer</li>
</ul>
-</li>
+</li>
<li>Removed features now supported by the JDK or other Apache Commons libraries
<ul>
<li>FastArrayList: use java.util.concurrent.CopyOnWriteArrayList</li>
@@ -126,20 +126,20 @@ have changed.
<li>CollectionUtils#isEqualCollection(Collection, Collection, Equator). Thanks to Matt Lachman.</li>
<li>*Utils#emptyIfNull(*) methods in classes CollectionUtils, ListUtils, SetUtils and MapUtils. Thanks to Arman Sharif.</li>
<li>CollectionUtils#containsAll(Collection, Collection) with guaranteed runtime complexity of O(n + m) and space complexity of O(n). This method may yield much better performance than Collection.containsAll(Collection) depending on the use-case and type of collection used. Thanks to Adrian Nistor, Mert Guldur.</li>
-<li>CollectionUtils#permutations(Collection) to generate all permutations of a collection. Thanks to Benoit Corne.</li>
+<li>CollectionUtils#permutations(Collection) to generate all permutations of a collection. Thanks to Benoit Corne.</li>
<li>ListUtils#select() and ListUtils#selectRejected() methods. Thanks to Adam Dyga.</li>
<li>ListUtils#partition() to split a List into consecutive sublists. Thanks to Chris Shayan.</li>
<li>CollectionUtils#forAllDo(Iterator, Closure). Thanks to Adrian Cumiskey.</li>
<li>ListUtils#defaultIfNull(List, List). Thanks to Ivan Hristov.</li>
<li>CollectionUtils#filterInverse(Iterable, Predicate). Thanks to Jean-Noel Rouvignac.</li>
<li>CollectionUtils#subtract(Iterable, Iterable, Predicate). Thanks to Chris Shayan.</li>
-<li>CollectionUtils#collate(...) to merge two sorted Collections using the standard O(n) merge algorithm. Thanks to Julius Davies.</li>
+<li>CollectionUtils#collate(...) to merge two sorted Collections using the standard O(n) merge algorithm. Thanks to Julius Davies.</li>
<li>CollectionUtils#extractSingleton(Collection). Thanks to Geoffrey De Smet.</li>
<li>MapUtils#populateMap(MultiMap, ...) to support also "MultiMap" instances as input. Thanks to John Hunsley.</li>
<li>ListUtils#indexOf(List, Predicate). Thanks to Nathan Egge.</li>
<li>MapUtils#populateMap(Map, Iterable, Transformer, ...). Thanks to Dave Meikle.</li>
<li>Added new method "get(int)" to "CircularFifoQueue". Thanks to Sebb.</li>
-<li>Added serialVersionUID fields for "CompositeCollection", "CompositeSet", "EmptyMapMutator", "EmptySetMutator". Thanks to sebb.</li>
+<li>Added serialVersionUID fields for "CompositeCollection", "CompositeSet", "EmptyMapMutator", "EmptySetMutator". Thanks to sebb.</li>
<li>Added support for using custom "Equator" objects in "EqualPredicate". Thanks to Stephen Kestle.</li>
<li>Added method "CollatingIterator#getIteratorIndex()". Thanks to Fredrik Kjellberg.</li>
<li>Added serialization support for "TreeBidiMap". Thanks to Christian Gruenberg.</li>
@@ -161,7 +161,7 @@ have changed.
<li>Renamed "V MultiMap#remove(K, V)" to "boolean MultiMap#removeMapping(K, V)"
to avoid future conflicts with a default method of the Map interface in Java 8.</li>
<li>Refactored the test framework for Bag implementations to extend from "AbstractCollectionTest" by decorating
- the concrete Bag instance with a CollectionBag or CollectionSortedBag.</li>
+ the concrete Bag instance with a CollectionBag or CollectionSortedBag.</li>
<li>"UnmodifiableBoundedCollection" does now also implement the marker interface "Unmodifiable"
similar as all other unmodifiable decorators.</li>
<li>"UnmodifiableTrie#unmodifiableTrie(Trie)" will not decorate again an already unmodifiable Trie.
@@ -213,66 +213,66 @@ have changed.
<li>Tree traversal with a TreeListIterator will not be affected anymore by the removal of an element directly after a call to previous(). Thanks to Jeffrey Barnes.</li>
<li>Adapt and/or ignore several unit tests when run on a IBM J9 VM (specification version 1.6.0) due to a faulty "java.util.TreeMap" implementation.</li>
<li>SetUniqueList.set(int, E) now works correctly if the object to be inserted is already placed at the given position. Thanks to Thomas Vahrst, John Vasileff.</li>
-<li>MultiKeyMap.clone() now correctly calls super.clone(). Thanks to Thomas Vahrst.</li>
-<li>Improve performance of "TreeList#addAll" and "TreeList(Collection)" by converting the input collection into an AVL tree and efficiently merge it into the existing tree. Thanks to Jeffrey Barnes.</li>
-<li>Fixed performance issue in "SetUniqueList#retainAll" method for large collections. Thanks to Mert Guldur.</li>
+<li>MultiKeyMap.clone() now correctly calls super.clone(). Thanks to Thomas Vahrst.</li>
+<li>Improve performance of "TreeList#addAll" and "TreeList(Collection)" by converting the input collection into an AVL tree and efficiently merge it into the existing tree. Thanks to Jeffrey Barnes.</li>
+<li>Fixed performance issue in "SetUniqueList#retainAll" method for large collections. Thanks to Mert Guldur.</li>
<li>Fixed performance issue in "ListOrderedSet#retainAll" method for large collections. Thanks to Adrian Nistor.</li>
<li>Improved performance of "ListOrderedMap#remove(Object)" method. Thanks to Adrian Nistor.</li>
-<li>Update javadoc for "ListUtils#lazyList()" and "ListUtils#fixedSizeList()". Thanks to Benedikt Ritter.</li>
-<li>Added clarifying javadoc wrt runtime complexity of "AbstractDualBidiMap#retainAll". Thanks to Adrian Nistor.</li>
+<li>Update javadoc for "ListUtils#lazyList()" and "ListUtils#fixedSizeList()". Thanks to Benedikt Ritter.</li>
+<li>Added clarifying javadoc wrt runtime complexity of "AbstractDualBidiMap#retainAll". Thanks to Adrian Nistor.</li>
<li>Added clarifying javadoc wrt runtime complexity of "AbstractLinkedList#retainAll". Thanks to Adrian Nistor.</li>
-<li>Added clarifying javadoc wrt runtime complexity of "AbstractLinkedList#removeAll". Thanks to Adrian Nistor.</li>
+<li>Added clarifying javadoc wrt runtime complexity of "AbstractLinkedList#removeAll". Thanks to Adrian Nistor.</li>
<li>Fixed several compilation issues with older Java 1.6 compilers.</li>
-<li>Improved performance of "removeAll()" method for sets returned by "DualHashBidiMap#entrySet()". Thanks to Adrian Nistor.</li>
+<li>Improved performance of "removeAll()" method for sets returned by "DualHashBidiMap#entrySet()". Thanks to Adrian Nistor.</li>
<li>Improved performance of "CollectionUtils#subtract" methods. Thanks to Adrian Nistor.</li>
-<li>Fixed possible "IndexOutOfBoundsException" in "ListOrderedMap#putAll". Thanks to Adrian Nistor.</li>
+<li>Fixed possible "IndexOutOfBoundsException" in "ListOrderedMap#putAll". Thanks to Adrian Nistor.</li>
<li>Improved performance of "SetUniqueList#addAll" method. Thanks to Adrian Nistor.</li>
-<li>Improved performance of "ListOrderedSet#addAll" method. Thanks to Adrian Nistor.</li>
+<li>Improved performance of "ListOrderedSet#addAll" method. Thanks to Adrian Nistor.</li>
<li>Improved performance of "SetUniqueList#removeAll". Thanks to Adrian Nistor.</li>
-<li>Improved performance of "ListOrderedSet#remove(Object)" in case the object is not contained in the Set. Thanks to Adrian Nistor.</li>
+<li>Improved performance of "ListOrderedSet#remove(Object)" in case the object is not contained in the Set. Thanks to Adrian Nistor.</li>
<li>Improved performance of "ListUtils#subtract" method. Thanks to Adrian Nistor.</li>
-<li>Added missing null check in "CollectionUtils#addIgnoreNull(Collection, Object)". Thanks to Shin Hwei Tan.</li>
+<li>Added missing null check in "CollectionUtils#addIgnoreNull(Collection, Object)". Thanks to Shin Hwei Tan.</li>
<li>Fixed javadoc for "MapUtils#toProperties(Map)". Thanks to Shin Hwei Tan.</li>
<li>Clarified javadoc for "TransformerUtils#mapTransformer" for null input. Thanks to Shin Hwei Tan.</li>
-<li>Clarified javadoc for "FactoryUtils#prototypeFactory" for null input. Thanks to Shin Hwei Tan.</li>
+<li>Clarified javadoc for "FactoryUtils#prototypeFactory" for null input. Thanks to Shin Hwei Tan.</li>
<li>Fixed inconsistent javadoc for "MapUtils#synchronizedMap(Map)". Thanks to Shin Hwei Tan.</li>
-<li>Fixed infinite loop when calling "UnmodifiableBoundedCollection#unmodifiableBoundedCollection()". Thanks to Dave Brosius.</li>
-<li>Fixed javadoc for several methods wrt expected NullPointerExceptions. Thanks to Shin Hwei Tan.</li>
-<li>"DualTreeBidiMap" now uses the correct comparator for the reverse map during de-serialization.</li>
+<li>Fixed infinite loop when calling "UnmodifiableBoundedCollection#unmodifiableBoundedCollection()". Thanks to Dave Brosius.</li>
+<li>Fixed javadoc for several methods wrt expected NullPointerExceptions. Thanks to Shin Hwei Tan.</li>
+<li>"DualTreeBidiMap" now uses the correct comparator for the reverse map during de-serialization.</li>
<li>"TransformedMap" in the package "splitmap" can now be serialized.</li>
<li>"FilterListIterator#hasNext" does not throw a NullPointerException anymore to comply to the Java iterator specification. Thanks to Sai Zhang.</li>
<li>"ListUtils#intersection(List, List)" will now also work correctly if there are duplicate elements in the provided lists. Thanks to Mark Shead.</li>
-<li>"AbstractCollectionDecorator" will now use internally "decorated()" to access the decorated collection. Thanks to Adam Gent.</li>
-<li>Removed debug output in "MapUtils#getNumber(Map)". Thanks to Michael Akerman.</li>
+<li>"AbstractCollectionDecorator" will now use internally "decorated()" to access the decorated collection. Thanks to Adam Gent.</li>
+<li>Removed debug output in "MapUtils#getNumber(Map)". Thanks to Michael Akerman.</li>
<li>Fixed javadoc for all "transformedXXX(XXX)" methods in the respective Utils classes to clarify that existing objects in the list are not transformed. Thanks to Paul Benedict.</li>
<li>Singleton classes in package "functors" are now correctly de-serialized. Thanks to Goran Hacek.</li>
-<li>Removed broken methods "equals(Object)" and "hashCode()" in class "NOPClosure". Thanks to Goran Hacek.</li>
-<li>Simplified exceptions as the cause is available from the parent. Thanks to sebb.</li>
+<li>Removed broken methods "equals(Object)" and "hashCode()" in class "NOPClosure". Thanks to Goran Hacek.</li>
+<li>Simplified exceptions as the cause is available from the parent. Thanks to sebb.</li>
<li>Fixed cache assignment for "TreeBidiMap#entrySet". Thanks to sebb.</li>
-<li>Synchronized access to lock in "StaticBucketMap#size()". Thanks to sebb.</li>
-<li>Added clarification to javadoc of "ListOrderedMap" that "IdentityMap" and "CaseInsensitiveMap" are not supported. Thanks to Tom Parker.</li>
+<li>Synchronized access to lock in "StaticBucketMap#size()". Thanks to sebb.</li>
+<li>Added clarification to javadoc of "ListOrderedMap" that "IdentityMap" and "CaseInsensitiveMap" are not supported. Thanks to Tom Parker.</li>
<li>Improve javadoc of "CollatingIterator" wrt the used "Comparator" and throw a NullPointerException in "CollatingIterator#least" if no comparator is set. Thanks to Michael Krkoska.</li>
-<li>"LRUMap#keySet()#remove(Object)" will not throw a "ConcurrentModificationException" anymore. Thanks to Joerg Schaible.</li>
-<li>Improved performance of "ListUtils#intersection(List, List)". Thanks to Thomas Rogan, Jilles van Gurp.</li>
+<li>"LRUMap#keySet()#remove(Object)" will not throw a "ConcurrentModificationException" anymore. Thanks to Joerg Schaible.</li>
+<li>Improved performance of "ListUtils#intersection(List, List)". Thanks to Thomas Rogan, Jilles van Gurp.</li>
<li>Changed behavior of "CaseInsensitiveMap" constructor to be compliant with "HashMap" in case the initial capacity is set to zero. Thanks to Maarten Brak.</li>
-<li>Improved performance of "StaticBucketMap#putAll(Map)" by iterating over the entry set. Thanks to sebb.</li>
+<li>Improved performance of "StaticBucketMap#putAll(Map)" by iterating over the entry set. Thanks to sebb.</li>
<li>Avoid redundant null check in "IteratorUtils#getIterator(Object)". Thanks to sebb.</li>
<li>Use a private method to populate the object in "AbstractHashedMap(Map)". Thanks to sebb.</li>
-<li>Fixed javadoc of "LRUMap" wrt to the maxSize parameter of the constructor. Thanks to ori.</li>
+<li>Fixed javadoc of "LRUMap" wrt to the maxSize parameter of the constructor. Thanks to ori.</li>
<li>Use of final keyword where applicable, minor performance improvements by properly initializing the capacity of newly created collections when known in advance. Thanks to Peter Lawrey, Gary Gregory.</li>
<li>"SetUniqueList#subList()#contains(Object)" will now correctly check the subList rather than the parent list. Thanks to Christian Semrau.</li>
-<li>"SetUniqueList#set(int, Object)" will now correctly enforce the uniqueness constraint. Thanks to Rafał Figas,Bjorn Townsend.</li>
-<li>Improved javadoc for "Unmodifiable*" classes wrt behavior when the users tries to modify the collection. Thanks to Emmanuel Bourg.</li>
+<li>"SetUniqueList#set(int, Object)" will now correctly enforce the uniqueness constraint. Thanks to Rafał Figas,Bjorn Townsend.</li>
+<li>Improved javadoc for "Unmodifiable*" classes wrt behavior when the users tries to modify the collection. Thanks to Emmanuel Bourg.</li>
<li>"CaseInsensitiveMap" will now convert input strings to lower-case in a locale-independant manner. Thanks to Benjamin Bentmann.</li>
<li>Fixed javadoc for "ListUtils#transformedList(List)" to clarify that existing objects in the list are not transformed. Thanks to Paul Benedict.</li>
<li>"MultiKey" will now be correctly serialized/de-serialized. Thanks to Joerg Schaible.</li>
-<li>Fixed javadoc for methods "firstKey()" and "lastKey()" in class "AbstractLinkedMap". Thanks to Lisen Mu.</li>
+<li>Fixed javadoc for methods "firstKey()" and "lastKey()" in class "AbstractLinkedMap". Thanks to Lisen Mu.</li>
<li>"Flat3Map#remove(Object)" will now return the correct value mapped to the removed key if the size of the map is less or equal 3. Thanks to ori.</li>
<li>Removed unused variables in "TreeBidiMap". Thanks to Henri Yandell.</li>
<li>"SetUniqueList.addAll(int, Collection)" now correctly add the collection at the provided index. Thanks to Joe Kelly.</li>
-<li>Fixed several unit tests which were using parameters to "assertEquals(...)" in wrong order. Thanks to Mark Hindess.</li>
+<li>Fixed several unit tests which were using parameters to "assertEquals(...)" in wrong order. Thanks to Mark Hindess.</li>
<li>"MultiValueMap#put(Object, Object)" and "MultiValueMap#putAll(Object, Collection)" now correctly return if the map has changed by this operation.</li>
-<li>"CollectionUtils#removeAll" wrongly called "ListUtils#retainAll". Thanks to Tom Leccese.</li>
+<li>"CollectionUtils#removeAll" wrongly called "ListUtils#retainAll". Thanks to Tom Leccese.</li>
<li>Calling "setValue(Object)" on any Entry returned by a "Flat3Map" will now correctly set the value for the current entry. Thanks to Matt Bishop.</li>
<li>"MultiKey#toString()" will now use "Arrays#toString(List)". Thanks to Hendrik Maryns.</li>
</ul>
diff --git a/src/site/xdoc/release_4_2.xml b/src/site/xdoc/release_4_2.xml
index 13d0097..6b04cd9 100644
--- a/src/site/xdoc/release_4_2.xml
+++ b/src/site/xdoc/release_4_2.xml
@@ -29,8 +29,8 @@ Apache Commons Collections is a project to develop and maintain collection
classes based on and inspired by the JDK collection framework.
</p>
<p>
-This 4.2 release is a minor and updates the platform requirement from Java 6 to 7.
-This release fixes several bugs present in previous releases of the 4.X branch.
+This 4.2 release is a minor and updates the platform requirement from Java 6 to 7.
+This release fixes several bugs present in previous releases of the 4.X branch.
</p>
<p>
All users are strongly encouraged to updated to this release.
diff --git a/src/site/xdoc/security-reports.xml b/src/site/xdoc/security-reports.xml
index 287bc96..e3f0804 100644
--- a/src/site/xdoc/security-reports.xml
+++ b/src/site/xdoc/security-reports.xml
@@ -55,7 +55,7 @@
<subsection name="Fixed in Apache Commons Collections 3.2.2 and 4.1">
<p><b>High: Remote Code Execution during object de-serialization</b></p>
-
+
<p>The Apache Commons Collections library contains various classes
in the "functor" package which are serializable and use reflection.
This can be exploited for remote code execution attacks by injecting
@@ -64,9 +64,9 @@
library in their classpath and do not perform any kind of input
validation.</p>
- <p>The implemented fix can be tracked via its related issue
+ <p>The implemented fix can be tracked via its related issue
<a href="https://issues.apache.org/jira/browse/COLLECTIONS-580">COLLECTIONS-580</a>:</p>
-
+
<ul>
<li><b>3.2.2</b>: de-serialization of unsafe classes in the functor package
will trigger an "UnsupportedOperationException" by default. In order to re-enable
@@ -83,11 +83,11 @@
problems prior to their publication. No CVE id was assigned for the Apache Commons
Collections library, please refer to [1] or [2] for more information about the general
problem with Java serialization.</p>
-
+
<p>Affects: 3.0 - 4.0</p>
-
+
<p>Related links:</p>
-
+
<ol>
<li>Vulnerability Report for Oracle Weblogic Server:
<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-4852">CVE-2015-4852</a></li>
diff --git a/src/site/xdoc/userguide.xml b/src/site/xdoc/userguide.xml
index c705f2d..77d2161 100644
--- a/src/site/xdoc/userguide.xml
+++ b/src/site/xdoc/userguide.xml
@@ -44,18 +44,18 @@ This document highlights some key features to get you started.
</ul>
<subsection name='Note On Synchronization'>
<p>
-Commons-collections uses a design approach to synchronization similar
-to the standard Java collections. The majority of the various implementations
-of collections, maps and bags are not thread safe without additional
-synchronization. The appropriate <code>synchronizeXXX</code> method on <code>Collections</code> is one way that these implementations can be synchronized for use in a
-multithreaded application.
+Commons-collections uses a design approach to synchronization similar
+to the standard Java collections. The majority of the various implementations
+of collections, maps and bags are not thread safe without additional
+synchronization. The appropriate <code>synchronizeXXX</code> method on <code>Collections</code> is one way that these implementations can be synchronized for use in a
+multithreaded application.
</p>
<p>
-The class level javadocs should indicate whether a particular
+The class level javadocs should indicate whether a particular
implementation is safe for multithreaded access without additional
synchronization. Where there is no expicit indication that the implementation
-is thread safe then it should be assumed that synchronization is required.
-Please report the missing documentation to the commons development team.
+is thread safe then it should be assumed that synchronization is required.
+Please report the missing documentation to the commons development team.
</p>
</subsection>
@@ -69,7 +69,7 @@ Thus, the <code>Set</code> and <code>SortedSet</code> interfaces are provided fo
These classes provide useful methods for working with that collection type.
</p>
<p>
-The most methods are found on the two 'root' collection utility classes -
+The most methods are found on the two 'root' collection utility classes -
<code>CollectionUtils</code> and <code>MapUtils.</code>
As all other collection interfaces extend <code>Collection</code> or <code>Map</code> these utilities can be used widely.
They include intersection, counting, iteration, functor and typecasting operations amongst others.
@@ -92,7 +92,7 @@ MapIterator it = map.mapIterator();
while (it.hasNext()) {
Object key = it.next();
Object value = it.getValue();
-
+
it.setValue(newValue);
}
</source>
diff --git a/src/test/java/org/apache/commons/collections4/BagUtilsTest.java b/src/test/java/org/apache/commons/collections4/BagUtilsTest.java
index f3471dc..803832f 100644
--- a/src/test/java/org/apache/commons/collections4/BagUtilsTest.java
+++ b/src/test/java/org/apache/commons/collections4/BagUtilsTest.java
@@ -76,7 +76,7 @@ public class BagUtilsTest {
assertTrue("Returned object should be a PredicatedBag.",
bag instanceof PredicatedBag);
try {
- BagUtils.predicatedBag(null,truePredicate);
+ BagUtils.predicatedBag(null, truePredicate);
fail("Expecting NullPointerException for null bag.");
} catch (final NullPointerException ex) {
// expected
diff --git a/src/test/java/org/apache/commons/collections4/BulkTest.java b/src/test/java/org/apache/commons/collections4/BulkTest.java
index 80e055a..c078ce3 100644
--- a/src/test/java/org/apache/commons/collections4/BulkTest.java
+++ b/src/test/java/org/apache/commons/collections4/BulkTest.java
@@ -287,7 +287,7 @@ class BulkTestSuiteMaker {
*
* @param startingClass the starting class
*/
- public BulkTestSuiteMaker(final Class<? extends BulkTest> startingClass) {
+ BulkTestSuiteMaker(final Class<? extends BulkTest> startingClass) {
this.startingClass = startingClass;
}
@@ -340,7 +340,7 @@ class BulkTestSuiteMaker {
* @param m The simple test method
*/
void addTest(final BulkTest bulk, final Method m) {
- final BulkTest bulk2 = (BulkTest)bulk.clone();
+ final BulkTest bulk2 = (BulkTest) bulk.clone();
bulk2.setName(m.getName());
bulk2.verboseName = prefix + "." + m.getName();
if (ignored.contains(bulk2.verboseName)) {
@@ -366,7 +366,7 @@ class BulkTestSuiteMaker {
BulkTest bulk2;
try {
- bulk2 = (BulkTest)m.invoke(bulk, (Object[]) null);
+ bulk2 = (BulkTest) m.invoke(bulk, (Object[]) null);
if (bulk2 == null) {
return;
}
diff --git a/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java b/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java
index bc37d7d..25f77c7 100644
--- a/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java
+++ b/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java
@@ -652,7 +652,7 @@ public class CollectionUtilsTest extends MockTestCase {
testPredicate = equalPredicate((Number) 45);
test = CollectionUtils.find(collectionA, testPredicate);
assertTrue(test == null);
- assertNull(CollectionUtils.find(null,testPredicate));
+ assertNull(CollectionUtils.find(null, testPredicate));
assertNull(CollectionUtils.find(collectionA, null));
}
@@ -1276,7 +1276,7 @@ public class CollectionUtilsTest extends MockTestCase {
assertTrue(collection.contains(2L) && !collection.contains(1));
}
- Transformer<Object, Integer> TRANSFORM_TO_INTEGER = input -> Integer.valueOf(((Long)input).intValue());
+ Transformer<Object, Integer> TRANSFORM_TO_INTEGER = input -> Integer.valueOf(((Long) input).intValue());
@Test
public void transform1() {
@@ -1741,27 +1741,27 @@ public class CollectionUtilsTest extends MockTestCase {
assertTrue(collectionA.contains(5));
}
- @Test(expected=IndexOutOfBoundsException.class)
+ @Test(expected = IndexOutOfBoundsException.class)
public void getNegative() {
- CollectionUtils.get((Object)collectionA, -3);
+ CollectionUtils.get((Object) collectionA, -3);
}
- @Test(expected=IndexOutOfBoundsException.class)
+ @Test(expected = IndexOutOfBoundsException.class)
public void getPositiveOutOfBounds() {
- CollectionUtils.get((Object)collectionA.iterator(), 30);
+ CollectionUtils.get((Object) collectionA.iterator(), 30);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void get1() {
- CollectionUtils.get((Object)null, 0);
+ CollectionUtils.get((Object) null, 0);
}
@Test
public void get() {
- assertEquals(2, CollectionUtils.get((Object)collectionA, 2));
- assertEquals(2, CollectionUtils.get((Object)collectionA.iterator(), 2));
+ assertEquals(2, CollectionUtils.get((Object) collectionA, 2));
+ assertEquals(2, CollectionUtils.get((Object) collectionA.iterator(), 2));
final Map<Integer, Integer> map = CollectionUtils.getCardinalityMap(collectionA);
- assertEquals(map.entrySet().iterator().next(), CollectionUtils.get((Object)map, 0));
+ assertEquals(map.entrySet().iterator().next(), CollectionUtils.get((Object) map, 0));
}
@Test
diff --git a/src/test/java/org/apache/commons/collections4/IterableUtilsTest.java b/src/test/java/org/apache/commons/collections4/IterableUtilsTest.java
index dbe83ca..5cb4045 100644
--- a/src/test/java/org/apache/commons/collections4/IterableUtilsTest.java
+++ b/src/test/java/org/apache/commons/collections4/IterableUtilsTest.java
@@ -272,7 +272,7 @@ public class IterableUtilsTest {
testPredicate = equalPredicate((Number) 45);
test = IterableUtils.find(iterableA, testPredicate);
assertTrue(test == null);
- assertNull(IterableUtils.find(null,testPredicate));
+ assertNull(IterableUtils.find(null, testPredicate));
try {
IterableUtils.find(iterableA, null);
fail("expecting NullPointerException");
diff --git a/src/test/java/org/apache/commons/collections4/ListUtilsTest.java b/src/test/java/org/apache/commons/collections4/ListUtilsTest.java
index 11b09cf..f2069e8 100644
--- a/src/test/java/org/apache/commons/collections4/ListUtilsTest.java
+++ b/src/test/java/org/apache/commons/collections4/ListUtilsTest.java
@@ -117,7 +117,7 @@ public class ListUtilsTest {
two.add("a");
two.add("b");
two.add("b");
- assertEquals(ListUtils.intersection(one,two),ListUtils.intersection(two, one));
+ assertEquals(ListUtils.intersection(one, two), ListUtils.intersection(two, one));
}
@Test
@@ -328,7 +328,7 @@ public class ListUtilsTest {
index = ListUtils.indexOf(fullList, testPredicate);
assertEquals(index, -1);
- assertEquals(ListUtils.indexOf(null,testPredicate), -1);
+ assertEquals(ListUtils.indexOf(null, testPredicate), -1);
assertEquals(ListUtils.indexOf(fullList, null), -1);
}
diff --git a/src/test/java/org/apache/commons/collections4/MapUtilsTest.java b/src/test/java/org/apache/commons/collections4/MapUtilsTest.java
index de34607..049ff22 100644
--- a/src/test/java/org/apache/commons/collections4/MapUtilsTest.java
+++ b/src/test/java/org/apache/commons/collections4/MapUtilsTest.java
@@ -53,7 +53,6 @@ import org.junit.Test;
/**
* Tests for MapUtils.
- *
*/
@SuppressWarnings("boxing")
public class MapUtilsTest extends AbstractAvailableLocalesTest {
@@ -276,7 +275,7 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
@Test
public void testConvertResourceBundle() {
- final Map<String, String> in = new HashMap<>( 5 , 1 );
+ final Map<String, String> in = new HashMap<>(5, 1);
in.put("1", "A");
in.put("2", "B");
in.put("3", "C");
@@ -352,7 +351,7 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final String INDENT = " ";
- final Map<Integer, String> map = new TreeMap<>(); // treeMap guarantees order across JDKs for test
+ final Map<Integer, String> map = new TreeMap<>(); // treeMap guarantees order across JDKs for test
map.put(2, "B");
map.put(3, "C");
map.put(4, null);
@@ -376,7 +375,7 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final String INDENT = " ";
- final Map<Integer, String> map = new TreeMap<>(); // treeMap guarantees order across JDKs for test
+ final Map<Integer, String> map = new TreeMap<>(); // treeMap guarantees order across JDKs for test
map.put(2, "B");
map.put(3, "C");
map.put(4, null);
@@ -590,7 +589,7 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
out.reset();
- final Map<Integer, String> inner = new TreeMap<>(); // treeMap guarantees order across JDKs for test
+ final Map<Integer, String> inner = new TreeMap<>(); // treeMap guarantees order across JDKs for test
inner.put(2, "B");
inner.put(3, "C");
@@ -626,7 +625,7 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
out.reset();
- final Map<Integer, String> inner = new TreeMap<>(); // treeMap guarantees order across JDKs for test
+ final Map<Integer, String> inner = new TreeMap<>(); // treeMap guarantees order across JDKs for test
inner.put(2, "B");
inner.put(3, "C");
@@ -647,7 +646,7 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final String LABEL = "Print Map";
final String INDENT = " ";
- final Map<Integer, Object> grandfather = new TreeMap<>();// treeMap guarantees order across JDKs for test
+ final Map<Integer, Object> grandfather = new TreeMap<>(); // treeMap guarantees order across JDKs for test
final Map<Integer, Object> father = new TreeMap<>();
final Map<Integer, Object> son = new TreeMap<>();
@@ -694,7 +693,7 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final String LABEL = "Print Map";
final String INDENT = " ";
- final Map<Integer, Object> grandfather = new TreeMap<>();// treeMap guarantees order across JDKs for test
+ final Map<Integer, Object> grandfather = new TreeMap<>(); // treeMap guarantees order across JDKs for test
final Map<Integer, Object> father = new TreeMap<>();
final Map<Integer, Object> son = new TreeMap<>();
@@ -821,11 +820,11 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
/**
* Test class for populateMap(MultiMap).
*/
- public static class X implements Comparable<X> {
+ static class X implements Comparable<X> {
int key;
String name;
- public X(final int key, final String name) {
+ X(final int key, final String name) {
this.key = key;
this.name = name;
}
@@ -834,7 +833,6 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
public int compareTo(final X o) {
return key - o.key | name.compareTo(o.name);
}
-
}
@Test
@@ -849,7 +847,7 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
// Now test key transform population
final MultiValueMap<Integer, X> map = MultiValueMap.multiValueMap(new TreeMap<Integer, Collection<X>>());
- MapUtils.populateMap(map, list, (Transformer<X, Integer>) input -> input.key, TransformerUtils.<X> nopTransformer());
+ MapUtils.populateMap(map, list, (Transformer<X, Integer>) input -> input.key, TransformerUtils.<X>nopTransformer());
assertEquals(list.size(), map.totalSize());
for (int i = 0; i < list.size(); i++) {
@@ -938,18 +936,18 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final Map<String, Double> in = new HashMap<>();
in.put("key", 2.0);
- assertEquals(2.0, MapUtils.getDoubleValue(in,"key", 0.0), 0);
- assertEquals(2.0, MapUtils.getDoubleValue(in,"key"), 0);
- assertEquals(1.0, MapUtils.getDoubleValue(in,"noKey", 1.0), 0);
- assertEquals(5.0, MapUtils.getDoubleValue(in,"noKey", (key)->{
+ assertEquals(2.0, MapUtils.getDoubleValue(in, "key", 0.0), 0);
+ assertEquals(2.0, MapUtils.getDoubleValue(in, "key"), 0);
+ assertEquals(1.0, MapUtils.getDoubleValue(in, "noKey", 1.0), 0);
+ assertEquals(5.0, MapUtils.getDoubleValue(in, "noKey", (key)->{
//sometimes the default value need to be calculated,such as System.currentTimeMillis()
return 5.0D;
}),0);
- assertEquals(0, MapUtils.getDoubleValue(in,"noKey"), 0);
- assertEquals(2.0, MapUtils.getDouble(in,"key", 0.0), 0);
- assertEquals(1.0, MapUtils.getDouble(in,"noKey", 1.0), 0);
- assertEquals(1.0, MapUtils.getDouble(in,"noKey", (key)->{
+ assertEquals(0, MapUtils.getDoubleValue(in, "noKey"), 0);
+ assertEquals(2.0, MapUtils.getDouble(in, "key", 0.0), 0);
+ assertEquals(1.0, MapUtils.getDouble(in, "noKey", 1.0), 0);
+ assertEquals(1.0, MapUtils.getDouble(in, "noKey", (key)->{
return 1.0;
}), 0);
@@ -958,7 +956,7 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final char decimalSeparator = getDecimalSeparator();
inStr.put("str1", "2" + decimalSeparator + "0");
- assertEquals(MapUtils.getDoubleValue(inStr,"str1", 0.0), 2.0, 0);
+ assertEquals(MapUtils.getDoubleValue(inStr, "str1", 0.0), 2.0, 0);
}
@Test
@@ -966,16 +964,16 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final Map<String, Float> in = new HashMap<>();
in.put("key", 2.0f);
- assertEquals(2.0, MapUtils.getFloatValue(in,"key", 0.0f), 0);
- assertEquals(2.0, MapUtils.getFloatValue(in,"key"), 0);
- assertEquals(1.0, MapUtils.getFloatValue(in,"noKey", 1.0f), 0);
- assertEquals(1.0, MapUtils.getFloatValue(in,"noKey", (key)->{
+ assertEquals(2.0, MapUtils.getFloatValue(in, "key", 0.0f), 0);
+ assertEquals(2.0, MapUtils.getFloatValue(in, "key"), 0);
+ assertEquals(1.0, MapUtils.getFloatValue(in, "noKey", 1.0f), 0);
+ assertEquals(1.0, MapUtils.getFloatValue(in, "noKey", (key) -> {
return 1.0F;
}), 0);
- assertEquals(0, MapUtils.getFloatValue(in,"noKey"), 0);
- assertEquals(2.0, MapUtils.getFloat(in,"key", 0.0f), 0);
- assertEquals(1.0, MapUtils.getFloat(in,"noKey", 1.0f), 0);
- assertEquals(1.0, MapUtils.getFloat(in,"noKey", (key)->{
+ assertEquals(0, MapUtils.getFloatValue(in, "noKey"), 0);
+ assertEquals(2.0, MapUtils.getFloat(in, "key", 0.0f), 0);
+ assertEquals(1.0, MapUtils.getFloat(in, "noKey", 1.0f), 0);
+ assertEquals(1.0, MapUtils.getFloat(in, "noKey", (key) -> {
return 1.0F;
}), 0);
@@ -983,7 +981,7 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final char decimalSeparator = getDecimalSeparator();
inStr.put("str1", "2" + decimalSeparator + "0");
- assertEquals(MapUtils.getFloatValue(inStr,"str1", 0.0f), 2.0, 0);
+ assertEquals(MapUtils.getFloatValue(inStr, "str1", 0.0f), 2.0, 0);
}
@Test
@@ -991,23 +989,23 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final Map<String, Long> in = new HashMap<>();
in.put("key", 2L);
- assertEquals(2.0, MapUtils.getLongValue(in,"key", 0L), 0);
- assertEquals(2.0, MapUtils.getLongValue(in,"key"), 0);
- assertEquals(1, MapUtils.getLongValue(in,"noKey", 1L), 0);
- assertEquals(1, MapUtils.getLongValue(in,"noKey", (key)->{
+ assertEquals(2.0, MapUtils.getLongValue(in, "key", 0L), 0);
+ assertEquals(2.0, MapUtils.getLongValue(in, "key"), 0);
+ assertEquals(1, MapUtils.getLongValue(in, "noKey", 1L), 0);
+ assertEquals(1, MapUtils.getLongValue(in, "noKey", (key) -> {
return 1L;
}), 0);
- assertEquals(0, MapUtils.getLongValue(in,"noKey"), 0);
- assertEquals(2.0, MapUtils.getLong(in,"key", 0L), 0);
- assertEquals(1, MapUtils.getLong(in,"noKey", 1L), 0);
- assertEquals(1, MapUtils.getLong(in,"noKey", (key)->{
+ assertEquals(0, MapUtils.getLongValue(in, "noKey"), 0);
+ assertEquals(2.0, MapUtils.getLong(in, "key", 0L), 0);
+ assertEquals(1, MapUtils.getLong(in, "noKey", 1L), 0);
+ assertEquals(1, MapUtils.getLong(in, "noKey", (key) -> {
return 1L;
}), 0);
final Map<String, String> inStr = new HashMap<>();
inStr.put("str1", "2");
- assertEquals(MapUtils.getLongValue(inStr,"str1", 0L), 2, 0);
+ assertEquals(MapUtils.getLongValue(inStr, "str1", 0L), 2, 0);
assertEquals(MapUtils.getLong(inStr, "str1", 1L), 2, 0);
}
@@ -1017,23 +1015,23 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final Map<String, Integer> in = new HashMap<>();
in.put("key", 2);
- assertEquals(2, MapUtils.getIntValue(in,"key", 0), 0);
- assertEquals(2, MapUtils.getIntValue(in,"key"), 0);
- assertEquals(0, MapUtils.getIntValue(in,"noKey", 0), 0);
- assertEquals(0, MapUtils.getIntValue(in,"noKey", (key)->{
+ assertEquals(2, MapUtils.getIntValue(in, "key", 0), 0);
+ assertEquals(2, MapUtils.getIntValue(in, "key"), 0);
+ assertEquals(0, MapUtils.getIntValue(in, "noKey", 0), 0);
+ assertEquals(0, MapUtils.getIntValue(in, "noKey", (key)->{
return 0;
}), 0);
- assertEquals(0, MapUtils.getIntValue(in,"noKey"), 0);
- assertEquals(2, MapUtils.getInteger(in,"key", 0), 0);
- assertEquals(0, MapUtils.getInteger(in,"noKey", 0), 0);
- assertEquals(0, MapUtils.getInteger(in,"noKey", (key)->{
+ assertEquals(0, MapUtils.getIntValue(in, "noKey"), 0);
+ assertEquals(2, MapUtils.getInteger(in, "key", 0), 0);
+ assertEquals(0, MapUtils.getInteger(in, "noKey", 0), 0);
+ assertEquals(0, MapUtils.getInteger(in, "noKey", (key)->{
return 0;
}), 0);
final Map<String, String> inStr = new HashMap<>();
inStr.put("str1", "2");
- assertEquals(MapUtils.getIntValue(inStr,"str1", 0), 2, 0);
+ assertEquals(MapUtils.getIntValue(inStr, "str1", 0), 2, 0);
}
@Test
@@ -1042,23 +1040,23 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final short val = 10;
in.put("key", val);
- assertEquals(val, MapUtils.getShortValue(in,"key", val), 0);
- assertEquals(val, MapUtils.getShortValue(in,"key"), 0);
- assertEquals(val, MapUtils.getShortValue(in,"noKey", val), 0);
- assertEquals(val, MapUtils.getShortValue(in,"noKey", (key)->{
+ assertEquals(val, MapUtils.getShortValue(in, "key", val), 0);
+ assertEquals(val, MapUtils.getShortValue(in, "key"), 0);
+ assertEquals(val, MapUtils.getShortValue(in, "noKey", val), 0);
+ assertEquals(val, MapUtils.getShortValue(in, "noKey", (key)->{
return val;
}), 0);
- assertEquals(0, MapUtils.getShortValue(in,"noKey"), 0);
- assertEquals(val, MapUtils.getShort(in,"key", val), 0);
- assertEquals(val,MapUtils.getShort(in,"noKey", val), 0);
- assertEquals(val,MapUtils.getShort(in,"noKey", (key)->{
+ assertEquals(0, MapUtils.getShortValue(in, "noKey"), 0);
+ assertEquals(val, MapUtils.getShort(in, "key", val), 0);
+ assertEquals(val, MapUtils.getShort(in, "noKey", val), 0);
+ assertEquals(val, MapUtils.getShort(in, "noKey", (key)->{
return val;
}), 0);
final Map<String, String> inStr = new HashMap<>();
inStr.put("str1", "10");
- assertEquals(MapUtils.getShortValue(inStr,"str1", val), val, 0);
+ assertEquals(MapUtils.getShortValue(inStr, "str1", val), val, 0);
}
@Test
@@ -1067,16 +1065,16 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final byte val = 100;
in.put("key", val);
- assertEquals(val, MapUtils.getByteValue(in,"key", val), 0);
- assertEquals(val, MapUtils.getByteValue(in,"key"), 0);
- assertEquals(val, MapUtils.getByteValue(in,"noKey", val), 0);
- assertEquals(val, MapUtils.getByteValue(in,"noKey", (key)->{
- return (byte)100;
+ assertEquals(val, MapUtils.getByteValue(in, "key", val), 0);
+ assertEquals(val, MapUtils.getByteValue(in, "key"), 0);
+ assertEquals(val, MapUtils.getByteValue(in, "noKey", val), 0);
+ assertEquals(val, MapUtils.getByteValue(in, "noKey", (key) -> {
+ return (byte) 100;
}), 0);
- assertEquals(0, MapUtils.getByteValue(in,"noKey"), 0);
- assertEquals(val, MapUtils.getByte(in,"key", val), 0);
- assertEquals(val, MapUtils.getByte(in,"noKey", val), 0);
- assertEquals(val, MapUtils.getByte(in,"noKey", (key)->{
+ assertEquals(0, MapUtils.getByteValue(in, "noKey"), 0);
+ assertEquals(val, MapUtils.getByte(in, "key", val), 0);
+ assertEquals(val, MapUtils.getByte(in, "noKey", val), 0);
+ assertEquals(val, MapUtils.getByte(in, "noKey", (key)->{
return val;
}), 0);
@@ -1084,7 +1082,7 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final Map<String, String> inStr = new HashMap<>();
inStr.put("str1", "100");
- assertEquals(MapUtils.getByteValue(inStr,"str1", val), val, 0);
+ assertEquals(MapUtils.getByteValue(inStr, "str1", val), val, 0);
}
@Test
@@ -1093,9 +1091,9 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final Number val = 1000;
in.put("key", val);
- assertEquals(val.intValue(), MapUtils.getNumber(in,"key", val).intValue(), 0);
- assertEquals(val.intValue(), MapUtils.getNumber(in,"noKey", val).intValue(), 0);
- assertEquals(val.intValue(), MapUtils.getNumber(in,"noKey", (key)->{
+ assertEquals(val.intValue(), MapUtils.getNumber(in, "key", val).intValue(), 0);
+ assertEquals(val.intValue(), MapUtils.getNumber(in, "noKey", val).intValue(), 0);
+ assertEquals(val.intValue(), MapUtils.getNumber(in, "noKey", (key) -> {
if (true) {
return val;
} else {
@@ -1110,18 +1108,18 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final Map<String, String> in = new HashMap<>();
in.put("key", "str");
- assertEquals("str", MapUtils.getString(in,"key", "defualt"));
- assertEquals("str", MapUtils.getString(in,"key"));
- assertEquals(null, MapUtils.getString(null,"key"));
- assertEquals("default", MapUtils.getString(in,"noKey", "default"));
- assertEquals("default", MapUtils.getString(in,"noKey", (key)->{
+ assertEquals("str", MapUtils.getString(in, "key", "defualt"));
+ assertEquals("str", MapUtils.getString(in, "key"));
+ assertEquals(null, MapUtils.getString(null, "key"));
+ assertEquals("default", MapUtils.getString(in, "noKey", "default"));
+ assertEquals("default", MapUtils.getString(in, "noKey", (key)->{
if ("noKey".equals(key)) {
return "default";
} else {
return "";
}
}));
- assertEquals("default", MapUtils.getString(null,"noKey", "default"));
+ assertEquals("default", MapUtils.getString(null, "noKey", "default"));
}
@@ -1130,11 +1128,11 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final Map<String, Object> in = new HashMap<>();
in.put("key", "str");
- assertEquals("str", MapUtils.getObject(in,"key", "defualt"));
- assertEquals("str", MapUtils.getObject(in,"key"));
- assertEquals(null, MapUtils.getObject(null,"key"));
- assertEquals("default", MapUtils.getObject(in,"noKey", "default"));
- assertEquals("default", MapUtils.getObject(null,"noKey", "default"));
+ assertEquals("str", MapUtils.getObject(in, "key", "defualt"));
+ assertEquals("str", MapUtils.getObject(in, "key"));
+ assertEquals(null, MapUtils.getObject(null, "key"));
+ assertEquals("default", MapUtils.getObject(in, "noKey", "default"));
+ assertEquals("default", MapUtils.getObject(null, "noKey", "default"));
}
@Test
@@ -1148,16 +1146,16 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
assertFalse(MapUtils.getBooleanValue(null, "keyString", null));
assertFalse(MapUtils.getBooleanValue(in, null, null));
assertFalse(MapUtils.getBooleanValue(null, null, null));
- assertTrue(MapUtils.getBooleanValue(in,"key", true));
- assertTrue(MapUtils.getBooleanValue(in,"key"));
- assertTrue(MapUtils.getBooleanValue(in,"noKey", true));
- assertTrue(MapUtils.getBooleanValue(in,"noKey", (key)->{
+ assertTrue(MapUtils.getBooleanValue(in, "key", true));
+ assertTrue(MapUtils.getBooleanValue(in, "key"));
+ assertTrue(MapUtils.getBooleanValue(in, "noKey", true));
+ assertTrue(MapUtils.getBooleanValue(in, "noKey", (key) -> {
return true;
}));
- assertTrue(!MapUtils.getBooleanValue(in,"noKey"));
- assertTrue(MapUtils.getBoolean(in,"key", true));
- assertTrue(MapUtils.getBoolean(in,"noKey", true));
- assertTrue(MapUtils.getBoolean(in,"noKey", (key)->{
+ assertTrue(!MapUtils.getBooleanValue(in, "noKey"));
+ assertTrue(MapUtils.getBoolean(in, "key", true));
+ assertTrue(MapUtils.getBoolean(in, "noKey", true));
+ assertTrue(MapUtils.getBoolean(in, "noKey", (key)->{
if (System.currentTimeMillis() > 0) {
return true;
}
@@ -1169,7 +1167,7 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
assertFalse(MapUtils.getBooleanValue(in, "noKey", (key) -> {
return null;
}));
- assertEquals(null, MapUtils.getBoolean(null,"noKey"));
+ assertEquals(null, MapUtils.getBoolean(null, "noKey"));
// Values are Numbers
assertFalse(MapUtils.getBoolean(in, "keyNumberFalse"));
assertTrue(MapUtils.getBoolean(in, "keyNumberTrue"));
@@ -1181,17 +1179,17 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final Map<String, String> inStr = new HashMap<>();
inStr.put("str1", "true");
- assertTrue(MapUtils.getBooleanValue(inStr,"str1", true));
- assertTrue(MapUtils.getBoolean(inStr,"str1", true));
+ assertTrue(MapUtils.getBooleanValue(inStr, "str1", true));
+ assertTrue(MapUtils.getBoolean(inStr, "str1", true));
}
@Test
public void testgetMap() {
- final Map<String, Map<String,String>> in = new HashMap<>();
+ final Map<String, Map<String, String>> in = new HashMap<>();
final Map<String, String> valMap = new HashMap<>();
valMap.put("key1", "value1");
in.put("key1", valMap);
- final Map<?, ?> outValue = MapUtils.getMap(in,"key1", (Map<?, ?>) null);
+ final Map<?, ?> outValue = MapUtils.getMap(in, "key1", (Map<?, ?>) null);
assertEquals("value1", outValue.get("key1"));
assertEquals(null, outValue.get("key2"));
@@ -1204,8 +1202,8 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
final Map<String, Object> inMap = new HashMap<>();
- MapUtils.safeAddToMap(inMap,"key1", "value1");
- MapUtils.safeAddToMap(inMap,"key2", null);
+ MapUtils.safeAddToMap(inMap, "key1", "value1");
+ MapUtils.safeAddToMap(inMap, "key2", null);
assertEquals("value1", inMap.get("key1"));
assertEquals("", inMap.get("key2"));
}
@@ -1226,6 +1224,4 @@ public class MapUtilsTest extends AbstractAvailableLocalesTest {
}
return '.';
}
-
-
}
diff --git a/src/test/java/org/apache/commons/collections4/SetUtilsTest.java b/src/test/java/org/apache/commons/collections4/SetUtilsTest.java
index 6cf0cc2..123d66c 100644
--- a/src/test/java/org/apache/commons/collections4/SetUtilsTest.java
+++ b/src/test/java/org/apache/commons/collections4/SetUtilsTest.java
@@ -187,8 +187,7 @@ public class SetUtilsTest {
}
@Test
- public void testHashSet()
- {
+ public void testHashSet() {
final Set<?> set1 = SetUtils.unmodifiableSet();
assertTrue("set is empty", set1.isEmpty());
@@ -249,8 +248,7 @@ public class SetUtilsTest {
}
@Test
- public void testUnmodifiableSet()
- {
+ public void testUnmodifiableSet() {
final Set<?> set1 = SetUtils.unmodifiableSet();
assertTrue("set is empty", set1.isEmpty());
@@ -275,8 +273,7 @@ public class SetUtilsTest {
}
@Test
- public void testUnmodifiableSetWrap()
- {
+ public void testUnmodifiableSetWrap() {
final Set<Integer> set1 = SetUtils.unmodifiableSet(1, 2, 2, 3);
final Set<Integer> set2 = SetUtils.unmodifiableSet(set1);
assertSame(set1, set2);
diff --git a/src/test/java/org/apache/commons/collections4/SplitMapUtilsTest.java b/src/test/java/org/apache/commons/collections4/SplitMapUtilsTest.java
index 6487a29..04c3d1d 100644
--- a/src/test/java/org/apache/commons/collections4/SplitMapUtilsTest.java
+++ b/src/test/java/org/apache/commons/collections4/SplitMapUtilsTest.java
@@ -46,7 +46,7 @@ public class SplitMapUtilsTest {
@Before
public void setUp() throws Exception {
backingMap = new HashMap<>();
- transformedMap = TransformedSplitMap.transformingMap(backingMap, NOPTransformer.<String> nopTransformer(),
+ transformedMap = TransformedSplitMap.transformingMap(backingMap, NOPTransformer.<String>nopTransformer(),
stringToInt);
for (int i = 0; i < 10; i++) {
transformedMap.put(String.valueOf(i), String.valueOf(i));
diff --git a/src/test/java/org/apache/commons/collections4/bag/CollectionBagTest.java b/src/test/java/org/apache/commons/collections4/bag/CollectionBagTest.java
index ef3ab43..edf3d95 100644
--- a/src/test/java/org/apache/commons/collections4/bag/CollectionBagTest.java
+++ b/src/test/java/org/apache/commons/collections4/bag/CollectionBagTest.java
@@ -96,7 +96,7 @@ public class CollectionBagTest<T> extends AbstractCollectionTest<T> {
final Bag<T> bag = makeObject();
if (bag instanceof Serializable && !skipSerializedCanonicalTests() && isTestSerialization()) {
final Bag<?> bag2 = (Bag<?>) readExternalFormFromDisk(getCanonicalEmptyCollectionName(bag));
- assertTrue("Bag is empty",bag2.size() == 0);
+ assertTrue("Bag is empty", bag2.size() == 0);
assertEquals(bag, bag2);
}
}
diff --git a/src/test/java/org/apache/commons/collections4/bag/CollectionSortedBagTest.java b/src/test/java/org/apache/commons/collections4/bag/CollectionSortedBagTest.java
index e189178..4c21dbc 100644
--- a/src/test/java/org/apache/commons/collections4/bag/CollectionSortedBagTest.java
+++ b/src/test/java/org/apache/commons/collections4/bag/CollectionSortedBagTest.java
@@ -136,7 +136,7 @@ public class CollectionSortedBagTest<T> extends AbstractCollectionTest<T> {
final Bag<T> bag = makeObject();
if (bag instanceof Serializable && !skipSerializedCanonicalTests() && isTestSerialization()) {
final Bag<?> bag2 = (Bag<?>) readExternalFormFromDisk(getCanonicalEmptyCollectionName(bag));
- assertTrue("Bag is empty",bag2.size() == 0);
+ assertTrue("Bag is empty", bag2.size() == 0);
assertEquals(bag, bag2);
}
}
diff --git a/src/test/java/org/apache/commons/collections4/bag/PredicatedBagTest.java b/src/test/java/org/apache/commons/collections4/bag/PredicatedBagTest.java
index 1ee3456..f4c17be 100644
--- a/src/test/java/org/apache/commons/collections4/bag/PredicatedBagTest.java
+++ b/src/test/java/org/apache/commons/collections4/bag/PredicatedBagTest.java
@@ -75,7 +75,7 @@ public class PredicatedBagTest<T> extends AbstractBagTest<T> {
assertEquals(true, bag.contains(els[i]));
}
Set<T> set = ((PredicatedBag<T>) bag).uniqueSet();
- assertTrue("Unique set contains the first element",set.contains(els[0]));
+ assertTrue("Unique set contains the first element", set.contains(els[0]));
assertEquals(true, bag.remove(els[0]));
set = ((PredicatedBag<T>) bag).uniqueSet();
assertTrue("Unique set now does not contain the first element",
diff --git a/src/test/java/org/apache/commons/collections4/bidimap/AbstractOrderedBidiMapDecoratorTest.java b/src/test/java/org/apache/commons/collections4/bidimap/AbstractOrderedBidiMapDecoratorTest.java
index c95c2bf..99e5401 100644
--- a/src/test/java/org/apache/commons/collections4/bidimap/AbstractOrderedBidiMapDecoratorTest.java
+++ b/src/test/java/org/apache/commons/collections4/bidimap/AbstractOrderedBidiMapDecoratorTest.java
@@ -69,11 +69,11 @@ public class AbstractOrderedBidiMapDecoratorTest<K, V>
private TestOrderedBidiMap<V, K> inverse = null;
- public TestOrderedBidiMap() {
+ TestOrderedBidiMap() {
super(new DualTreeBidiMap<K, V>());
}
- public TestOrderedBidiMap(final OrderedBidiMap<K, V> map) {
+ TestOrderedBidiMap(final OrderedBidiMap<K, V> map) {
super(map);
}
diff --git a/src/test/java/org/apache/commons/collections4/bidimap/AbstractSortedBidiMapTest.java b/src/test/java/org/apache/commons/collections4/bidimap/AbstractSortedBidiMapTest.java
index 3a9230c..1fa7153 100644
--- a/src/test/java/org/apache/commons/collections4/bidimap/AbstractSortedBidiMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/bidimap/AbstractSortedBidiMapTest.java
@@ -53,7 +53,7 @@ public abstract class AbstractSortedBidiMapTest<K extends Comparable<K>, V exten
sortedValues.addAll(map.values());
sortedValues = Collections.unmodifiableList(sortedValues);
- sortedNewValues.addAll(this.<V> getAsList(getNewSampleValues()));
+ sortedNewValues.addAll(this.<V>getAsList(getNewSampleValues()));
}
// public AbstractTestSortedBidiMap() {
diff --git a/src/test/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap2Test.java b/src/test/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap2Test.java
index 1d74864..b7ce7ee 100644
--- a/src/test/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap2Test.java
+++ b/src/test/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap2Test.java
@@ -52,8 +52,8 @@ public class DualTreeBidiMap2Test<K extends Comparable<K>, V extends Comparable<
@Override
public DualTreeBidiMap<K, V> makeObject() {
return new DualTreeBidiMap<>(
- new ReverseComparator<>(ComparableComparator.<K> comparableComparator()),
- new ReverseComparator<>(ComparableComparator.<V> comparableComparator()));
+ new ReverseComparator<>(ComparableComparator.<K>comparableComparator()),
+ new ReverseComparator<>(ComparableComparator.<V>comparableComparator()));
}
@Override
@@ -90,7 +90,7 @@ public class DualTreeBidiMap2Test<K extends Comparable<K>, V extends Comparable<
final Object dest = in.readObject();
in.close();
- final SortedBidiMap<?,?> bidi = (SortedBidiMap<?,?>) dest;
+ final SortedBidiMap<?, ?> bidi = (SortedBidiMap<?, ?>) dest;
assertNotNull(obj.comparator());
assertNotNull(bidi.comparator());
assertTrue(bidi.comparator() instanceof ReverseComparator);
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java
index 0230c30..e1c8ab9 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilterTest.java
index e7edf0f..c98bf13 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilterTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
index 96d9a75..a42f3f6 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -25,7 +24,6 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.stream.IntStream;
import org.apache.commons.collections4.bloomfilter.hasher.Hasher;
import org.apache.commons.collections4.bloomfilter.hasher.Shape;
@@ -147,11 +145,11 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
final int[] c1 = {1, 10, 100, 0};
final int[] c2 = {4, 0, 7, 2};
- final Map<Integer,Integer> map1 = new HashMap<>();
+ final Map<Integer, Integer> map1 = new HashMap<>();
for (int i = 0; i < c1.length; i++) {
map1.put(i, c1[i]);
}
- final Map<Integer,Integer> map2 = new HashMap<>();
+ final Map<Integer, Integer> map2 = new HashMap<>();
for (int i = 0; i < c2.length; i++) {
map2.put(i, c2[i]);
}
@@ -182,7 +180,7 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
1, 2, 2, 2, 2, 2, 2, 2, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 0
};
- final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+ final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17);
final Hasher hasher = new StaticHasher(lst.iterator(), shape);
final CountingBloomFilter bf = createFilter(hasher, shape);
@@ -288,11 +286,11 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
// for (0 - 2). Fix this but the underflow behaviour is subject to change.
c2[c2.length - 1] = 0;
- final Map<Integer,Integer> map1 = new HashMap<>();
+ final Map<Integer, Integer> map1 = new HashMap<>();
for (int i = 0; i < c1.length; i++) {
map1.put(i, c1[i]);
}
- final Map<Integer,Integer> map2 = new HashMap<>();
+ final Map<Integer, Integer> map2 = new HashMap<>();
for (int i = 0; i < c2.length; i++) {
map2.put(i, c2[i]);
}
@@ -324,7 +322,7 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
1, 2, 2, 2, 2, 2, 2, 2, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1
};
- final Map<Integer,Integer> map = new HashMap<>();
+ final Map<Integer, Integer> map = new HashMap<>();
for (int i = 1; i < values.length; i++) {
map.put(i, values[i]);
}
@@ -355,7 +353,7 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
1, 2, 2, 2, 2, 2, 2, 2, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1
};
- final Map<Integer,Integer> map = new HashMap<>();
+ final Map<Integer, Integer> map = new HashMap<>();
for (int i = 1; i < values.length; i++) {
map.put(i, values[i]);
}
@@ -414,7 +412,7 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
*/
@Test
public void testToString() {
- final Map<Integer,Integer> map = new HashMap<>();
+ final Map<Integer, Integer> map = new HashMap<>();
CountingBloomFilter bf = new CountingBloomFilter(map, shape);
Assert.assertEquals("{}", bf.toString());
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBloomFilterMethodsTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBloomFilterMethodsTest.java
index bd4ce0f..db20990 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBloomFilterMethodsTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBloomFilterMethodsTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -46,7 +45,7 @@ public class DefaultBloomFilterMethodsTest extends AbstractBloomFilterTest {
* @param hasher the Hasher to use.
* @param shape the desired shape of the filter.
*/
- public BF(final Hasher hasher, final Shape shape) {
+ BF(final Hasher hasher, final Shape shape) {
this(shape);
verifyHasher(hasher);
hasher.getBits(shape).forEachRemaining((IntConsumer) bitSet::set);
@@ -57,7 +56,7 @@ public class DefaultBloomFilterMethodsTest extends AbstractBloomFilterTest {
*
* @param shape the desired shape of the filter.
*/
- public BF(final Shape shape) {
+ BF(final Shape shape) {
super(shape);
this.bitSet = new BitSet();
}
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java
index 50cd58d..a2ddd6f 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java
index 9b112d6..0d2d53a 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java
index b271cd9..f72b91b 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java
index 862136a..0d39a57 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFuctionValidatorTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFuctionValidatorTest.java
index 9aedb14..ac9e0b5 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFuctionValidatorTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFuctionValidatorTest.java
@@ -1,20 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.commons.collections4.bloomfilter.hasher;
import static org.junit.Assert.assertFalse;
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java
index ab37616..3a125bd 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -52,7 +51,7 @@ public class HashFunctionIdentityImplTest {
@Override
public long getSignature() {
- return -1l;
+ return -1L;
}
@Override
@@ -66,7 +65,7 @@ public class HashFunctionIdentityImplTest {
assertEquals("Provider", impl.getProvider());
assertEquals(Signedness.SIGNED, impl.getSignedness());
assertEquals(ProcessType.CYCLIC, impl.getProcessType());
- assertEquals(-1l, impl.getSignature());
+ assertEquals(-1L, impl.getSignature());
}
/**
@@ -75,11 +74,11 @@ public class HashFunctionIdentityImplTest {
@Test
public void valuesConstructorTest() {
final HashFunctionIdentityImpl impl = new HashFunctionIdentityImpl("Provider", "NAME", Signedness.UNSIGNED,
- ProcessType.ITERATIVE, -2l);
+ ProcessType.ITERATIVE, -2L);
assertEquals("NAME", impl.getName());
assertEquals("Provider", impl.getProvider());
assertEquals(Signedness.UNSIGNED, impl.getSignedness());
assertEquals(ProcessType.ITERATIVE, impl.getProcessType());
- assertEquals(-2l, impl.getSignature());
+ assertEquals(-2L, impl.getSignature());
}
}
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java
index c69e6f3..a566836 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,8 +22,6 @@ import static org.junit.Assert.fail;
import java.util.Objects;
-import org.apache.commons.collections4.bloomfilter.hasher.HashFunctionIdentity;
-import org.apache.commons.collections4.bloomfilter.hasher.Shape;
import org.junit.Test;
/**
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java
index 13a644a..461e878 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -132,7 +131,9 @@ public class StaticHasherTest {
}
@Override
- public boolean isEmpty() { return false; }
+ public boolean isEmpty() {
+ return false;
+ }
};
final StaticHasher hasher = new StaticHasher(testHasher, shape);
@@ -164,7 +165,9 @@ public class StaticHasherTest {
}
@Override
- public boolean isEmpty() { return false; }
+ public boolean isEmpty() {
+ return false;
+ }
};
try {
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5CyclicTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5CyclicTest.java
index 069a299..2c53838 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5CyclicTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5CyclicTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,7 +21,6 @@ import static org.junit.Assert.assertEquals;
import java.nio.charset.StandardCharsets;
import java.util.Locale;
-import org.apache.commons.collections4.bloomfilter.hasher.function.MD5Cyclic;
import org.junit.Test;
/**
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86CyclicTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86CyclicTest.java
index d318b9c..f1dcf0c 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86CyclicTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86CyclicTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,7 +21,6 @@ import static org.junit.Assert.assertEquals;
import java.nio.charset.StandardCharsets;
import java.util.Locale;
-import org.apache.commons.collections4.bloomfilter.hasher.function.Murmur128x86Cyclic;
import org.junit.Test;
/**
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86IterativeTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86IterativeTest.java
index daf511a..50c4224 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86IterativeTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86IterativeTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,7 +21,6 @@ import static org.junit.Assert.assertEquals;
import java.nio.charset.StandardCharsets;
import java.util.Locale;
-import org.apache.commons.collections4.bloomfilter.hasher.function.Murmur32x86Iterative;
import org.junit.Test;
/**
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterativeTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterativeTest.java
index 1f7224d..5ffb544 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterativeTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterativeTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,7 +21,6 @@ import static org.junit.Assert.assertEquals;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Locale;
-import org.apache.commons.collections4.bloomfilter.hasher.function.ObjectsHashIterative;
import org.junit.Test;
/**
diff --git a/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java b/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
index 73c62cd..f26438f 100644
--- a/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
+++ b/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
@@ -436,12 +436,12 @@ public abstract class AbstractCollectionTest<E> extends AbstractObjectTest {
"Eight",
new String("Nine"),
Integer.valueOf(10),
- new Short((short)11),
+ new Short((short) 11),
new Long(12),
"Thirteen",
"14",
"15",
- new Byte((byte)16)
+ new Byte((byte) 16)
};
}
@@ -457,8 +457,8 @@ public abstract class AbstractCollectionTest<E> extends AbstractObjectTest {
new Float(0),
new Double(0),
"Zero",
- new Short((short)0),
- new Byte((byte)0),
+ new Short((short) 0),
+ new Byte((byte) 0),
new Long(0),
new Character('\u0000'),
"0"
@@ -486,7 +486,7 @@ public abstract class AbstractCollectionTest<E> extends AbstractObjectTest {
*/
public Object[] getOtherNonNullStringElements() {
return new Object[] {
- "For", "then", "despite",/* of */"space", "I", "would", "be",
+ "For", "then", "despite", /* of */"space", "I", "would", "be",
"brought", "From", "limits", "far", "remote", "where", "thou", "dost", "stay"
};
}
@@ -1317,7 +1317,7 @@ public abstract class AbstractCollectionTest<E> extends AbstractObjectTest {
resetFull();
try {
final Iterator<E> iter = getCollection().iterator();
- final List<E> sublist = Arrays.asList(getFullElements()).subList(2,5);
+ final List<E> sublist = Arrays.asList(getFullElements()).subList(2, 5);
getCollection().removeAll(sublist);
iter.next();
fail("next after removeAll should raise ConcurrentModification");
@@ -1328,7 +1328,7 @@ public abstract class AbstractCollectionTest<E> extends AbstractObjectTest {
resetFull();
try {
final Iterator<E> iter = getCollection().iterator();
- final List<E> sublist = Arrays.asList(getFullElements()).subList(2,5);
+ final List<E> sublist = Arrays.asList(getFullElements()).subList(2, 5);
getCollection().retainAll(sublist);
iter.next();
fail("next after retainAll should raise ConcurrentModification");
diff --git a/src/test/java/org/apache/commons/collections4/comparators/BooleanComparatorTest.java b/src/test/java/org/apache/commons/collections4/comparators/BooleanComparatorTest.java
index c0d2a15..f6f6f02 100644
--- a/src/test/java/org/apache/commons/collections4/comparators/BooleanComparatorTest.java
+++ b/src/test/java/org/apache/commons/collections4/comparators/BooleanComparatorTest.java
@@ -104,7 +104,7 @@ public class BooleanComparatorTest extends AbstractComparatorTest<Boolean> {
protected void allTests(final boolean trueFirst, final BooleanComparator comp) {
orderIndependentTests(comp);
- if(trueFirst) {
+ if (trueFirst) {
trueFirstTests(comp);
} else {
falseFirstTests(comp);
diff --git a/src/test/java/org/apache/commons/collections4/comparators/FixedOrderComparatorTest.java b/src/test/java/org/apache/commons/collections4/comparators/FixedOrderComparatorTest.java
index 5d160e1..d3fc4ee 100644
--- a/src/test/java/org/apache/commons/collections4/comparators/FixedOrderComparatorTest.java
+++ b/src/test/java/org/apache/commons/collections4/comparators/FixedOrderComparatorTest.java
@@ -226,7 +226,7 @@ public class FixedOrderComparatorTest extends AbstractComparatorTest<String> {
// testShuffle
for (int i = 0; i < keys.length && !isInNewOrder; i++) {
- if( !orderedObjects[i].equals(keys[i])) {
+ if ( !orderedObjects[i].equals(keys[i])) {
isInNewOrder = true;
}
}
diff --git a/src/test/java/org/apache/commons/collections4/functors/AbstractAnyAllOnePredicateTest.java b/src/test/java/org/apache/commons/collections4/functors/AbstractAnyAllOnePredicateTest.java
index cbb5f5b..3f0d845 100644
--- a/src/test/java/org/apache/commons/collections4/functors/AbstractAnyAllOnePredicateTest.java
+++ b/src/test/java/org/apache/commons/collections4/functors/AbstractAnyAllOnePredicateTest.java
@@ -1,18 +1,18 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.collections4.functors;
diff --git a/src/test/java/org/apache/commons/collections4/functors/AbstractCompositePredicateTest.java b/src/test/java/org/apache/commons/collections4/functors/AbstractCompositePredicateTest.java
index db92a64..a9e7425 100644
--- a/src/test/java/org/apache/commons/collections4/functors/AbstractCompositePredicateTest.java
+++ b/src/test/java/org/apache/commons/collections4/functors/AbstractCompositePredicateTest.java
@@ -48,7 +48,7 @@ public abstract class AbstractCompositePredicateTest<T> extends AbstractMockPred
*
* @return a predicate to test.
*/
- protected abstract Predicate<T> getPredicateInstance(final Predicate<? super T> ... predicates);
+ protected abstract Predicate<T> getPredicateInstance(Predicate<? super T>... predicates);
/**
* Creates an instance of the predicate to test.
@@ -57,7 +57,7 @@ public abstract class AbstractCompositePredicateTest<T> extends AbstractMockPred
*
* @return a predicate to test.
*/
- protected abstract Predicate<T> getPredicateInstance(final Collection<Predicate<T>> predicates);
+ protected abstract Predicate<T> getPredicateInstance(Collection<Predicate<T>> predicates);
/**
* Creates an instance of the predicate to test.
diff --git a/src/test/java/org/apache/commons/collections4/functors/AbstractMockPredicateTest.java b/src/test/java/org/apache/commons/collections4/functors/AbstractMockPredicateTest.java
index d67cfeb..daf4c95 100644
--- a/src/test/java/org/apache/commons/collections4/functors/AbstractMockPredicateTest.java
+++ b/src/test/java/org/apache/commons/collections4/functors/AbstractMockPredicateTest.java
@@ -56,8 +56,7 @@ public abstract class AbstractMockPredicateTest<T> {
* Creates the list of predicates to verify.
*/
@Before
- public final void createVerifyList()
- {
+ public final void createVerifyList() {
mockPredicatesToVerify = new ArrayList<>();
}
@@ -65,8 +64,7 @@ public abstract class AbstractMockPredicateTest<T> {
* Verifies all the mock predicates created for the test.
*/
@After
- public final void verifyPredicates()
- {
+ public final void verifyPredicates() {
for (final Predicate<? super T> predicate : mockPredicatesToVerify) {
verify(predicate);
}
diff --git a/src/test/java/org/apache/commons/collections4/functors/AllPredicateTest.java b/src/test/java/org/apache/commons/collections4/functors/AllPredicateTest.java
index 4baed93..253df29 100644
--- a/src/test/java/org/apache/commons/collections4/functors/AllPredicateTest.java
+++ b/src/test/java/org/apache/commons/collections4/functors/AllPredicateTest.java
@@ -45,7 +45,7 @@ public class AllPredicateTest extends AbstractAnyAllOnePredicateTest<Integer> {
* {@inheritDoc}
*/
@Override
- protected final Predicate<Integer> getPredicateInstance(final Predicate<? super Integer> ... predicates) {
+ protected final Predicate<Integer> getPredicateInstance(final Predicate<? super Integer>... predicates) {
return AllPredicate.allPredicate(predicates);
}
diff --git a/src/test/java/org/apache/commons/collections4/iterators/BoundedIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/BoundedIteratorTest.java
index 9d5b55f..eeb5485 100644
--- a/src/test/java/org/apache/commons/collections4/iterators/BoundedIteratorTest.java
+++ b/src/test/java/org/apache/commons/collections4/iterators/BoundedIteratorTest.java
@@ -1,15 +1,18 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
- * or agreed to in writing, software distributed under the License is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.collections4.iterators;
diff --git a/src/test/java/org/apache/commons/collections4/iterators/CollatingIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/CollatingIteratorTest.java
index 6d52de1..1116633 100644
--- a/src/test/java/org/apache/commons/collections4/iterators/CollatingIteratorTest.java
+++ b/src/test/java/org/apache/commons/collections4/iterators/CollatingIteratorTest.java
@@ -253,7 +253,7 @@ public class CollatingIteratorTest extends AbstractIteratorTest<Integer> {
collatingIterator2.setComparator(new ComparableComparator<Integer>());
for ( ; collatingIterator2.hasNext(); i++ ) {
final Integer n = collatingIterator2.next();
- assertEquals("wrong order", (int)n, i + 1);
+ assertEquals("wrong order", (int) n, i + 1);
}
assertEquals("wrong size", i, l1.size() + l2.size());
}
diff --git a/src/test/java/org/apache/commons/collections4/iterators/FilterIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/FilterIteratorTest.java
index 82dd834..4154968 100644
--- a/src/test/java/org/apache/commons/collections4/iterators/FilterIteratorTest.java
+++ b/src/test/java/org/apache/commons/collections4/iterators/FilterIteratorTest.java
@@ -168,7 +168,7 @@ public class FilterIteratorTest<E> extends AbstractIteratorTest<E> {
initIterator();
iterator.setPredicate(pred);
for (int i = 0; i < elements.length; i++) {
- final String s = (String)iterator.next();
+ final String s = (String) iterator.next();
assertEquals(elements[i], s);
assertTrue(i == elements.length - 1 ? !iterator.hasNext() : iterator.hasNext());
}
diff --git a/src/test/java/org/apache/commons/collections4/iterators/FilterListIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/FilterListIteratorTest.java
index 817a06f..ce936d4 100644
--- a/src/test/java/org/apache/commons/collections4/iterators/FilterListIteratorTest.java
+++ b/src/test/java/org/apache/commons/collections4/iterators/FilterListIteratorTest.java
@@ -63,11 +63,21 @@ public class FilterListIteratorTest {
sixes = new ArrayList<>();
for (int i = 0; i < 20; i++) {
list.add(Integer.valueOf(i));
- if (i % 2 == 0) { evens.add(Integer.valueOf(i)); }
- if (i % 2 != 0) { odds.add(Integer.valueOf(i)); }
- if (i % 3 == 0) { threes.add(Integer.valueOf(i)); }
- if (i % 4 == 0) { fours.add(Integer.valueOf(i)); }
- if (i % 6 == 0) { sixes.add(Integer.valueOf(i)); }
+ if (i % 2 == 0) {
+ evens.add(Integer.valueOf(i));
+ }
+ if (i % 2 != 0) {
+ odds.add(Integer.valueOf(i));
+ }
+ if (i % 3 == 0) {
+ threes.add(Integer.valueOf(i));
+ }
+ if (i % 4 == 0) {
+ fours.add(Integer.valueOf(i));
+ }
+ if (i % 6 == 0) {
+ sixes.add(Integer.valueOf(i));
+ }
}
truePred = x -> true;
diff --git a/src/test/java/org/apache/commons/collections4/iterators/IteratorEnumerationTest.java b/src/test/java/org/apache/commons/collections4/iterators/IteratorEnumerationTest.java
index 9d4051f..2c6c4f0 100644
--- a/src/test/java/org/apache/commons/collections4/iterators/IteratorEnumerationTest.java
+++ b/src/test/java/org/apache/commons/collections4/iterators/IteratorEnumerationTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/test/java/org/apache/commons/collections4/iterators/IteratorIterableTest.java b/src/test/java/org/apache/commons/collections4/iterators/IteratorIterableTest.java
index 8e06e80..c66e42a 100644
--- a/src/test/java/org/apache/commons/collections4/iterators/IteratorIterableTest.java
+++ b/src/test/java/org/apache/commons/collections4/iterators/IteratorIterableTest.java
@@ -1,15 +1,18 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
- * or agreed to in writing, software distributed under the License is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.collections4.iterators;
diff --git a/src/test/java/org/apache/commons/collections4/iterators/NodeListIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/NodeListIteratorTest.java
index dfd62ed..bde6776 100644
--- a/src/test/java/org/apache/commons/collections4/iterators/NodeListIteratorTest.java
+++ b/src/test/java/org/apache/commons/collections4/iterators/NodeListIteratorTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 2013 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/src/test/java/org/apache/commons/collections4/iterators/PeekingIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/PeekingIteratorTest.java
index 6a3cf98..cdf10f5 100644
--- a/src/test/java/org/apache/commons/collections4/iterators/PeekingIteratorTest.java
+++ b/src/test/java/org/apache/commons/collections4/iterators/PeekingIteratorTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,7 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.commons.collections4.iterators;
import java.util.ArrayList;
diff --git a/src/test/java/org/apache/commons/collections4/iterators/PermutationIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/PermutationIteratorTest.java
index 0cb9ba6..2f38a09 100644
--- a/src/test/java/org/apache/commons/collections4/iterators/PermutationIteratorTest.java
+++ b/src/test/java/org/apache/commons/collections4/iterators/PermutationIteratorTest.java
@@ -191,4 +191,4 @@ public class PermutationIteratorTest extends AbstractIteratorTest<List<Character
assertFalse(it.hasNext());
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/commons/collections4/iterators/PushbackIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/PushbackIteratorTest.java
index 668b00c..77d0a1c 100644
--- a/src/test/java/org/apache/commons/collections4/iterators/PushbackIteratorTest.java
+++ b/src/test/java/org/apache/commons/collections4/iterators/PushbackIteratorTest.java
@@ -1,13 +1,12 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -51,7 +50,7 @@ public class PushbackIteratorTest<E> extends AbstractIteratorTest<E> {
@Override
public Iterator<E> makeEmptyIterator() {
- return PushbackIterator.pushbackIterator(Collections.<E> emptyList().iterator());
+ return PushbackIterator.pushbackIterator(Collections.<E>emptyList().iterator());
}
@Override
diff --git a/src/test/java/org/apache/commons/collections4/iterators/SkippingIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/SkippingIteratorTest.java
index 565d5b7..af96438 100644
--- a/src/test/java/org/apache/commons/collections4/iterators/SkippingIteratorTest.java
+++ b/src/test/java/org/apache/commons/collections4/iterators/SkippingIteratorTest.java
@@ -1,15 +1,18 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
- * or agreed to in writing, software distributed under the License is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.collections4.iterators;
diff --git a/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableMapIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableMapIteratorTest.java
index 5b73092..03da805 100644
--- a/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableMapIteratorTest.java
+++ b/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableMapIteratorTest.java
@@ -49,7 +49,7 @@ public class UnmodifiableMapIteratorTest<K, V> extends AbstractMapIteratorTest<K
public IterableMap<K, V> getMap() {
final IterableMap<K, V> testMap = new DualHashBidiMap<>();
testMap.put((K) "A", (V) "a");
- testMap.put((K) "B", (V)"b");
+ testMap.put((K) "B", (V) "b");
testMap.put((K) "C", (V) "c");
return testMap;
}
@@ -59,7 +59,7 @@ public class UnmodifiableMapIteratorTest<K, V> extends AbstractMapIteratorTest<K
public Map<K, V> getConfirmedMap() {
final Map<K, V> testMap = new HashMap<>();
testMap.put((K) "A", (V) "a");
- testMap.put((K) "B", (V)"b");
+ testMap.put((K) "B", (V) "b");
testMap.put((K) "C", (V) "c");
return testMap;
}
@@ -83,7 +83,7 @@ public class UnmodifiableMapIteratorTest<K, V> extends AbstractMapIteratorTest<K
MapIterator<K, V> it = makeObject();
assertSame(it, UnmodifiableMapIterator.unmodifiableMapIterator(it));
- it = getMap().mapIterator() ;
+ it = getMap().mapIterator();
assertTrue(it != UnmodifiableMapIterator.unmodifiableMapIterator(it));
try {
diff --git a/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIteratorTest.java
index 511e4a8..c35e9c4 100644
--- a/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIteratorTest.java
+++ b/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIteratorTest.java
@@ -85,7 +85,7 @@ public class UnmodifiableOrderedMapIteratorTest<K, V> extends AbstractOrderedMap
OrderedMapIterator<K, V> it = makeObject();
assertSame(it, UnmodifiableOrderedMapIterator.unmodifiableOrderedMapIterator(it));
- it = getMap().mapIterator() ;
+ it = getMap().mapIterator();
assertTrue(it != UnmodifiableOrderedMapIterator.unmodifiableOrderedMapIterator(it));
try {
diff --git a/src/test/java/org/apache/commons/collections4/junit/ObjectToStringComparator.java b/src/test/java/org/apache/commons/collections4/junit/ObjectToStringComparator.java
index 972cd6e..5f1211e 100644
--- a/src/test/java/org/apache/commons/collections4/junit/ObjectToStringComparator.java
+++ b/src/test/java/org/apache/commons/collections4/junit/ObjectToStringComparator.java
@@ -37,4 +37,4 @@ public final class ObjectToStringComparator implements Comparator<Object>, Seria
}
return o1.toString().compareTo(o2.toString());
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java b/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java
index 2ba04b6..0eec774 100644
--- a/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java
+++ b/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java
@@ -40,7 +40,7 @@ public class MultiKeyTest {
private static final long serialVersionUID = 1928896152249821416L;
- public DerivedMultiKey(final T key1, final T key2) {
+ DerivedMultiKey(final T key1, final T key2) {
super(key1, key2);
}
@@ -53,28 +53,25 @@ public class MultiKeyTest {
}
}
-
+
static class SystemHashCodeSimulatingKey implements Serializable {
private static final long serialVersionUID = -1736147315703444603L;
private final String name;
private int hashCode = 1;
- public SystemHashCodeSimulatingKey(final String name)
- {
+ SystemHashCodeSimulatingKey(final String name) {
this.name = name;
}
@Override
- public boolean equals(final Object obj)
- {
+ public boolean equals(final Object obj) {
return obj instanceof SystemHashCodeSimulatingKey
- && name.equals(((SystemHashCodeSimulatingKey)obj).name);
+ && name.equals(((SystemHashCodeSimulatingKey) obj).name);
}
@Override
- public int hashCode()
- {
+ public int hashCode() {
return hashCode;
}
@@ -168,8 +165,7 @@ public class MultiKeyTest {
}
@Test
- public void testEqualsAfterSerialization() throws IOException, ClassNotFoundException
- {
+ public void testEqualsAfterSerialization() throws IOException, ClassNotFoundException {
SystemHashCodeSimulatingKey sysKey = new SystemHashCodeSimulatingKey("test");
final MultiKey<?> mk = new MultiKey<Object>(ONE, sysKey);
final Map<MultiKey<?>, Integer> map = new HashMap<>();
@@ -185,7 +181,7 @@ public class MultiKeyTest {
// deserialize
final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
final ObjectInputStream in = new ObjectInputStream(bais);
- sysKey = (SystemHashCodeSimulatingKey)in.readObject(); // simulate deserialization in another process
+ sysKey = (SystemHashCodeSimulatingKey) in.readObject(); // simulate deserialization in another process
final Map<?, ?> map2 = (Map<?, ?>) in.readObject();
in.close();
@@ -196,8 +192,7 @@ public class MultiKeyTest {
}
@Test
- public void testEqualsAfterSerializationOfDerivedClass() throws IOException, ClassNotFoundException
- {
+ public void testEqualsAfterSerializationOfDerivedClass() throws IOException, ClassNotFoundException {
final DerivedMultiKey<?> mk = new DerivedMultiKey<>("A", "B");
// serialize
@@ -209,7 +204,7 @@ public class MultiKeyTest {
// deserialize
final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
final ObjectInputStream in = new ObjectInputStream(bais);
- final DerivedMultiKey<?> mk2 = (DerivedMultiKey<?>)in.readObject();
+ final DerivedMultiKey<?> mk2 = (DerivedMultiKey<?>) in.readObject();
in.close();
assertEquals(mk.hashCode(), mk2.hashCode());
diff --git a/src/test/java/org/apache/commons/collections4/list/AbstractListTest.java b/src/test/java/org/apache/commons/collections4/list/AbstractListTest.java
index 1af0796..0954e85 100644
--- a/src/test/java/org/apache/commons/collections4/list/AbstractListTest.java
+++ b/src/test/java/org/apache/commons/collections4/list/AbstractListTest.java
@@ -1106,7 +1106,7 @@ public abstract class AbstractListTest<E> extends AbstractCollectionTest<E> {
// test to make sure the canonical form has been preserved
final List<E> list = makeFullCollection();
- if(list instanceof Serializable && !skipSerializedCanonicalTests() && isTestSerialization()) {
+ if (list instanceof Serializable && !skipSerializedCanonicalTests() && isTestSerialization()) {
final List<E> list2 = (List<E>) readExternalFormFromDisk(getCanonicalFullCollectionName(list));
if (list2.size() == 4) {
// old serialized tests
diff --git a/src/test/java/org/apache/commons/collections4/list/NodeCachingLinkedListTest.java b/src/test/java/org/apache/commons/collections4/list/NodeCachingLinkedListTest.java
index 428d0a7..b772e79 100644
--- a/src/test/java/org/apache/commons/collections4/list/NodeCachingLinkedListTest.java
+++ b/src/test/java/org/apache/commons/collections4/list/NodeCachingLinkedListTest.java
@@ -85,7 +85,7 @@ public class NodeCachingLinkedListTest<E> extends AbstractLinkedListTest<E> {
System.out.println("Testing relative execution time of commonly-used methods...");
startTime = System.currentTimeMillis();
- for(int x = loopCount; x > 0; x--) {
+ for (int x = loopCount; x > 0; x--) {
// unrolled a few times to minimize effect of loop
ll.addFirst(o1);
ll.addLast(o2);
@@ -112,7 +112,7 @@ public class NodeCachingLinkedListTest<E> extends AbstractLinkedListTest<E> {
System.out.println("Time with LinkedList: " + (endTime - startTime) + " ms");
startTime = System.currentTimeMillis();
- for(int x = loopCount; x > 0; x--) {
+ for (int x = loopCount; x > 0; x--) {
ncll.addFirst(o1);
ncll.addLast(o2);
ncll.removeFirst();
diff --git a/src/test/java/org/apache/commons/collections4/list/SetUniqueListTest.java b/src/test/java/org/apache/commons/collections4/list/SetUniqueListTest.java
index e8b6c14..8638a31 100644
--- a/src/test/java/org/apache/commons/collections4/list/SetUniqueListTest.java
+++ b/src/test/java/org/apache/commons/collections4/list/SetUniqueListTest.java
@@ -38,7 +38,7 @@ public class SetUniqueListTest<E> extends AbstractListTest<E> {
*/
private static final long serialVersionUID = 1415013031022962158L;
- public SetUniqueList307(final List<E> list, final Set<E> set) {
+ SetUniqueList307(final List<E> list, final Set<E> set) {
super(list, set);
}
}
@@ -71,12 +71,12 @@ public class SetUniqueListTest<E> extends AbstractListTest<E> {
"Eight",
new String("Nine"),
Integer.valueOf(10),
- new Short((short)11),
+ new Short((short) 11),
new Long(12),
"Thirteen",
"14",
"15",
- new Byte((byte)16)
+ new Byte((byte) 16)
};
}
@@ -359,12 +359,12 @@ public class SetUniqueListTest<E> extends AbstractListTest<E> {
final List<E> list = new ArrayList<>(10);
final SetUniqueList<E> uniqueList = SetUniqueList.setUniqueList(list);
for (int i = 0; i < 10; ++i) {
- uniqueList.add((E)Integer.valueOf(i));
+ uniqueList.add((E) Integer.valueOf(i));
}
final Collection<E> retained = new ArrayList<>(5);
for (int i = 0; i < 5; ++i) {
- retained.add((E)Integer.valueOf(i * 2));
+ retained.add((E) Integer.valueOf(i * 2));
}
assertTrue(uniqueList.retainAll(retained));
@@ -381,16 +381,16 @@ public class SetUniqueListTest<E> extends AbstractListTest<E> {
// initialized with empty list
final List<E> list = new ArrayList<>(10);
for (int i = 0; i < 5; ++i) {
- list.add((E)Integer.valueOf(i));
+ list.add((E) Integer.valueOf(i));
}
final SetUniqueList<E> uniqueList = SetUniqueList.setUniqueList(list);
for (int i = 5; i < 10; ++i) {
- uniqueList.add((E)Integer.valueOf(i));
+ uniqueList.add((E) Integer.valueOf(i));
}
final Collection<E> retained = new ArrayList<>(5);
for (int i = 0; i < 5; ++i) {
- retained.add((E)Integer.valueOf(i * 2));
+ retained.add((E) Integer.valueOf(i * 2));
}
assertTrue(uniqueList.retainAll(retained));
diff --git a/src/test/java/org/apache/commons/collections4/map/AbstractMapTest.java b/src/test/java/org/apache/commons/collections4/map/AbstractMapTest.java
index 1ef9523..51b9a27 100644
--- a/src/test/java/org/apache/commons/collections4/map/AbstractMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/AbstractMapTest.java
@@ -427,7 +427,7 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
* @return the map to be tested
*/
@Override
- public abstract Map<K,V> makeObject();
+ public abstract Map<K, V> makeObject();
/**
* Return a new, populated map. The mappings in the map should match the
@@ -953,7 +953,7 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
m2 = makeConfirmedMap();
final K[] keys = getSampleKeys();
final V[] values = getSampleValues();
- for(int i = 0; i < keys.length; i++) {
+ for (int i = 0; i < keys.length; i++) {
m2.put(keys[i], values[i]);
}
getMap().putAll(m2);
@@ -966,7 +966,7 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
getMap().put(keys[0], values[0]);
getConfirmed().put(keys[0], values[0]);
verify();
- for(int i = 1; i < keys.length; i++) {
+ for (int i = 1; i < keys.length; i++) {
m2.put(keys[i], values[i]);
}
getMap().putAll(m2);
@@ -1234,7 +1234,7 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
return;
}
try {
- assertFalse(values.removeAll(Collections.<V> emptySet()));
+ assertFalse(values.removeAll(Collections.<V>emptySet()));
} catch (final UnsupportedOperationException e) {
// if values.removeAll is unsupported, just skip this test
return;
@@ -1267,7 +1267,7 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
}
assertEquals(sampleValuesAsList.size(), getMap().size());
try {
- assertTrue(values.retainAll(Collections.<V> emptySet()));
+ assertTrue(values.retainAll(Collections.<V>emptySet()));
} catch (final UnsupportedOperationException e) {
// if values.retainAll is unsupported, just skip this test
return;
@@ -1339,7 +1339,7 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
return;
}
try {
- assertFalse(keys.removeAll(Collections.<K> emptySet()));
+ assertFalse(keys.removeAll(Collections.<K>emptySet()));
} catch (final UnsupportedOperationException e) {
return;
}
@@ -1369,7 +1369,7 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
}
assertEquals(sampleKeysAsList, keys);
try {
- assertTrue(keys.retainAll(Collections.<K> emptySet()));
+ assertTrue(keys.retainAll(Collections.<K>emptySet()));
} catch (final UnsupportedOperationException e) {
return;
}
@@ -2046,7 +2046,7 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
/**
* Get the map.
- * @return Map<K,V>
+ * @return Map<K, V>
*/
public Map<K, V> getMap() {
return map;
@@ -2054,7 +2054,7 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
/**
* Get the confirmed.
- * @return Map<K,V>
+ * @return Map<K, V>
*/
public Map<K, V> getConfirmed() {
return confirmed;
diff --git a/src/test/java/org/apache/commons/collections4/map/AbstractSortedMapTest.java b/src/test/java/org/apache/commons/collections4/map/AbstractSortedMapTest.java
index 86a9bb9..108da13 100644
--- a/src/test/java/org/apache/commons/collections4/map/AbstractSortedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/AbstractSortedMapTest.java
@@ -109,7 +109,7 @@ public abstract class AbstractSortedMapTest<K, V> extends AbstractMapTest<K, V>
return new TestSubMap<>(this);
}
- public static abstract class TestViewMap <K, V> extends AbstractSortedMapTest<K, V> {
+ public abstract static class TestViewMap<K, V> extends AbstractSortedMapTest<K, V> {
protected final AbstractMapTest<K, V> main;
protected final List<K> subSortedKeys = new ArrayList<>();
protected final List<V> subSortedValues = new ArrayList<>();
@@ -261,7 +261,7 @@ public abstract class AbstractSortedMapTest<K, V> extends AbstractMapTest<K, V>
// }
}
- public static class TestTailMap <K, V> extends TestViewMap<K, V> {
+ public static class TestTailMap<K, V> extends TestViewMap<K, V> {
static final int SUBSIZE = 6;
final K fromKey;
final K invalidKey;
diff --git a/src/test/java/org/apache/commons/collections4/map/EmptyMapMutator.java b/src/test/java/org/apache/commons/collections4/map/EmptyMapMutator.java
index 1ccf61e..a41e8c0 100644
--- a/src/test/java/org/apache/commons/collections4/map/EmptyMapMutator.java
+++ b/src/test/java/org/apache/commons/collections4/map/EmptyMapMutator.java
@@ -24,14 +24,14 @@ import java.util.Collection;
* the class has to be separate of TestCompositeMap, else the test
* class also has to be serialized.
*/
-class EmptyMapMutator<K,V> implements CompositeMap.MapMutator<K,V> {
+class EmptyMapMutator<K, V> implements CompositeMap.MapMutator<K, V> {
/** Serialization version */
private static final long serialVersionUID = -2729718980002476794L;
@Override
- public void resolveCollision(final CompositeMap<K,V> composite,
- final Map<K,V> existing,
- final Map<K,V> added,
+ public void resolveCollision(final CompositeMap<K, V> composite,
+ final Map<K, V> existing,
+ final Map<K, V> added,
final Collection<K> intersect) {
// Do nothing
}
diff --git a/src/test/java/org/apache/commons/collections4/map/LazyMapTest.java b/src/test/java/org/apache/commons/collections4/map/LazyMapTest.java
index ff49762..e73e568 100644
--- a/src/test/java/org/apache/commons/collections4/map/LazyMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/LazyMapTest.java
@@ -42,8 +42,8 @@ public class LazyMapTest<K, V> extends AbstractIterableMapTest<K, V> {
}
@Override
- public LazyMap<K,V> makeObject() {
- return lazyMap(new HashMap<K,V>(), FactoryUtils.<V>nullFactory());
+ public LazyMap<K, V> makeObject() {
+ return lazyMap(new HashMap<K, V>(), FactoryUtils.<V>nullFactory());
}
//-----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/map/LazySortedMapTest.java b/src/test/java/org/apache/commons/collections4/map/LazySortedMapTest.java
index 0b0917b..4bff593 100644
--- a/src/test/java/org/apache/commons/collections4/map/LazySortedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/LazySortedMapTest.java
@@ -39,12 +39,12 @@ import org.junit.Test;
@SuppressWarnings("boxing")
public class LazySortedMapTest<K, V> extends AbstractSortedMapTest<K, V> {
- private class ReverseStringComparator implements Comparator<String> {
- @Override
- public int compare(final String arg0, final String arg1) {
- return arg1.compareTo(arg0);
- }
- }
+ private class ReverseStringComparator implements Comparator<String> {
+ @Override
+ public int compare(final String arg0, final String arg1) {
+ return arg1.compareTo(arg0);
+ }
+ }
private static final Factory<Integer> oneFactory = FactoryUtils.constantFactory(1);
@@ -55,8 +55,8 @@ public class LazySortedMapTest<K, V> extends AbstractSortedMapTest<K, V> {
}
@Override
- public SortedMap<K,V> makeObject() {
- return lazySortedMap(new TreeMap<K,V>(), FactoryUtils.<V>nullFactory());
+ public SortedMap<K, V> makeObject() {
+ return lazySortedMap(new TreeMap<K, V>(), FactoryUtils.<V>nullFactory());
}
@Override
@@ -73,13 +73,13 @@ public class LazySortedMapTest<K, V> extends AbstractSortedMapTest<K, V> {
@Test
public void mapGet() {
- Map<Integer, Number> map = lazySortedMap(new TreeMap<Integer,Number>(), oneFactory);
+ Map<Integer, Number> map = lazySortedMap(new TreeMap<Integer, Number>(), oneFactory);
assertEquals(0, map.size());
final Number i1 = map.get(5);
assertEquals(1, i1);
assertEquals(1, map.size());
- map = lazySortedMap(new TreeMap<Integer,Number>(), FactoryUtils.<Number>nullFactory());
+ map = lazySortedMap(new TreeMap<Integer, Number>(), FactoryUtils.<Number>nullFactory());
final Number o = map.get(5);
assertEquals(null,o);
assertEquals(1, map.size());
diff --git a/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java b/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java
index cd0dc6b..98e6673 100644
--- a/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java
@@ -454,13 +454,13 @@ public class MultiValueMapTest<K, V> extends AbstractObjectTest {
}
public void testEmptyMapCompatibility() throws Exception {
- final Map<?,?> map = makeEmptyMap();
- final Map<?,?> map2 = (Map<?,?>) readExternalFormFromDisk(getCanonicalEmptyCollectionName(map));
+ final Map<?, ?> map = makeEmptyMap();
+ final Map<?, ?> map2 = (Map<?, ?>) readExternalFormFromDisk(getCanonicalEmptyCollectionName(map));
assertEquals("Map is empty", 0, map2.size());
}
public void testFullMapCompatibility() throws Exception {
- final Map<?,?> map = (Map<?,?>) makeObject();
- final Map<?,?> map2 = (Map<?,?>) readExternalFormFromDisk(getCanonicalFullCollectionName(map));
+ final Map<?, ?> map = (Map<?, ?>) makeObject();
+ final Map<?, ?> map2 = (Map<?, ?>) readExternalFormFromDisk(getCanonicalFullCollectionName(map));
assertEquals("Map is the right size", map.size(), map2.size());
for (final Object key : map.keySet()) {
assertEquals( "Map had inequal elements", map.get(key), map2.get(key) );
diff --git a/src/test/java/org/apache/commons/collections4/map/PredicatedSortedMapTest.java b/src/test/java/org/apache/commons/collections4/map/PredicatedSortedMapTest.java
index 55870f6..b7e58b8 100644
--- a/src/test/java/org/apache/commons/collections4/map/PredicatedSortedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/PredicatedSortedMapTest.java
@@ -35,12 +35,12 @@ import org.apache.commons.collections4.functors.TruePredicate;
*/
public class PredicatedSortedMapTest<K, V> extends AbstractSortedMapTest<K, V> {
- private class ReverseStringComparator implements Comparator<K> {
- @Override
- public int compare(final K arg0, final K arg1) {
- return ((String) arg1).compareTo((String)arg0);
- }
- }
+ private class ReverseStringComparator implements Comparator<K> {
+ @Override
+ public int compare(final K arg0, final K arg1) {
+ return ((String) arg1).compareTo((String) arg0);
+ }
+ }
protected static final Predicate<Object> truePredicate = TruePredicate.truePredicate();
diff --git a/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java b/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java
index ed0eb05..56681e1 100644
--- a/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java
@@ -301,7 +301,7 @@ public class ReferenceMapTest<K, V> extends AbstractIterableMapTest<K, V> {
*/
public void testDataSizeAfterSerialization() throws IOException, ClassNotFoundException {
- final ReferenceMap<String,String> serialiseMap = new ReferenceMap<>(ReferenceStrength.WEAK, ReferenceStrength.WEAK, true);
+ final ReferenceMap<String, String> serialiseMap = new ReferenceMap<>(ReferenceStrength.WEAK, ReferenceStrength.WEAK, true);
serialiseMap.put("KEY", "VALUE");
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -313,7 +313,7 @@ public class ReferenceMapTest<K, V> extends AbstractIterableMapTest<K, V> {
try (ObjectInputStream in = new ObjectInputStream(bais)) {
@SuppressWarnings("unchecked")
final
- ReferenceMap<String,String> deserialisedMap = (ReferenceMap<String,String>) in.readObject();
+ ReferenceMap<String, String> deserialisedMap = (ReferenceMap<String,String>) in.readObject();
assertEquals(1, deserialisedMap.size());
assertEquals(serialiseMap.data.length, deserialisedMap.data.length);
}
@@ -335,7 +335,7 @@ public class ReferenceMapTest<K, V> extends AbstractIterableMapTest<K, V> {
final AbstractReferenceMap<K, V> parent;
final Consumer<V> consumer;
- public AccessibleEntry(final AbstractReferenceMap<K, V> parent, final HashEntry<K, V> next, final int hashCode, final K key, final V value, final Consumer<V> consumer) {
+ AccessibleEntry(final AbstractReferenceMap<K, V> parent, final HashEntry<K, V> next, final int hashCode, final K key, final V value, final Consumer<V> consumer) {
super(parent, next, hashCode, key, value);
this.parent = parent;
this.consumer = consumer;
diff --git a/src/test/java/org/apache/commons/collections4/map/TransformedMapTest.java b/src/test/java/org/apache/commons/collections4/map/TransformedMapTest.java
index aab0797..f48c467 100644
--- a/src/test/java/org/apache/commons/collections4/map/TransformedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/TransformedMapTest.java
@@ -40,7 +40,7 @@ public class TransformedMapTest<K, V> extends AbstractIterableMapTest<K, V> {
//-----------------------------------------------------------------------
@Override
public IterableMap<K, V> makeObject() {
- return TransformedMap.transformingMap(new HashMap<K, V>(), TransformerUtils.<K> nopTransformer(),
+ return TransformedMap.transformingMap(new HashMap<K, V>(), TransformerUtils.<K>nopTransformer(),
TransformerUtils.<V> nopTransformer());
}
diff --git a/src/test/java/org/apache/commons/collections4/map/UnmodifiableSortedMapTest.java b/src/test/java/org/apache/commons/collections4/map/UnmodifiableSortedMapTest.java
index 0101ada..3d997d7 100644
--- a/src/test/java/org/apache/commons/collections4/map/UnmodifiableSortedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/UnmodifiableSortedMapTest.java
@@ -120,7 +120,7 @@ public class UnmodifiableSortedMapTest<K, V> extends AbstractSortedMapTest<K, V>
// "again" is the first key of the map
assertSame(0, map.subMap((K) "again", (K) "again").size());
- assertSame(map.headMap((K)"you").size(), map.subMap((K) "again", (K) "you").size());
+ assertSame(map.headMap((K) "you").size(), map.subMap((K) "again", (K) "you").size());
}
//-----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java
index 25fe327..63bd897 100644
--- a/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMapTest.java
@@ -1199,7 +1199,7 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
final boolean isSetValuedMap = AbstractMultiValuedMapTest.this.makeObject() instanceof SetValuedMap;
final V[] sampleValues = AbstractMultiValuedMapTest.this.getSampleValues();
final Collection<V>[] colArr = new Collection[3];
- for(int i = 0; i < 3; i++) {
+ for (int i = 0; i < 3; i++) {
final Collection<V> coll = Arrays.asList(sampleValues[i*2], sampleValues[i*2 + 1]);
colArr[i] = isSetValuedMap ? new HashSet<>(coll) : coll;
}
diff --git a/src/test/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMapTest.java
index 03f6fc9..a4014c3 100644
--- a/src/test/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/multimap/ArrayListValuedHashMapTest.java
@@ -227,7 +227,7 @@ public class ArrayListValuedHashMapTest<K, V> extends AbstractMultiValuedMapTest
public void testValuesListIteratorMethods(){
final ListValuedMap<K, V> listMap = makeObject();
final List<V> listA = listMap.get((K) "A");
- final List<V> list = Arrays.asList((V) "W", (V) "X", (V) "F", (V) "Q", (V) "Q", (V)"F");
+ final List<V> list = Arrays.asList((V) "W", (V) "X", (V) "F", (V) "Q", (V) "Q", (V) "F");
listA.addAll(0, list);
final ListIterator<V> it = listMap.get((K) "A").listIterator(1);
assertTrue(it.hasNext());
diff --git a/src/test/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMapTest.java
index 0f9c12e..d0c4f29 100644
--- a/src/test/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/multimap/TransformedMultiValuedMapTest.java
@@ -45,7 +45,7 @@ public class TransformedMultiValuedMapTest<K, V> extends AbstractMultiValuedMapT
@Override
public MultiValuedMap<K, V> makeObject() {
return TransformedMultiValuedMap.transformingMap(new ArrayListValuedHashMap<K, V>(),
- TransformerUtils.<K> nopTransformer(), TransformerUtils.<V> nopTransformer());
+ TransformerUtils.<K>nopTransformer(), TransformerUtils.<V>nopTransformer());
}
// -----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMapTest.java b/src/test/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMapTest.java
index 3465a41..1fcbe20 100644
--- a/src/test/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMapTest.java
@@ -60,7 +60,7 @@ public class UnmodifiableMultiValuedMapTest<K, V> extends AbstractMultiValuedMap
@Override
public MultiValuedMap<K, V> makeObject() {
- return UnmodifiableMultiValuedMap.<K, V> unmodifiableMultiValuedMap(
+ return UnmodifiableMultiValuedMap.<K, V>unmodifiableMultiValuedMap(
new ArrayListValuedHashMap<K, V>());
}
@@ -68,7 +68,7 @@ public class UnmodifiableMultiValuedMapTest<K, V> extends AbstractMultiValuedMap
protected MultiValuedMap<K, V> makeFullMap() {
final MultiValuedMap<K, V> map = new ArrayListValuedHashMap<>();
addSampleMappings(map);
- return UnmodifiableMultiValuedMap.<K, V> unmodifiableMultiValuedMap(map);
+ return UnmodifiableMultiValuedMap.<K, V>unmodifiableMultiValuedMap(map);
}
// -----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSetTest.java b/src/test/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSetTest.java
index c35bbe8..a5efdf1 100644
--- a/src/test/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSetTest.java
@@ -96,7 +96,7 @@ public class UnmodifiableMultiSetTest<E> extends AbstractMultiSetTest<E> {
final MultiSet<E> multiset = makeFullCollection();
final MultiSet<E> unmodifiableMultiSet = UnmodifiableMultiSet.unmodifiableMultiSet(multiset);
try {
- unmodifiableMultiSet.add( (E)"One",1);
+ unmodifiableMultiSet.add((E) "One",1);
fail();
} catch (final UnsupportedOperationException ex) {}
}
@@ -105,7 +105,7 @@ public class UnmodifiableMultiSetTest<E> extends AbstractMultiSetTest<E> {
final MultiSet<E> multiset = makeFullCollection();
final MultiSet<E> unmodifiableMultiSet = UnmodifiableMultiSet.unmodifiableMultiSet(multiset);
try {
- unmodifiableMultiSet.remove( "One",1);
+ unmodifiableMultiSet.remove("One", 1);
fail();
} catch (final UnsupportedOperationException ex) {}
}
@@ -114,7 +114,7 @@ public class UnmodifiableMultiSetTest<E> extends AbstractMultiSetTest<E> {
final MultiSet<E> multiset = makeFullCollection();
final MultiSet<E> unmodifiableMultiSet = UnmodifiableMultiSet.unmodifiableMultiSet(multiset);
try {
- unmodifiableMultiSet.setCount( (E)"One",2);
+ unmodifiableMultiSet.setCount((E) "One",2);
fail();
} catch (final UnsupportedOperationException ex) {}
}
@@ -122,7 +122,7 @@ public class UnmodifiableMultiSetTest<E> extends AbstractMultiSetTest<E> {
public void testEntrySet() {
final MultiSet<E> multiset = makeFullCollection();
final MultiSet<E> unmodifiableMultiSet = UnmodifiableMultiSet.unmodifiableMultiSet(multiset);
- assertSame( unmodifiableMultiSet.entrySet().size(),multiset.entrySet().size());
+ assertSame( unmodifiableMultiSet.entrySet().size(), multiset.entrySet().size());
}
//-----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/overview.html b/src/test/java/org/apache/commons/collections4/overview.html
index d4e5229..6ae0b05 100644
--- a/src/test/java/org/apache/commons/collections4/overview.html
+++ b/src/test/java/org/apache/commons/collections4/overview.html
@@ -1,19 +1,19 @@
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
<body>
<p>The Collections Test Framework is an extension to JUnit to enable quick and easy testing
of collections.</p>
diff --git a/src/test/java/org/apache/commons/collections4/properties/AbstractPropertiesFactoryTest.java b/src/test/java/org/apache/commons/collections4/properties/AbstractPropertiesFactoryTest.java
index 2ea6a07..43840dc 100644
--- a/src/test/java/org/apache/commons/collections4/properties/AbstractPropertiesFactoryTest.java
+++ b/src/test/java/org/apache/commons/collections4/properties/AbstractPropertiesFactoryTest.java
@@ -98,7 +98,7 @@ public abstract class AbstractPropertiesFactoryTest<T extends Properties> {
// Can't tell what we are reading
Assume.assumeFalse(isXmlTest());
//
- try (final FileInputStream inputStream = new FileInputStream(pathString)) {
+ try (FileInputStream inputStream = new FileInputStream(pathString)) {
assertContents(factory.load(inputStream));
}
}
@@ -113,7 +113,7 @@ public abstract class AbstractPropertiesFactoryTest<T extends Properties> {
// Can't tell what we are reading
Assume.assumeFalse(isXmlTest());
//
- try (final BufferedReader inputStream = Files.newBufferedReader(Paths.get(pathString))) {
+ try (BufferedReader inputStream = Files.newBufferedReader(Paths.get(pathString))) {
assertContents(factory.load(inputStream));
}
}
diff --git a/src/test/java/org/apache/commons/collections4/properties/EmptyPropertiesTest.java b/src/test/java/org/apache/commons/collections4/properties/EmptyPropertiesTest.java
index 82d06c9..1c63249 100644
--- a/src/test/java/org/apache/commons/collections4/properties/EmptyPropertiesTest.java
+++ b/src/test/java/org/apache/commons/collections4/properties/EmptyPropertiesTest.java
@@ -185,7 +185,7 @@ public class EmptyPropertiesTest {
@Test(expected = UnsupportedOperationException.class)
public void testLoadReader() throws IOException {
- try (final NullReader reader = new NullReader(0)) {
+ try (NullReader reader = new NullReader(0)) {
PropertiesFactory.EMPTY_PROPERTIES.load(reader);
}
}
diff --git a/src/test/java/org/apache/commons/collections4/queue/AbstractQueueTest.java b/src/test/java/org/apache/commons/collections4/queue/AbstractQueueTest.java
index 9c41c38..9fa8063 100644
--- a/src/test/java/org/apache/commons/collections4/queue/AbstractQueueTest.java
+++ b/src/test/java/org/apache/commons/collections4/queue/AbstractQueueTest.java
@@ -374,7 +374,7 @@ public abstract class AbstractQueueTest<E> extends AbstractCollectionTest<E> {
// test to make sure the canonical form has been preserved
final Queue<E> queue = makeFullCollection();
- if(queue instanceof Serializable && !skipSerializedCanonicalTests() && isTestSerialization()) {
+ if (queue instanceof Serializable && !skipSerializedCanonicalTests() && isTestSerialization()) {
final Queue<E> queue2 = (Queue<E>) readExternalFormFromDisk(getCanonicalFullCollectionName(queue));
assertEquals("Queues are not the right size", queue.size(), queue2.size());
}
diff --git a/src/test/java/org/apache/commons/collections4/queue/CircularFifoQueueTest.java b/src/test/java/org/apache/commons/collections4/queue/CircularFifoQueueTest.java
index a8751c9..108bcd0 100644
--- a/src/test/java/org/apache/commons/collections4/queue/CircularFifoQueueTest.java
+++ b/src/test/java/org/apache/commons/collections4/queue/CircularFifoQueueTest.java
@@ -467,7 +467,7 @@ public class CircularFifoQueueTest<E> extends AbstractQueueTest<E> {
fail();
}
- @Override
+ @Override
public String getCompatibilityVersion() {
return "4";
}
diff --git a/src/test/java/org/apache/commons/collections4/queue/UnmodifiableQueueTest.java b/src/test/java/org/apache/commons/collections4/queue/UnmodifiableQueueTest.java
index 579dc1a..8bfe133 100644
--- a/src/test/java/org/apache/commons/collections4/queue/UnmodifiableQueueTest.java
+++ b/src/test/java/org/apache/commons/collections4/queue/UnmodifiableQueueTest.java
@@ -106,7 +106,7 @@ public class UnmodifiableQueueTest<E> extends AbstractQueueTest<E> {
} catch (final NullPointerException ex) {}
}
- public void testOffer() {
+ public void testOffer() {
final Queue<E> queue = makeFullCollection();
final E e = null;
try {
diff --git a/src/test/java/org/apache/commons/collections4/set/EmptySetMutator.java b/src/test/java/org/apache/commons/collections4/set/EmptySetMutator.java
index f998f16..ff790a1 100644
--- a/src/test/java/org/apache/commons/collections4/set/EmptySetMutator.java
+++ b/src/test/java/org/apache/commons/collections4/set/EmptySetMutator.java
@@ -32,7 +32,7 @@ class EmptySetMutator<E> implements CompositeSet.SetMutator<E> {
private final Set<E> contained;
- public EmptySetMutator(final Set<E> set) {
+ EmptySetMutator(final Set<E> set) {
this.contained = set;
}
diff --git a/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java b/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java
index a1a2556..decee20 100644
--- a/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java
@@ -72,7 +72,7 @@ public class TransformedSplitMapTest extends BulkTest {
assertEquals(--sz, map.size());
final TransformedSplitMap<String, String, String, Integer> map2 = TransformedSplitMap.transformingMap(
- new HashMap<String, Integer>(), NOPTransformer.<String> nopTransformer(), stringToInt);
+ new HashMap<String, Integer>(), NOPTransformer.<String>nopTransformer(), stringToInt);
assertEquals(0, map2.size());
for (int i = 0; i < 6; i++) {
map2.put(String.valueOf(i), String.valueOf(i));
@@ -93,7 +93,7 @@ public class TransformedSplitMapTest extends BulkTest {
public void testMapIterator() {
final TransformedSplitMap<String, String, String, Integer> map =
TransformedSplitMap.transformingMap(new HashMap<String, Integer>(),
- NOPTransformer.<String> nopTransformer(), stringToInt);
+ NOPTransformer.<String>nopTransformer(), stringToInt);
assertEquals(0, map.size());
for (int i = 0; i < 6; i++) {
map.put(String.valueOf(i), String.valueOf(i));
diff --git a/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java b/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java
index 04cb3ad..c020d59 100755
--- a/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java
+++ b/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java
@@ -323,7 +323,7 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String, V> {
iter.remove();
Assert.assertEquals(1, map.size());
Assert.assertEquals("Akko", iter.next());
- if(iter.hasNext()) {
+ if (iter.hasNext()) {
Assert.fail("shouldn't have next (but was: " + iter.next() + ")");
}
Assert.assertFalse(iter.hasNext());