Skip to content

Commit

Permalink
style: Sonar smells
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Roberts <ryan@blockchaintp.com>
  • Loading branch information
ryan-s-roberts committed Jul 29, 2021
1 parent cf65b5c commit 9779ce3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public CoercingTxLog(final Function<K2, K1> theKeyCoercionFrom, final Function<V

@Override
public Observable<Map.Entry<K1, V1>> from(final Optional<I1> offset) {
return inner.from(offset.map(x -> seqCoercionTo.apply(x)))
return inner.from(offset.map(seqCoercionTo::apply))
.map(r -> Map.entry(keyCoercionFrom.apply(r.getKey()), valueCoercionFrom.apply(r.getValue())));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public SplitTransactionLog(final TransactionLog<UUID, ByteString, Long> txlog, f
public Observable<Map.Entry<UUID, ByteString>> from(final Optional<Long> offset) {
return txLog.from(offset).map(r -> {
var s3Key = Key.of(DatatypeConverter.printHexBinary(r.getValue().toByteArray()));
var withS3data = blobs.get(s3Key).map(v -> Map.entry(r.getKey(), v.map(x -> ByteString.copyFrom(x)).toNative()));
var withS3data = blobs.get(s3Key).map(v -> Map.entry(r.getKey(), v.map(ByteString::copyFrom).toNative()));

/// If we are missing underlying s3 data then this is a serious problem
if (withS3data.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
*/
package com.blockchaintp.daml.stores.layers;

import com.blockchaintp.daml.stores.exception.StoreReadException;
import com.blockchaintp.daml.stores.exception.StoreException;

/**
* An exception on a split store operation.
*/
public final class SpltStoreException extends StoreReadException {
public final class SpltStoreException extends StoreException {

private SpltStoreException(final String message) {
super(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.Map;
import java.util.Optional;

public class SplitTransactionLogTest {
class SplitTransactionLogTest {

@Test
void commit_writes_records() throws StoreWriteException, StoreReadException {
Expand Down

0 comments on commit 9779ce3

Please sign in to comment.