Skip to content

Commit 1ede8ad

Browse files
committed
minor code formatting
1 parent f4c9814 commit 1ede8ad

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/main/java/prof7bit/bitcoin/wallettool/fileformats/WalletDatHandler.xtend

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,11 @@ class WalletDat {
233233
}
234234

235235
private def readString(ByteBuffer buf) {
236-
return new String(buf.readSizePrefixedByteArray)
236+
new String(buf.readSizePrefixedByteArray)
237237
}
238238

239239
private def readSizePrefixedByteArray(ByteBuffer buf){
240-
val size = buf.readCompactSize
241-
return buf.readByteArray(size)
240+
buf.readByteArray(buf.readCompactSize)
242241
}
243242

244243
private def readByteArray(ByteBuffer buf, int size){
@@ -518,7 +517,7 @@ class WalletDatRawKeyDataList {
518517

519518
def findOrAddNew(byte[] pub){
520519
var key = getKeyData(pub)
521-
if (key === null){
520+
if (key == null){
522521
key = new WalletDatRawKeyData
523522
key.public_key = pub
524523
keyData.put(ByteBuffer.wrap(pub), key)
@@ -539,7 +538,7 @@ class WalletDatRawKeyDataList {
539538
}
540539

541540
def getKeyData(byte[] pub){
542-
return keyData.get(ByteBuffer.wrap(pub))
541+
keyData.get(ByteBuffer.wrap(pub))
543542
}
544543

545544
def addEncrypted(byte[] pub, byte[] encrypted){

0 commit comments

Comments
 (0)