Skip to content

Releases: ryanstull/ScalaNullSafe

1.4.0

15 Mar 23:39

Choose a tag to compare

New Features:

  • Support for Scala 3! 🥳🎉🎉🎉 (Finally 😅)
    • Requires 3.3.X or higher
    • Resolves issue #10

Misc:

  • Upgraded to SBT 1.10.10
  • Updated Github actions files
  • Upgraded some other dependencies

v1.3.1

07 Dec 02:24

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

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

Choose a tag to compare

  • Fixes issue #9

v1.2.5

27 Jul 07:54

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

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

Choose a tag to compare

Added support for var-args in ?? macro

v1.2.1

27 Jul 07:06

Choose a tag to compare

Added support for scala 2.13

v1.2.0

27 Jul 07:05

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

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,"") == "")