Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
patriknw committed Jul 5, 2019
1 parent decf338 commit 83e2bbb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
6 changes: 6 additions & 0 deletions akka-actor/src/main/scala/akka/util/OptionVal.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ private[akka] final class OptionVal[+A](val x: A) extends AnyVal {
def getOrElse[B >: A](default: B): B =
if (x == null) default else x

/**
* Convert to `scala.Option`
*/
def toOption: Option[A] =
Option(x)

def contains[B >: A](it: B): Boolean =
x != null && x == it

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ import akka.annotation.InternalApi
* Typical use cases include (but are not limited to):
* <ul>
* <li>extracting events from "envelopes"</li>
* <li>manually converting to the Journals storage format, such as JSON, BSON or any specialised binary format</li>
* <li>adapting incoming events from a "data model" to the "domain model"</li>
* <li>adapting events from a "domain model" to the "data model", e.g. converting to the Journals storage format,
* such as JSON, BSON or any specialised binary format</li>
* <li>adapting events from a "data model" to the "domain model"</li>
* <li>adding metadata that is understood by the journal</li>
* <li>migration by splitting up events into sequences of other events</li>
* <li>migration filtering out unused events, or replacing an event with another</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private[akka] final class ReplayingEvents[C, E, S](
} catch {
case NonFatal(ex) =>
state = state.copy(repr.sequenceNr)
onRecoveryFailure(ex, Option(eventForErrorReporting.getOrElse(null)))
onRecoveryFailure(ex, eventForErrorReporting.toOption)
}

case RecoverySuccess(highestSeqNr) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ final case class AtomicWrite(payload: immutable.Seq[PersistentRepr]) extends Per
* old records from v2.3 may have this as `true` if
* it was a non-permanent delete.
*/
def deleted: Boolean
def deleted: Boolean // FIXME deprecate, issue #27278

/**
* Not used, can be `null`
*/
def sender: ActorRef
def sender: ActorRef // FIXME deprecate, issue #27278

/**
* Creates a new copy of this [[PersistentRepr]].
Expand Down

0 comments on commit 83e2bbb

Please sign in to comment.