Skip to content

Kotlin-Friendly

Compare
Choose a tag to compare
@GlenKPeterson GlenKPeterson released this 06 Oct 20:17

Release 3.5.8 2020-10-06

  • Renamed all mutable collections from Mutable___ to Mut___ so they no longer conflict with Kotlin's StdLib. See script below to help you upgrade.
  • Deprecated RRB-Tree join() and remove() methods until the bugs in them can be fixed.
  • Added org.jetbrains.annotations dependency and marked many methods with Nullable and NotNull.
    This increased the size of the jar file by less than 3%.
  • Use filterNonNull() Instead of .filter(Objects::nonNull) because sometimes IntelliJ gets confused about whether objects can be null in this case or not.
  • Fixed some nullability issues with the few varargs methods in this project.
  • Added Transform.any(Fn1) which returns true if anything matches the given predicate.

Here is a script to ease your upgrade from 3.0 or 3.2 to 3.5

# USE CAUTION AND HAVE A BACKUP OF YOUR SOURCE CODE (VERSION CONTROL) - NO GUARANTEES

oldString='MutableList'
newString=MutList
sed -i -e "s/$oldString/$newString/g" $(fgrep --exclude-dir='.svn' --exclude-dir='.git' -rIl "$oldString" *)

oldString='MutableMap'
newString=MutMap
sed -i -e "s/$oldString/$newString/g" $(fgrep --exclude-dir='.svn' --exclude-dir='.git' -rIl "$oldString" *)

oldString='MutableSet'
newString=MutSet
sed -i -e "s/$oldString/$newString/g" $(fgrep --exclude-dir='.svn' --exclude-dir='.git' -rIl "$oldString" *)

oldString='toMutableSortedSet'
newString=toMutSortedSet
sed -i -e "s/$oldString/$newString/g" $(fgrep --exclude-dir='.svn' --exclude-dir='.git' -rIl "$oldString" *)

oldString='toMutableSortedMap'
newString=toMutSortedMap
sed -i -e "s/$oldString/$newString/g" $(fgrep --exclude-dir='.svn' --exclude-dir='.git' -rIl "$oldString" *)

oldString='MutableHashSet'
newString=MutHashSet
sed -i -e "s/$oldString/$newString/g" $(fgrep --exclude-dir='.svn' --exclude-dir='.git' -rIl "$oldString" *)

oldString='MutableHashMap'
newString=MutHashMap
sed -i -e "s/$oldString/$newString/g" $(fgrep --exclude-dir='.svn' --exclude-dir='.git' -rIl "$oldString" *)

After the above, you probably want to check out any Kotlin files. Sorry. If you use MutableMap/MutableList/etc. inside a Kotlin file, you have to fix it manually. Sorry.