Merge pull request #7156 from ulrikrasmussen/squelch-spurious-warning

CORDA-4257: Do not emit warning when StatePointer.isResolved = false
This commit is contained in:
Adel El-Beik 2022-05-20 13:10:09 +01:00 committed by GitHub
commit bd120028ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -741,9 +741,11 @@ open class TransactionBuilder(
addReferenceState(resolvedStateAndRef.referenced())
}
} else {
log.warn("WARNING: You must pass in a ServiceHub reference to TransactionBuilder to resolve " +
"state pointers outside of flows. If you are writing a unit test then pass in a " +
"MockServices instance.")
if (nextStatePointer.isResolved) {
log.warn("WARNING: You must pass in a ServiceHub reference to TransactionBuilder to resolve " +
"state pointers outside of flows. If you are writing a unit test then pass in a " +
"MockServices instance.")
}
return
}
}