Remove some trivial syntax related warning messages.

Fix whitespace

Address PR comment
This commit is contained in:
Matthew Nesbit
2017-09-06 16:48:54 +01:00
parent e27e18a9ec
commit 291a55d2d2
7 changed files with 16 additions and 18 deletions

View File

@ -7,7 +7,6 @@ import net.corda.core.contracts.StateAndRef
import net.corda.core.contracts.StateRef import net.corda.core.contracts.StateRef
import net.corda.core.contracts.TransactionState import net.corda.core.contracts.TransactionState
import net.corda.core.crypto.SecureHash import net.corda.core.crypto.SecureHash
import net.corda.core.utilities.toBase58String
import net.corda.core.identity.AbstractParty import net.corda.core.identity.AbstractParty
import net.corda.core.identity.Party import net.corda.core.identity.Party
import net.corda.core.node.ServiceHub import net.corda.core.node.ServiceHub
@ -30,8 +29,8 @@ class CashSelectionH2Impl : CashSelection {
val log = loggerFor<CashSelectionH2Impl>() val log = loggerFor<CashSelectionH2Impl>()
} }
override fun isCompatible(metaData: DatabaseMetaData): Boolean { override fun isCompatible(metadata: DatabaseMetaData): Boolean {
return metaData.driverName == JDBC_DRIVER_NAME return metadata.driverName == JDBC_DRIVER_NAME
} }
// coin selection retry loop counter, sleep (msecs) and lock for selecting states // coin selection retry loop counter, sleep (msecs) and lock for selecting states

View File

@ -3,7 +3,6 @@ package net.corda.node.services.vault
import net.corda.core.contracts.* import net.corda.core.contracts.*
import net.corda.core.crypto.SecureHash import net.corda.core.crypto.SecureHash
import net.corda.core.crypto.entropyToKeyPair import net.corda.core.crypto.entropyToKeyPair
import net.corda.core.utilities.toBase58String
import net.corda.core.identity.Party import net.corda.core.identity.Party
import net.corda.core.identity.PartyAndCertificate import net.corda.core.identity.PartyAndCertificate
import net.corda.core.node.services.* import net.corda.core.node.services.*
@ -1060,7 +1059,7 @@ class VaultQueryTests : TestDependencyInjectionBase() {
} }
database.transaction { database.transaction {
@Suppress("EXPECTED_CONDITION") @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) val criteria = VaultQueryCriteria(status = Vault.StateStatus.ALL)
vaultQuerySvc.queryBy<ContractState>(criteria, paging = pagingSpec) vaultQuerySvc.queryBy<ContractState>(criteria, paging = pagingSpec)
} }

View File

@ -7,9 +7,9 @@ import javafx.scene.layout.StackPane
import javafx.scene.shape.Circle import javafx.scene.shape.Circle
import javafx.scene.shape.Line import javafx.scene.shape.Line
import javafx.util.Duration import javafx.util.Duration
import net.corda.core.utilities.commonName
import net.corda.core.node.ScreenCoordinate import net.corda.core.node.ScreenCoordinate
import net.corda.core.utilities.ProgressTracker import net.corda.core.utilities.ProgressTracker
import net.corda.core.utilities.commonName
import net.corda.netmap.simulation.IRSSimulation import net.corda.netmap.simulation.IRSSimulation
import net.corda.testing.node.MockNetwork import net.corda.testing.node.MockNetwork
import org.bouncycastle.asn1.x500.X500Name import org.bouncycastle.asn1.x500.X500Name
@ -85,7 +85,7 @@ class VisualiserViewModel {
// bottom left: -23.2031,29.8406 // bottom left: -23.2031,29.8406
// top right: 33.0469,64.3209 // top right: 33.0469,64.3209
try { 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) { } catch(e: Exception) {
throw Exception("Cannot project ${node.info.legalIdentity}", e) throw Exception("Cannot project ${node.info.legalIdentity}", e)
} }

View File

@ -56,8 +56,8 @@ class NodeController(check: atRuntime = ::checkExists) : Controller() {
baseDir, baseDir,
getX509Name( getX509Name(
myLegalName = nodeData.legalName.value.trim(), myLegalName = nodeData.legalName.value.trim(),
email = "corda@city.${location.countryCode!!.toLowerCase()}.example", email = "corda@city.${location.countryCode.toLowerCase()}.example",
nearestCity = location.description!!, nearestCity = location.description,
country = location.countryCode country = location.countryCode
), ),
nodeData.p2pPort.value, nodeData.p2pPort.value,

View File

@ -14,15 +14,15 @@ import javafx.scene.layout.Pane
import javafx.scene.layout.Priority import javafx.scene.layout.Priority
import javafx.stage.FileChooser import javafx.stage.FileChooser
import javafx.util.StringConverter import javafx.util.StringConverter
import net.corda.core.utilities.commonName
import net.corda.core.internal.div import net.corda.core.internal.div
import net.corda.core.internal.exists 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.CityDatabase
import net.corda.core.node.WorldMapLocation 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.normaliseLegalName
import net.corda.core.utilities.validateLegalName import net.corda.core.utilities.validateLegalName
import net.corda.core.internal.writeLines
import net.corda.demobench.model.* import net.corda.demobench.model.*
import net.corda.demobench.ui.CloseableTab import net.corda.demobench.ui.CloseableTab
import org.controlsfx.control.CheckListView import org.controlsfx.control.CheckListView
@ -220,7 +220,7 @@ class NodeTabView : Fragment() {
imageview { imageview {
image = flags.get()[it.countryCode] image = flags.get()[it.countryCode]
} }
label(it.description!!) label(it.description)
alignment = Pos.CENTER_LEFT alignment = Pos.CENTER_LEFT
} }
} }

View File

@ -99,7 +99,7 @@ class Network : CordaView() {
copyableLabel(SimpleObjectProperty(node.legalIdentity.owningKey.toBase58String())).apply { minWidth = 400.0 } copyableLabel(SimpleObjectProperty(node.legalIdentity.owningKey.toBase58String())).apply { minWidth = 400.0 }
} }
row("Services :") { label(node.advertisedServices.map { it.info }.joinToString(", ")) } 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 { setOnMouseClicked {

View File

@ -22,8 +22,8 @@ import net.corda.client.jfx.utils.*
import net.corda.core.contracts.Amount import net.corda.core.contracts.Amount
import net.corda.core.contracts.StateAndRef import net.corda.core.contracts.StateAndRef
import net.corda.core.contracts.withoutIssuer import net.corda.core.contracts.withoutIssuer
import net.corda.core.utilities.commonName
import net.corda.core.identity.AbstractParty import net.corda.core.identity.AbstractParty
import net.corda.core.utilities.commonName
import net.corda.explorer.formatters.AmountFormatter import net.corda.explorer.formatters.AmountFormatter
import net.corda.explorer.formatters.PartyNameFormatter import net.corda.explorer.formatters.PartyNameFormatter
import net.corda.explorer.identicon.identicon 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. * 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. * 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 * 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) 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. * Finally assemble the actual TreeTable Currency node.
*/ */
TreeItem(ViewerNode.CurrencyNode(sumAmount, equivSumAmount, memberStates)) TreeItem(ViewerNode.CurrencyNode(sumAmount, equivSumAmount, groupedMemberStates))
} }
/** /**