mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
Remove some trivial syntax related warning messages.
Fix whitespace Address PR comment
This commit is contained in:
parent
e27e18a9ec
commit
291a55d2d2
@ -7,7 +7,6 @@ import net.corda.core.contracts.StateAndRef
|
||||
import net.corda.core.contracts.StateRef
|
||||
import net.corda.core.contracts.TransactionState
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.utilities.toBase58String
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.node.ServiceHub
|
||||
@ -30,8 +29,8 @@ class CashSelectionH2Impl : CashSelection {
|
||||
val log = loggerFor<CashSelectionH2Impl>()
|
||||
}
|
||||
|
||||
override fun isCompatible(metaData: DatabaseMetaData): Boolean {
|
||||
return metaData.driverName == JDBC_DRIVER_NAME
|
||||
override fun isCompatible(metadata: DatabaseMetaData): Boolean {
|
||||
return metadata.driverName == JDBC_DRIVER_NAME
|
||||
}
|
||||
|
||||
// coin selection retry loop counter, sleep (msecs) and lock for selecting states
|
||||
|
@ -3,7 +3,6 @@ package net.corda.node.services.vault
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.crypto.entropyToKeyPair
|
||||
import net.corda.core.utilities.toBase58String
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.identity.PartyAndCertificate
|
||||
import net.corda.core.node.services.*
|
||||
@ -1060,7 +1059,7 @@ class VaultQueryTests : TestDependencyInjectionBase() {
|
||||
}
|
||||
database.transaction {
|
||||
@Suppress("EXPECTED_CONDITION")
|
||||
val pagingSpec = PageSpecification(DEFAULT_PAGE_NUM, MAX_PAGE_SIZE + 1) // overflow = -2147483648
|
||||
val pagingSpec = PageSpecification(DEFAULT_PAGE_NUM, @Suppress("INTEGER_OVERFLOW")MAX_PAGE_SIZE + 1) // overflow = -2147483648
|
||||
val criteria = VaultQueryCriteria(status = Vault.StateStatus.ALL)
|
||||
vaultQuerySvc.queryBy<ContractState>(criteria, paging = pagingSpec)
|
||||
}
|
||||
|
@ -7,9 +7,9 @@ import javafx.scene.layout.StackPane
|
||||
import javafx.scene.shape.Circle
|
||||
import javafx.scene.shape.Line
|
||||
import javafx.util.Duration
|
||||
import net.corda.core.utilities.commonName
|
||||
import net.corda.core.node.ScreenCoordinate
|
||||
import net.corda.core.utilities.ProgressTracker
|
||||
import net.corda.core.utilities.commonName
|
||||
import net.corda.netmap.simulation.IRSSimulation
|
||||
import net.corda.testing.node.MockNetwork
|
||||
import org.bouncycastle.asn1.x500.X500Name
|
||||
@ -85,7 +85,7 @@ class VisualiserViewModel {
|
||||
// bottom left: -23.2031,29.8406
|
||||
// top right: 33.0469,64.3209
|
||||
try {
|
||||
return node.place.coordinate!!.project(view.mapImage.fitWidth, view.mapImage.fitHeight, 64.3209, 29.8406, -23.2031, 33.0469)
|
||||
return node.place.coordinate.project(view.mapImage.fitWidth, view.mapImage.fitHeight, 64.3209, 29.8406, -23.2031, 33.0469)
|
||||
} catch(e: Exception) {
|
||||
throw Exception("Cannot project ${node.info.legalIdentity}", e)
|
||||
}
|
||||
|
@ -56,8 +56,8 @@ class NodeController(check: atRuntime = ::checkExists) : Controller() {
|
||||
baseDir,
|
||||
getX509Name(
|
||||
myLegalName = nodeData.legalName.value.trim(),
|
||||
email = "corda@city.${location.countryCode!!.toLowerCase()}.example",
|
||||
nearestCity = location.description!!,
|
||||
email = "corda@city.${location.countryCode.toLowerCase()}.example",
|
||||
nearestCity = location.description,
|
||||
country = location.countryCode
|
||||
),
|
||||
nodeData.p2pPort.value,
|
||||
|
@ -14,15 +14,15 @@ import javafx.scene.layout.Pane
|
||||
import javafx.scene.layout.Priority
|
||||
import javafx.stage.FileChooser
|
||||
import javafx.util.StringConverter
|
||||
import net.corda.core.utilities.commonName
|
||||
import net.corda.core.internal.div
|
||||
import net.corda.core.internal.exists
|
||||
import net.corda.core.internal.readAllLines
|
||||
import net.corda.core.internal.writeLines
|
||||
import net.corda.core.node.CityDatabase
|
||||
import net.corda.core.node.WorldMapLocation
|
||||
import net.corda.core.internal.readAllLines
|
||||
import net.corda.core.utilities.commonName
|
||||
import net.corda.core.utilities.normaliseLegalName
|
||||
import net.corda.core.utilities.validateLegalName
|
||||
import net.corda.core.internal.writeLines
|
||||
import net.corda.demobench.model.*
|
||||
import net.corda.demobench.ui.CloseableTab
|
||||
import org.controlsfx.control.CheckListView
|
||||
@ -220,7 +220,7 @@ class NodeTabView : Fragment() {
|
||||
imageview {
|
||||
image = flags.get()[it.countryCode]
|
||||
}
|
||||
label(it.description!!)
|
||||
label(it.description)
|
||||
alignment = Pos.CENTER_LEFT
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ class Network : CordaView() {
|
||||
copyableLabel(SimpleObjectProperty(node.legalIdentity.owningKey.toBase58String())).apply { minWidth = 400.0 }
|
||||
}
|
||||
row("Services :") { label(node.advertisedServices.map { it.info }.joinToString(", ")) }
|
||||
node.getWorldMapLocation()?.apply { row("Location :") { label(this@apply.description!!) } }
|
||||
node.getWorldMapLocation()?.apply { row("Location :") { label(this@apply.description) } }
|
||||
}
|
||||
}
|
||||
setOnMouseClicked {
|
||||
|
@ -22,8 +22,8 @@ import net.corda.client.jfx.utils.*
|
||||
import net.corda.core.contracts.Amount
|
||||
import net.corda.core.contracts.StateAndRef
|
||||
import net.corda.core.contracts.withoutIssuer
|
||||
import net.corda.core.utilities.commonName
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.utilities.commonName
|
||||
import net.corda.explorer.formatters.AmountFormatter
|
||||
import net.corda.explorer.formatters.PartyNameFormatter
|
||||
import net.corda.explorer.identicon.identicon
|
||||
@ -174,11 +174,11 @@ class CashViewer : CordaView("Cash") {
|
||||
* Next we create subgroups based on currency. [memberStates] here is all states holding currency [currency] issued by [issuer] above.
|
||||
* Note that these states will not be displayed in the TreeTable, but rather in the side pane if the user clicks on the row.
|
||||
*/
|
||||
val currencyNodes = AggregatedList(memberStates, { it.state.data.amount.token.product }) { currency, memberStates ->
|
||||
val currencyNodes = AggregatedList(memberStates, { it.state.data.amount.token.product }) { currency, groupedMemberStates ->
|
||||
/**
|
||||
* We sum the states in the subgroup, to be displayed in the "Local Currency" column
|
||||
*/
|
||||
val amounts = memberStates.map { it.state.data.amount.withoutIssuer() }
|
||||
val amounts = groupedMemberStates.map { it.state.data.amount.withoutIssuer() }
|
||||
val sumAmount = amounts.foldObservable(Amount(0, currency), Amount<Currency>::plus)
|
||||
|
||||
/**
|
||||
@ -190,7 +190,7 @@ class CashViewer : CordaView("Cash") {
|
||||
/**
|
||||
* Finally assemble the actual TreeTable Currency node.
|
||||
*/
|
||||
TreeItem(ViewerNode.CurrencyNode(sumAmount, equivSumAmount, memberStates))
|
||||
TreeItem(ViewerNode.CurrencyNode(sumAmount, equivSumAmount, groupedMemberStates))
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user