mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
ENT-11263: Remove TooGenericExceptionCaught detekt rule
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
@file:Suppress("TooGenericExceptionCaught") // needs to catch and handle/rethrow *all* exceptions in many places
|
||||
package net.corda.nodeapi.internal.bridging
|
||||
|
||||
import co.paralleluniverse.fibers.instrument.DontInstrument
|
||||
|
@ -1,4 +1,3 @@
|
||||
@file:Suppress("TooGenericExceptionCaught") // needs to catch and handle/rethrow *all* exceptions
|
||||
package net.corda.nodeapi.internal.bridging
|
||||
|
||||
import net.corda.core.identity.CordaX500Name
|
||||
@ -27,6 +26,7 @@ import rx.Observable
|
||||
import rx.subjects.PublishSubject
|
||||
import java.time.Duration
|
||||
import java.util.*
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
class BridgeControlListener(private val keyStore: CertificateStore,
|
||||
trustStore: CertificateStore,
|
||||
@ -142,7 +142,7 @@ class BridgeControlListener(private val keyStore: CertificateStore,
|
||||
val notifyMessage = data.deserialize<BridgeControl.BridgeToNodeSnapshotRequest>(context = SerializationDefaults.P2P_CONTEXT)
|
||||
if (notifyMessage.bridgeIdentity != bridgeId) {
|
||||
log.error("Fatal Error! Two bridges have been configured simultaneously! Check the enterpriseConfiguration.externalBridge status")
|
||||
System.exit(1)
|
||||
exitProcess(1)
|
||||
}
|
||||
} catch (ex: Exception) {
|
||||
log.error("Unable to process bridge notification message", ex)
|
||||
@ -204,7 +204,7 @@ class BridgeControlListener(private val keyStore: CertificateStore,
|
||||
is BridgeControl.NodeToBridgeSnapshot -> {
|
||||
if (!isConfigured(controlMessage.nodeIdentity)) {
|
||||
log.error("Fatal error! Bridge not configured with keystore for node with legal name ${controlMessage.nodeIdentity}.")
|
||||
System.exit(1)
|
||||
exitProcess(1)
|
||||
}
|
||||
if (!controlMessage.inboxQueues.all { validateInboxQueueName(it) }) {
|
||||
log.error("Invalid queue names in control message $controlMessage")
|
||||
|
@ -1,4 +1,4 @@
|
||||
@file:Suppress("MagicNumber", "TooGenericExceptionCaught")
|
||||
@file:Suppress("MagicNumber")
|
||||
|
||||
package net.corda.nodeapi.internal.crypto
|
||||
|
||||
|
@ -5,7 +5,6 @@ import com.github.benmanes.caffeine.cache.LoadingCache
|
||||
import net.corda.core.internal.readFully
|
||||
import net.corda.core.utilities.contextLogger
|
||||
import net.corda.core.utilities.debug
|
||||
import net.corda.core.utilities.contextLogger
|
||||
import net.corda.core.utilities.minutes
|
||||
import net.corda.core.utilities.seconds
|
||||
import net.corda.nodeapi.internal.crypto.X509CertificateFactory
|
||||
@ -21,7 +20,6 @@ import javax.security.auth.x500.X500Principal
|
||||
/**
|
||||
* [CrlSource] which downloads CRLs from the distribution points in the X509 certificate and caches them.
|
||||
*/
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
class CertDistPointCrlSource(cacheSize: Long = DEFAULT_CACHE_SIZE,
|
||||
cacheExpiry: Duration = DEFAULT_CACHE_EXPIRY,
|
||||
private val connectTimeout: Duration = DEFAULT_CONNECT_TIMEOUT,
|
||||
|
@ -33,7 +33,6 @@ class CordaRevocationChecker(private val crlSource: CrlSource,
|
||||
checkApprovedCRLs(cert, getCRLs(cert))
|
||||
}
|
||||
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
private fun getCRLs(cert: X509Certificate): Set<X509CRL> {
|
||||
val crls = try {
|
||||
crlSource.fetch(cert)
|
||||
|
Reference in New Issue
Block a user