CORDA-2128: Made DEFAULT_TRACKER lambda private (#4493)

This commit is contained in:
Shams Asari 2019-01-02 22:41:53 +00:00 committed by GitHub
parent 30b138a847
commit 1ae1e4909d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 8 deletions

View File

@ -95,6 +95,8 @@ abstract class FlowLogic<out T> {
fiber.suspend(request, maySkipCheckpoint = maySkipCheckpoint)
}
}
private val DEFAULT_TRACKER = { ProgressTracker() }
}
/**
@ -345,7 +347,7 @@ abstract class FlowLogic<out T> {
* Note that this has to return a tracker before the flow is invoked. You can't change your mind half way
* through.
*/
open val progressTracker: ProgressTracker? = ProgressTracker.DEFAULT_TRACKER()
open val progressTracker: ProgressTracker? = DEFAULT_TRACKER()
/**
* This is where you fill out your business logic.

View File

@ -287,13 +287,6 @@ class ProgressTracker(vararg inputSteps: Step) {
/** Returns true if the progress tracker has ended, either by reaching the [DONE] step or prematurely with an error */
val hasEnded: Boolean get() = _changes.hasCompleted() || _changes.hasThrowable()
companion object {
val DEFAULT_TRACKER = { ProgressTracker() }
}
}
// TODO: Expose the concept of errors.
// TODO: It'd be helpful if this class was at least partly thread safe.