diff --git a/core/common/src/main/scala/net/liftweb/common/Box.scala b/core/common/src/main/scala/net/liftweb/common/Box.scala index 540b795a52..eee268f25f 100644 --- a/core/common/src/main/scala/net/liftweb/common/Box.scala +++ b/core/common/src/main/scala/net/liftweb/common/Box.scala @@ -102,10 +102,12 @@ sealed trait BoxTrait { /** * This method allows one to encapsulate any object in a Box in a null-safe manner, * treating null values to Empty. This is a parallel method to - * the Scala Option's apply method. + * the Scala Option's apply method. Note that the apply method is overloaded + * and it's much, much better to use legacyNullTest in this case. * * @return Full(in) if in is not null; Empty otherwise */ + @deprecated("Use legacyNullTest") def apply[T](in: T): Box[T] = legacyNullTest(in) /** @@ -180,8 +182,10 @@ sealed trait BoxTrait { } /** - * The Box class is a container which is able to declare if it is Full (containing a single non-null value) or Empty. - * It serves the same purpose as the Option class from Scala standard library but adds several features: + * The Box class is a container which is able to declare if it is Full (containing a single non-null value) or EmptyBox. An EmptyBox, or empty, can be the Empty singleton, Failure or ParamFailure. + * Failure and ParamFailure contain information about why the Box is empty including + * exception information, chained Failures and a String. + * It serves a similar purpose to the Option class from Scala standard library but adds several features: *