Bugfix Release 2.0.5
danieldietrich
released this
12 May 08:38
·
1479 commits
to master
since this release
Committers
@ashrko619
@danieldietrich
@mduesterhoeft
@paplorinc
@ruslansennov
New and Noteworthy
API Additions
Javaslang follows the semantic versioning scheme. In the strict sense API additions require a minor version update. However, the additions that are contained in this bugfix release are considered to be fixes, not additional features.
Beside backward-compatible modifier- and override-fixes, the release includes these API additions:
TreeMap/TreeSet.collector()
do explicitly enforce that the key/element-type is Comparable. We did this by narrowing a generic parameter. However, the previous version would have lead to a ClassCastException at runtime if the given type were not Comparable.
interface javaslang.collection.Iterator<T> {
+ static Iterator<BigDecimal> rangeBy(BigDecimal from, BigDecimal toExclusive, BigDecimal step)
}
class javaslang.collection.TreeMap<K, V> {
~ static <K extends Comparable<? super K>, V> Collector<Tuple2<K, V>, ArrayList<Tuple2<K, V>>, TreeMap<K, V>> collector()
+ static <K, V> Collector<Tuple2<K, V>, ArrayList<Tuple2<K, V>>, TreeMap<K, V>> collector(Comparator<? super K> keyComparator)
}
class javaslang.collection.TreeSet<T> {
~ static <T extends Comparable<? super T>> Collector<T, ArrayList<T>, TreeSet<T>> collector()
+ static <T> Collector<T, ArrayList<T>, TreeSet<T>> collector(Comparator<? super T> comparator)
}
Behavioral Changes
Iterator.rangeBy/rangeClosedBy
internally now use BigDecimal instead of double to calculate the range (see #1309).Traversable.dropWhile/takeWhile/span
behaved incorrect. This is fixed now (see #1641).LinkedHashMap.values()
does now preserve insertion order (see #1656).Value.toCharSeq()
now returns a string representation of the contained element(s) instead of the container type (see #1685).Traversable.min()/max()
throw now NullPointerException in each case if a null element exists (see #1482).
List of Changes
Bugfixes
«base»
«collections»
- PR #1695 (fixes #1549) Re-worked TreeMap comparators, considering null-keys
→ 2767cf - PR #1692 (fixes #1482) min() max() now throw NPE on null values
→ 5326c88, 7c2c906 - PR #1671 (fixes #1633) use a Vector as accumulator of map.traverse
→ 662cdd7 - PR #1657 (fixes #1656) Fixes LinkedHashMap::values()
→ 6466e98 - PR #1646 (fixes #1641) Fixes truncation bug of dropWhile and null handling of takeWhile and dropWhile
→ 6b6d40e - PR #1308 (fixes #1309) Iterator range maintenance
→ cc48033 - PR #1251 (fixes #1249) Map/Set factories with comparator
→ f3f8f99
Improvements
«collections»
Documentation
«control»