Skip to content

Commit

Permalink
CORDA-2690: Reduce CordApp scanning logging
Browse files Browse the repository at this point in the history
Only log a line about looking for notary implementations if at least notary implementation is found.

It might be unnecessary and confusing to log when no implementations are found.
Replaced TrustedAuthorityNotaryService with SinglePartyNotaryService in comment
  • Loading branch information
lockathan authored and adagys committed Mar 4, 2019
1 parent 9da30b4 commit e3c0b6e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,14 @@ class JarScanningCordappLoader private constructor(private val cordappJarPaths:
}

private fun findNotaryService(scanResult: RestrictedScanResult): Class<out NotaryService>? {
// Note: we search for implementations of both NotaryService and TrustedAuthorityNotaryService as
// Note: we search for implementations of both NotaryService and SinglePartyNotaryService as
// the scanner won't find subclasses deeper down the hierarchy if any intermediate class is not
// present in the CorDapp.
val result = scanResult.getClassesWithSuperclass(NotaryService::class) +
scanResult.getClassesWithSuperclass(SinglePartyNotaryService::class)
logger.info("Found notary service CorDapp implementations: " + result.joinToString(", "))
if(!result.isEmpty()) {
logger.info("Found notary service CorDapp implementations: " + result.joinToString(", "))
}
return result.firstOrNull()
}

Expand Down

0 comments on commit e3c0b6e

Please sign in to comment.