Skip to content

Bugfix Release 2.0.5

Compare
Choose a tag to compare
@danieldietrich 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»

Improvements

«collections»

  • PR #1696 (fixes #1227) Made naturalComparator() a singleton and made use of it
    7a9cc48

Documentation

«control»