Skip to content

Releases: ryanstull/ScalaNullSafe

v1.3.1

07 Dec 02:24
Compare
Choose a tag to compare
  • Fixed bug that would sometimes cause extraneous null checks on non-nullable values

v1.3.0

30 Jun 00:34
Compare
Choose a tag to compare

New Features:

Bug fixes:

  • Fixed bug relating to the handling of implicit defs

v1.2.6

28 Dec 05:48
Compare
Choose a tag to compare
  • Fixes issue #9

v1.2.5

27 Jul 07:54
Compare
Choose a tag to compare
  • Upgraded sbt to 1.3.0
  • Casting now won't cause the macro to crash
  • Skips unnecessary null-checks on non-nullable intermediate results
  • Macro now works with multi-arg methods
  • Function calls are now flattened. e.g. In X(Y(a)) the result of Y(a) won't be null-checked, because null could be a valid input into a method or function.
  • ?? macro is now more efficient and only checks the minimum number of expressions needed to find a non-null value. Before it would check all provided expressions.

v1.2.4

27 Jul 07:09
Compare
Choose a tag to compare

Improved efficiency, by removing unnecessary conversion between primitive vals and Java boxes types.

v1.2.3

27 Jul 07:07
Compare
Choose a tag to compare

Added support for var-args in ?? macro

v1.2.1

27 Jul 07:06
Compare
Choose a tag to compare

Added support for scala 2.13

v1.2.0

27 Jul 07:05
Compare
Choose a tag to compare

Added ?? macro for null coalescing.

Use:

case class Person(name: String)

val person = Person(null)

assert(??(person.name)("Bob") == "Bob")

val person2: Person = null
val person3 = Person("Sally")

assert(??(person.name,person2.name,person3.name)("No name") == "Sally")

v1.1.0

28 Mar 05:28
Compare
Choose a tag to compare
  • Added optional default for ? macro. Simply add the default as the second argument and that will be returned in the absent case. e.g:
case class Person(name: String)

val person: Person = null

assert(?(person.name,"") == "")

v1.0.3

27 Mar 15:48
Compare
Choose a tag to compare
  • Fixed error in java-doc. Had doc about a type parameter for some of the macros that didn't take one.
  • Added benchmarks for lense-based approach to null safety; used Monocle's Optional implementation. Was not a viable alternative.