Skip to content

Commit 659a1c4

Browse files
medikentjt-nti
authored andcommitted
Squashed commit of the following:
commit 9f79d7f4dba3624c451fd9227240539a4626682f Author: Matthew B White <whitemat@uk.ibm.com> Date: Thu Jan 23 15:16:03 2020 +0000 [FABCJ-275] Fix coverage Correct perf tracing reset Add in coverage Signed-off-by: Matthew B White <whitemat@uk.ibm.com> commit ac29118 Author: medikent <kbull@mediciventures.com> Date: Tue Jan 21 17:16:43 2020 -0700 Correct typos in class names and descriptions Fix typos Signed-off-by: medikent <kbull@mediciventures.com> Signed-off-by: medikent <kbull@mediciventures.com>
1 parent 9cf1e6a commit 659a1c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+258
-126
lines changed

ci/azure-pipelines.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pool:
4545
vmImage: "ubuntu-latest"
4646

4747
# The stages and jobs, potential for rationalization and optimization
48-
# Keeping it simple and explict whilst we gain experience
48+
# Keeping it simple and explicit whilst we gain experience
4949
#
5050
stages:
5151
- stage: Build_and_test
@@ -71,6 +71,13 @@ stages:
7171
artifactName: checkstylereport
7272
displayName: 'Checkstyle'
7373
continueOnError: true
74+
- task: PublishBuildArtifacts@1
75+
condition: or(succeeded(), failed())
76+
inputs:
77+
pathToPublish: fabric-chaincode-shim/build/reports/jacoco/
78+
artifactName: coveragereport
79+
displayName: 'JaCoCo Coverage'
80+
continueOnError: true
7481
- task: PublishTestResults@2
7582
inputs:
7683
testResultsFormat: 'JUnit'
@@ -141,7 +148,7 @@ stages:
141148
git push https://$(GITHUB-PAT)@github.com/hyperledger/fabric-chaincode-java.git gh-pages
142149
displayName: 'Commit gh-pages changes'
143150
144-
# As the next script is more complex and uses loops, run this descretely in a sh file
151+
# As the next script is more complex and uses loops, run this discretely in a sh file
145152
# Publishing step for git tags
146153
- stage: Publish_tag
147154
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags'))

