diff --git a/src/main/java/org/hyperledger/fabric/sdk/ChaincodeEndorsementPolicy.java b/src/main/java/org/hyperledger/fabric/sdk/ChaincodeEndorsementPolicy.java index 9705b5ea..a7f45802 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/ChaincodeEndorsementPolicy.java +++ b/src/main/java/org/hyperledger/fabric/sdk/ChaincodeEndorsementPolicy.java @@ -95,7 +95,7 @@ private static SignaturePolicy parsePolicy(IndexedHashMap throw new ChaincodeEndorsementPolicyParseException(format("%s expected to have list but found %s.", key, String.valueOf(vo))); } - @SuppressWarnings("unchecked") final List> voList = (List>) vo; + @SuppressWarnings ("unchecked") final List> voList = (List>) vo; if (voList.size() < matchNo) { diff --git a/src/main/java/org/hyperledger/fabric/sdk/ChaincodeID.java b/src/main/java/org/hyperledger/fabric/sdk/ChaincodeID.java index 020a62cb..5370dd74 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/ChaincodeID.java +++ b/src/main/java/org/hyperledger/fabric/sdk/ChaincodeID.java @@ -74,7 +74,6 @@ public Builder setVersion(String version) { return this; } - /** * Set path of chaincode * @@ -82,7 +81,6 @@ public Builder setVersion(String version) { * @return Builder */ - public Builder setPath(String path) { this.protoBuilder.setPath(path); return this; @@ -94,7 +92,7 @@ public ChaincodeID build() { } /** - * Chaincode builder + * Chaincode builder * * @return ChaincodeID builder. */ @@ -103,5 +101,4 @@ public static Builder newBuilder() { return new Builder(); } - } diff --git a/src/main/java/org/hyperledger/fabric/sdk/ChaincodeInputDeserializer.java b/src/main/java/org/hyperledger/fabric/sdk/ChaincodeInputDeserializer.java index 96ed1cc4..d99099ec 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/ChaincodeInputDeserializer.java +++ b/src/main/java/org/hyperledger/fabric/sdk/ChaincodeInputDeserializer.java @@ -29,7 +29,7 @@ class ChaincodeInputDeserializer { ChaincodeInputDeserializer(ChaincodeInput chaincodeInput) { this.byteString = chaincodeInput.toByteString(); - this.chaincodeInput = new WeakReference<>(chaincodeInput); + this.chaincodeInput = new WeakReference<>(chaincodeInput); } ChaincodeInput getChaincodeInput() { diff --git a/src/main/java/org/hyperledger/fabric/sdk/ChaincodeInvocationSpecDeserializer.java b/src/main/java/org/hyperledger/fabric/sdk/ChaincodeInvocationSpecDeserializer.java index 7512cd02..d33ada36 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/ChaincodeInvocationSpecDeserializer.java +++ b/src/main/java/org/hyperledger/fabric/sdk/ChaincodeInvocationSpecDeserializer.java @@ -23,7 +23,6 @@ import org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec; import org.hyperledger.fabric.sdk.exception.InvalidProtocolBufferRuntimeException; - class ChaincodeInvocationSpecDeserializer { private final ByteString byteString; private WeakReference invocationSpec; @@ -55,6 +54,7 @@ ChaincodeInvocationSpec getChaincodeInvocationSpec() { return ret; } + ChaincodeInputDeserializer getChaincodeInput() { ChaincodeInputDeserializer ret = null; diff --git a/src/main/java/org/hyperledger/fabric/sdk/ChaincodeResponse.java b/src/main/java/org/hyperledger/fabric/sdk/ChaincodeResponse.java index e40c845f..74e5e403 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/ChaincodeResponse.java +++ b/src/main/java/org/hyperledger/fabric/sdk/ChaincodeResponse.java @@ -44,15 +44,15 @@ public ChaincodeResponse(String transactionID, String chaincodeID, Status status public ChaincodeResponse(String transactionID, String chaincodeID, int istatus, String message) { switch (istatus) { - case 200: - this.status = Status.SUCCESS; - break; - case 500: - this.status = Status.FAILURE; - break; - default: - this.status = Status.UNDEFINED; - break; + case 200: + this.status = Status.SUCCESS; + break; + case 500: + this.status = Status.FAILURE; + break; + default: + this.status = Status.UNDEFINED; + break; } this.message = message; this.transactionID = transactionID; diff --git a/src/main/java/org/hyperledger/fabric/sdk/Channel.java b/src/main/java/org/hyperledger/fabric/sdk/Channel.java index 0093243f..a1d6c462 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/Channel.java +++ b/src/main/java/org/hyperledger/fabric/sdk/Channel.java @@ -152,7 +152,6 @@ public Collection getEventHubs() { private Block genesisBlock; private final boolean systemChannel; - private Channel(String name, HFClient hfClient, Orderer orderer, ChannelConfiguration channelConfiguration, byte[][] signers) throws InvalidArgumentException, TransactionException { this(name, hfClient, false); diff --git a/src/main/java/org/hyperledger/fabric/sdk/EnvelopeDeserializer.java b/src/main/java/org/hyperledger/fabric/sdk/EnvelopeDeserializer.java index 39344a40..0bbaf56e 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/EnvelopeDeserializer.java +++ b/src/main/java/org/hyperledger/fabric/sdk/EnvelopeDeserializer.java @@ -92,13 +92,11 @@ int getType() { return type; } - /** * @return whether this Transaction is marked as TxValidationCode.VALID */ public boolean isValid() { - return validcode == FabricTransaction.TxValidationCode.VALID_VALUE; } @@ -110,7 +108,6 @@ public byte validationCode() { return validcode; } - static EnvelopeDeserializer newInstance(ByteString byteString, byte b) throws InvalidProtocolBufferException { EnvelopeDeserializer ret; diff --git a/src/main/java/org/hyperledger/fabric/sdk/InstallProposalRequest.java b/src/main/java/org/hyperledger/fabric/sdk/InstallProposalRequest.java index c80f4389..e9c28a49 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/InstallProposalRequest.java +++ b/src/main/java/org/hyperledger/fabric/sdk/InstallProposalRequest.java @@ -58,6 +58,7 @@ public File getChaincodeSourceLocation() { /** * The location of the chaincode. + * * @param chaincodeSourceLocation * @throws InvalidArgumentException */ diff --git a/src/main/java/org/hyperledger/fabric/sdk/Orderer.java b/src/main/java/org/hyperledger/fabric/sdk/Orderer.java index eca59279..c2121265 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/Orderer.java +++ b/src/main/java/org/hyperledger/fabric/sdk/Orderer.java @@ -121,7 +121,6 @@ Ab.BroadcastResponse sendTransaction(Common.Envelope transaction) throws Excepti logger.debug(format("Order.sendTransaction name: %s, url: %s", name, url)); - OrdererClient localOrdererClient = ordererClient; if (localOrdererClient == null || !localOrdererClient.isChannelActive()) { diff --git a/src/main/java/org/hyperledger/fabric/sdk/TransactionInfo.java b/src/main/java/org/hyperledger/fabric/sdk/TransactionInfo.java index a47f8d8d..ba0da97d 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/TransactionInfo.java +++ b/src/main/java/org/hyperledger/fabric/sdk/TransactionInfo.java @@ -19,7 +19,6 @@ /** * TransactionInfo contains the data from a {@link ProcessedTransaction} message - * */ public class TransactionInfo { private final String txID; diff --git a/src/main/java/org/hyperledger/fabric/sdk/TransactionPayloadDeserializer.java b/src/main/java/org/hyperledger/fabric/sdk/TransactionPayloadDeserializer.java index 4e3ecb7b..c5c848d1 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/TransactionPayloadDeserializer.java +++ b/src/main/java/org/hyperledger/fabric/sdk/TransactionPayloadDeserializer.java @@ -20,7 +20,7 @@ import com.google.protobuf.ByteString; -class TransactionPayloadDeserializer extends PayloadDeserializer { +class TransactionPayloadDeserializer extends PayloadDeserializer { private WeakReference transactionDeserialize; @@ -31,7 +31,6 @@ class TransactionPayloadDeserializer extends PayloadDeserializer { TransactionDeserializer getTransaction() { - TransactionDeserializer ret = null; if (transactionDeserialize != null) { diff --git a/src/main/java/org/hyperledger/fabric/sdk/TransactionRequest.java b/src/main/java/org/hyperledger/fabric/sdk/TransactionRequest.java index 292a8e7d..0851d3a6 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/TransactionRequest.java +++ b/src/main/java/org/hyperledger/fabric/sdk/TransactionRequest.java @@ -60,7 +60,6 @@ public class TransactionRequest { /** * The user context to use on this request. * - * * @return User context that is used for signing */ User getUserContext() { diff --git a/src/main/java/org/hyperledger/fabric/sdk/exception/ChaincodeEndorsementPolicyParseException.java b/src/main/java/org/hyperledger/fabric/sdk/exception/ChaincodeEndorsementPolicyParseException.java index b38c0654..726bbf16 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/exception/ChaincodeEndorsementPolicyParseException.java +++ b/src/main/java/org/hyperledger/fabric/sdk/exception/ChaincodeEndorsementPolicyParseException.java @@ -12,10 +12,8 @@ * limitations under the License. */ - package org.hyperledger.fabric.sdk.exception; - public class ChaincodeEndorsementPolicyParseException extends BaseException { public ChaincodeEndorsementPolicyParseException(String message) { super(message); diff --git a/src/main/java/org/hyperledger/fabric/sdk/exception/InvalidArgumentException.java b/src/main/java/org/hyperledger/fabric/sdk/exception/InvalidArgumentException.java index 6c19a7d5..f8e63eef 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/exception/InvalidArgumentException.java +++ b/src/main/java/org/hyperledger/fabric/sdk/exception/InvalidArgumentException.java @@ -23,6 +23,7 @@ public class InvalidArgumentException extends BaseException { public InvalidArgumentException(String message, Exception parent) { super(message, parent); } + public InvalidArgumentException(String message) { super(message); } diff --git a/src/main/java/org/hyperledger/fabric/sdk/exception/InvokeException.java b/src/main/java/org/hyperledger/fabric/sdk/exception/InvokeException.java index 31bd0114..518373d6 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/exception/InvokeException.java +++ b/src/main/java/org/hyperledger/fabric/sdk/exception/InvokeException.java @@ -17,6 +17,7 @@ public class InvokeException extends RuntimeException { private static final long serialVersionUID = 1L; + public InvokeException(String message, Exception parent) { super(message, parent); } diff --git a/src/main/java/org/hyperledger/fabric/sdk/exception/TransactionEventException.java b/src/main/java/org/hyperledger/fabric/sdk/exception/TransactionEventException.java index 498121b2..68914a85 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/exception/TransactionEventException.java +++ b/src/main/java/org/hyperledger/fabric/sdk/exception/TransactionEventException.java @@ -17,7 +17,6 @@ /** * The exception to be thrown when we receive an event for an invalid Transaction - * */ public class TransactionEventException extends TransactionException { @@ -27,6 +26,7 @@ public class TransactionEventException extends TransactionException { /** * save the TransactionEvent in the exception so that caller can use for debugging + * * @param message * @param transactionEvent */ @@ -37,6 +37,7 @@ public TransactionEventException(String message, TransactionEvent transactionEve /** * save the TransactionEvent in the exception so that caller can use for debugging + * * @param message * @param transactionEvent * @param throwable diff --git a/src/main/java/org/hyperledger/fabric/sdk/exception/TransactionException.java b/src/main/java/org/hyperledger/fabric/sdk/exception/TransactionException.java index b6c46a10..d15d1fb0 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/exception/TransactionException.java +++ b/src/main/java/org/hyperledger/fabric/sdk/exception/TransactionException.java @@ -25,6 +25,7 @@ public TransactionException(String message, Throwable parent) { public TransactionException(String message) { super(message); } + public TransactionException(Throwable t) { super(t); } diff --git a/src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java b/src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java index 4df9e6ec..0f7c00e7 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java +++ b/src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java @@ -129,7 +129,7 @@ public static String generateDirectoryHash(String rootDir, String chaincodeDir, * Compress the contents of given directory using Tar and Gzip to an in-memory byte array. * * @param sourceDirectory the source directory. - * @param pathPrefix a path to be prepended to every file name in the .tar.gz output, or {@code null} if no prefix is required. + * @param pathPrefix a path to be prepended to every file name in the .tar.gz output, or {@code null} if no prefix is required. * @return the compressed directory contents. * @throws IOException */ @@ -322,7 +322,6 @@ public static boolean isNullOrEmpty(String url) { return url == null || url.isEmpty(); } - /** * Makes logging strings which can be long or with unprintable characters be logged and trimmed. * @@ -344,7 +343,6 @@ public static String logString(final String string) { private static final int NONONCE_LENGTH = 24; - private static final SecureRandom RANDOM = new SecureRandom(); public static byte[] generateNonce() { @@ -355,8 +353,6 @@ public static byte[] generateNonce() { return values; } - - public static String toHexString(ByteString byteString) { if (byteString == null) { return null; @@ -378,6 +374,7 @@ public static String toHexString(byte[] bytes) { /** * Private constructor to prevent instantiation. */ - private Utils() { } + private Utils() { + } } diff --git a/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java b/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java index 34d3751e..fa7466de 100755 --- a/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java +++ b/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java @@ -824,9 +824,9 @@ public byte[] certificateToDER(String certricatePEM) { return pemObject.getContent(); } catch (IOException e) { - // best attempt + // best attempt } - return null; + return null; } diff --git a/src/main/java/org/hyperledger/fabric/sdk/transaction/CSCCProposalBuilder.java b/src/main/java/org/hyperledger/fabric/sdk/transaction/CSCCProposalBuilder.java index 5a6cb6e8..5b97d6d9 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/transaction/CSCCProposalBuilder.java +++ b/src/main/java/org/hyperledger/fabric/sdk/transaction/CSCCProposalBuilder.java @@ -20,7 +20,6 @@ import static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type.GOLANG; - public class CSCCProposalBuilder extends ProposalBuilder { private static final String CSCC_CHAIN_NAME = "cscc"; private static final Chaincode.ChaincodeID CHAINCODE_ID_CSCC = diff --git a/src/main/java/org/hyperledger/fabric/sdk/transaction/JoinPeerProposalBuilder.java b/src/main/java/org/hyperledger/fabric/sdk/transaction/JoinPeerProposalBuilder.java index 5fa3dc34..f5f0fb19 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/transaction/JoinPeerProposalBuilder.java +++ b/src/main/java/org/hyperledger/fabric/sdk/transaction/JoinPeerProposalBuilder.java @@ -14,7 +14,6 @@ package org.hyperledger.fabric.sdk.transaction; - import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; @@ -28,7 +27,6 @@ public class JoinPeerProposalBuilder extends CSCCProposalBuilder { private static final Log logger = LogFactory.getLog(JoinPeerProposalBuilder.class); - public JoinPeerProposalBuilder genesisBlock(Block genesisBlock) throws ProposalException { if (genesisBlock == null) { @@ -51,13 +49,12 @@ private JoinPeerProposalBuilder() { @Override public JoinPeerProposalBuilder context(TransactionContext context) { super.context(context); - return this; + return this; } public static JoinPeerProposalBuilder newBuilder() { return new JoinPeerProposalBuilder(); } - } diff --git a/src/main/java/org/hyperledger/fabric/sdk/transaction/LSCCProposalBuilder.java b/src/main/java/org/hyperledger/fabric/sdk/transaction/LSCCProposalBuilder.java index d9a4bfd9..75adb366 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/transaction/LSCCProposalBuilder.java +++ b/src/main/java/org/hyperledger/fabric/sdk/transaction/LSCCProposalBuilder.java @@ -19,7 +19,6 @@ import static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type.GOLANG; - public class LSCCProposalBuilder extends ProposalBuilder { private static final String LSCC_CHAIN_NAME = "lscc"; private static final Chaincode.ChaincodeID CHAINCODE_ID_LSCC = diff --git a/src/main/java/org/hyperledger/fabric/sdk/transaction/QueryInstantiatedChaincodesBuilder.java b/src/main/java/org/hyperledger/fabric/sdk/transaction/QueryInstantiatedChaincodesBuilder.java index e5b789c7..04d79841 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/transaction/QueryInstantiatedChaincodesBuilder.java +++ b/src/main/java/org/hyperledger/fabric/sdk/transaction/QueryInstantiatedChaincodesBuilder.java @@ -14,7 +14,6 @@ package org.hyperledger.fabric.sdk.transaction; - import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; @@ -23,7 +22,6 @@ public class QueryInstantiatedChaincodesBuilder extends LSCCProposalBuilder { - private QueryInstantiatedChaincodesBuilder() { List argList = new ArrayList<>(); @@ -42,6 +40,5 @@ public static QueryInstantiatedChaincodesBuilder newBuilder() { return new QueryInstantiatedChaincodesBuilder(); } - } diff --git a/src/main/java/org/hyperledger/fabric/sdk/transaction/TransactionContext.java b/src/main/java/org/hyperledger/fabric/sdk/transaction/TransactionContext.java index 3c6c65ca..10ba5fa7 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/transaction/TransactionContext.java +++ b/src/main/java/org/hyperledger/fabric/sdk/transaction/TransactionContext.java @@ -38,7 +38,7 @@ */ public class TransactionContext { private static final Config config = Config.getConfig(); -// private static final Log logger = LogFactory.getLog(TransactionContext.class); + // private static final Log logger = LogFactory.getLog(TransactionContext.class); //TODO right now the server does not care need to figure out private final ByteString nonce = ByteString.copyFrom(Utils.generateNonce()); @@ -111,6 +111,7 @@ public Channel getChannel() { /** * Get the attribute names associated with this transaction context. + * * @return the attributes. */ public List getAttrs() { @@ -119,6 +120,7 @@ public List getAttrs() { /** * Set the attributes for this transaction context. + * * @param attrs the attributes. */ public void setAttrs(List attrs) { diff --git a/src/main/java/org/hyperledger/fabric/sdk/transaction/UpgradeProposalBuilder.java b/src/main/java/org/hyperledger/fabric/sdk/transaction/UpgradeProposalBuilder.java index e57d4356..a14265fb 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/transaction/UpgradeProposalBuilder.java +++ b/src/main/java/org/hyperledger/fabric/sdk/transaction/UpgradeProposalBuilder.java @@ -16,10 +16,8 @@ public class UpgradeProposalBuilder extends InstantiateProposalBuilder { - // private final static Log logger = LogFactory.getLog(UpgradeProposalBuilder.class); - private UpgradeProposalBuilder() { super(); action = "upgrade"; diff --git a/src/main/java/org/hyperledger/fabric_ca/sdk/EnrollmentRequest.java b/src/main/java/org/hyperledger/fabric_ca/sdk/EnrollmentRequest.java index 7a790590..ce392616 100644 --- a/src/main/java/org/hyperledger/fabric_ca/sdk/EnrollmentRequest.java +++ b/src/main/java/org/hyperledger/fabric_ca/sdk/EnrollmentRequest.java @@ -46,6 +46,7 @@ public class EnrollmentRequest { /** * The certificate signing request if it's not supplied it will be generated. + * * @param csr */ @@ -71,7 +72,7 @@ String getCsr() { * * @param profile * @param label - * @param keypair Keypair used to sign or create the certificate if needed. + * @param keypair Keypair used to sign or create the certificate if needed. */ public EnrollmentRequest(String profile, String label, KeyPair keypair) { this.csr = null; @@ -92,6 +93,7 @@ KeyPair getKeyPair() { /** * The Key pair to create the signing certificate if not supplied it will be generated. + * * @param keypair */ public void setKeyPair(KeyPair keypair) { diff --git a/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java b/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java index b1177ba0..cb2a1176 100644 --- a/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java +++ b/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java @@ -22,7 +22,6 @@ import java.net.MalformedURLException; import java.net.Socket; import java.net.URL; -import java.net.UnknownHostException; import java.nio.charset.StandardCharsets; import java.security.KeyManagementException; import java.security.KeyPair; @@ -721,7 +720,7 @@ public X509Certificate[] getAcceptedIssuers() { } @Override - public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException, UnknownHostException { + public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException { return sslContext.getSocketFactory().createSocket(socket, host, port, autoClose); } diff --git a/src/main/java/org/hyperledger/fabric_ca/sdk/exception/EnrollmentException.java b/src/main/java/org/hyperledger/fabric_ca/sdk/exception/EnrollmentException.java index 7ccdcbbd..1824c129 100644 --- a/src/main/java/org/hyperledger/fabric_ca/sdk/exception/EnrollmentException.java +++ b/src/main/java/org/hyperledger/fabric_ca/sdk/exception/EnrollmentException.java @@ -14,7 +14,6 @@ package org.hyperledger.fabric_ca.sdk.exception; - public class EnrollmentException extends BaseException { private static final long serialVersionUID = 1L; diff --git a/src/main/java/org/hyperledger/fabric_ca/sdk/exception/InvalidArgumentException.java b/src/main/java/org/hyperledger/fabric_ca/sdk/exception/InvalidArgumentException.java index 6e01caf0..cd004519 100644 --- a/src/main/java/org/hyperledger/fabric_ca/sdk/exception/InvalidArgumentException.java +++ b/src/main/java/org/hyperledger/fabric_ca/sdk/exception/InvalidArgumentException.java @@ -23,6 +23,7 @@ public class InvalidArgumentException extends BaseException { public InvalidArgumentException(String message, Exception parent) { super(message, parent); } + public InvalidArgumentException(String message) { super(message); } diff --git a/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java b/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java index ef56f9c7..a49b7427 100644 --- a/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java +++ b/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java @@ -183,7 +183,7 @@ void runChannel(HFClient client, Channel channel, SampleOrg sampleOrg, final int try { // final boolean changeContext = false; // BAR_CHANNEL_NAME.equals(channel.getName()) ? true : false; - final boolean changeContext = BAR_CHANNEL_NAME.equals(channel.getName()) ? true : false; + final boolean changeContext = BAR_CHANNEL_NAME.equals(channel.getName()); out("Running Channel %s with a delta %d", channelName, delta); channel.setTransactionWaitTime(testConfig.getTransactionWaitTime()); diff --git a/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java b/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java index 9cbeca02..c708d930 100644 --- a/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java +++ b/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java @@ -16,7 +16,6 @@ import java.io.File; import java.io.IOException; -import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.nio.file.Paths; import java.util.Collection; @@ -27,7 +26,6 @@ import java.util.Set; import java.util.concurrent.TimeUnit; -import com.google.protobuf.InvalidProtocolBufferException; import org.apache.commons.codec.binary.Hex; import org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset; import org.hyperledger.fabric.sdk.BlockEvent; @@ -661,7 +659,7 @@ File findFileSk(File directory) { TX_EXPECTED.put("writeset1", "Missing writeset for channel bar block 1"); } - void blockWalker(Channel channel) throws InvalidProtocolBufferException, InvalidArgumentException, ProposalException, UnsupportedEncodingException, IOException { + void blockWalker(Channel channel) throws InvalidArgumentException, ProposalException, IOException { try { BlockchainInfo channelInfo = channel.queryBlockchainInfo();