fabric-chaincode-integration-test/src/test/java/org/hyperleder/fabric/shim/integration/Command.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public Result run(boolean quiet) {
8484
*
8585
* @param is
8686
* @param stream
87-
* @return Completable Future with the array list of the stdout/sstderr
87+
* @return Completable Future with the array list of the stdout/stderr
8888
*/
8989
CompletableFuture<ArrayList<String>> readOutStream(InputStream is, PrintStream stream) {
9090
return CompletableFuture.supplyAsync(() -> {

fabric-chaincode-shim/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ jacocoTestCoverageVerification {
117117
'org.hyperledger.fabric.contract.routing.TransactionType',
118118
'org.hyperledger.fabric.contract.metadata.MetadataBuilder',
119119
'org.hyperledger.fabric.shim.ChaincodeBase*',
120-
'org.hyperledger.fabric.shim.impl.InnvocationTaskManager',
121-
'org.hyperledger.fabric.shim.impl.InnvocationStubImpl*',
120+
'org.hyperledger.fabric.shim.impl.InvocationTaskManager',
121+
'org.hyperledger.fabric.shim.impl.InvocationStubImpl*',
122122
'org.hyperledger.fabric.shim.impl.ChaincodeSupportClient*',
123-
'org.hyperledger.fabric.shim.impl.InnvocationTaskExecutor',
124-
'org.hyperledger.fabric.shim.impl.ChaincodeInnvocationTask',
123+
'org.hyperledger.fabric.shim.impl.InvocationTaskExecutor',
124+
'org.hyperledger.fabric.shim.impl.ChaincodeInvocationTask',
125125
'org.hyperledger.fabric.shim.impl.QueryResultsIteratorImpl*',
126126
'org.hyperledger.fabric.shim.impl.ChaincodeMessageFactory']
127127
limit {
@@ -139,8 +139,8 @@ jacocoTestCoverageVerification {
139139
'org.hyperledger.fabric.shim.impl.Handler',
140140
'org.hyperledger.fabric.shim.ChaincodeBase',
141141
'org.hyperledger.fabric.contract.metadata.MetadataBuilder',
142-
'org.hyperledger.fabric.shim.impl.InnvocationTaskManager',
143-
'org.hyperledger.fabric.shim.impl.InnvocationTaskExecutor',
142+
'org.hyperledger.fabric.shim.impl.InvocationTaskManager',
143+
'org.hyperledger.fabric.shim.impl.InvocationTaskExecutor',
144144
'org.hyperledger.fabric.shim.impl.ChaincodeSupportClient',
145145
'org.hyperledger.fabric.shim.impl.ChaincodeMessageFactory']
146146
limit {
@@ -352,4 +352,4 @@ tasks.withType(Test) {
352352
}
353353
}
354354
}
355-
}
355+
}

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/ContractInterface.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313
* All Contracts should implement this interface, in addition to the
1414
* {@linkplain org.hyperledger.fabric.contract.annotation.Contract} annotation.
1515
* <p>
16-
* All the of the methods on this is inteface have default implementations; for
16+
* All methods on this interface have default implementations; for
1717
* many contracts it may not be needed to sub-class these.
1818
* <p>
1919
* Each method on the Contract that is marked with the {@link Transaction}
2020
* annotation is considered a Transaction Function. This is eligible for
21-
* calling. Each transaction function is supplied with it's first parameter
22-
* being a {@link org.hyperledger.fabric.contract.Context} the other parameters
23-
* are at the developer's discretion.
21+
* calling. Each transaction function is supplied with its first parameter
22+
* being a {@link org.hyperledger.fabric.contract.Context}. The other parameters
23+
* are supplied at the developer's discretion.
2424
* <p>
2525
* The sequence of calls is
2626
*
2727
* <pre>
2828
* createContext() -&gt; beforeTransaction() -&gt; the transaction function -&gt; afterTransaction()
2929
* </pre>
3030
* <p>
31-
* If any of these functions throws an exception it is considered an error case,
31+
* If any of these functions throws an exception it is considered an error case
3232
* and the whole transaction is failed. The
3333
* {@link org.hyperledger.fabric.contract.Context} is a very important object as
3434
* it provides transactional context for access to current transaction id,
@@ -41,10 +41,10 @@
4141
* ThreadLocal Storage. Ledger data is stored via the ledger api available via
4242
* the {@link Context}.
4343
* <p>
44-
* If information needs to be passed from the
45-
* {@link #beforeTransaction(Context)}
44+
* If information needs to be passed from
45+
* {@link #beforeTransaction(Context)} to
4646
* {@link #afterTransaction(Context, Object)} or between separate transaction
47-
* functions when called directory, then a subclass of the {@link Context}
47+
* functions when called directly then a subclass of the {@link Context}
4848
* should be provided.
4949
*/
5050
public interface ContractInterface {
@@ -56,7 +56,7 @@ public interface ContractInterface {
5656
* overwritten by contract
5757
*
5858
* @param stub Instance of the ChaincodeStub to use for this transaction
59-
* @return instance of the context to use for the current transaciton being
59+
* @return instance of the context to use for the current transaction being
6060
* executed
6161
*/
6262
default Context createContext(final ChaincodeStub stub) {

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/annotation/Property.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* &#64;Property(schema = {"pattern", "^[a-zA-Z\\s]{0,15}$"})
2626
* private String text;
2727
*
28-
* // How friendly is this on a scale of 1-5, 1 being formal, 5 being familar
28+
* // How friendly is this on a scale of 1-5, 1 being formal, 5 being familiar
2929
* &#64;Property(schema = {"minimum", "1", "maximum", "5"})
3030
* private int friendliness = 1;
3131
*

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/execution/ExecutionFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static ExecutionFactory getInstance() {
2626

2727
/**
2828
* @param context Chaincode Context
29-
* @return Innvocation request
29+
* @return Invocation request
3030
*/
3131
public InvocationRequest createRequest(final ChaincodeStub context) {
3232
return new ContractInvocationRequest(context);

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/execution/InvocationRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import java.util.List;
1010

1111
/**
12-
* Innvocation Request.
12+
* Invocation Request.
1313
*
1414
* All information needed to find
1515
* {@link org.hyperledger.fabric.contract.annotation.Contract} and invoke the

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/execution/SerializerInterface.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
/**
1212
* This interface allows contract developers to change the serialization
13-
* mechanism. There are two scenaios where instances of DataTypes are
13+
* mechanism. There are two scenarios where instances of DataTypes are
1414
* serialized.
1515
*
1616
* When the objects are (logically) transferred from the Client application to
17-
* the Contract resulting in a transaction function being invoked. Typicaly this
17+
* the Contract resulting in a transaction function being invoked. Typically this
1818
* is JSON, hence a default JSON parser is provided.
1919
*
2020
* The JSONTransactionSerializer can be extended if needed

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/metadata/MetadataBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public static void addComponent(final DataTypeDefinition datatype) {
144144
* Adds a new contract to the metadata as represented by the class object.
145145
*
146146
* @param contractDefinition Class of the object to use as a contract
147-
* @return the key that the contract class is referred to in the meteadata
147+
* @return the key that the contract class is referred to in the metadata
148148
*/
149149
@SuppressWarnings("serial")
150150
public static String addContract(final ContractDefinition contractDefinition) {

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/metadata/TypeSchema.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public Class<?> getTypeClass(final TypeRegistry typeRegistry) {
148148
clz = long.class;
149149
break;
150150
default:
151-
throw new RuntimeException("Unkown format for integer of " + format);
151+
throw new RuntimeException("Unknown format for integer of " + format);
152152
}
153153
} else if (type.contentEquals("number")) {
154154
// need to check the format
@@ -161,7 +161,7 @@ public Class<?> getTypeClass(final TypeRegistry typeRegistry) {
161161
clz = float.class;
162162
break;
163163
default:
164-
throw new RuntimeException("Unkown format for number of " + format);
164+
throw new RuntimeException("Unknown format for number of " + format);
165165
}
166166
} else if (type.contentEquals("boolean")) {
167167
clz = boolean.class;

0 commit comments

Comments
 (0)