Skip to content

Commit d0447b7

Browse files
Replace checkstyle with PMD
Update Java language version to 11, which has been the target runtime and documented as the required version since v2.1. Signed-off-by: Mark S. Lewis <[email protected]>
1 parent d5aa6c5 commit d0447b7

File tree

94 files changed

+1164
-1274
lines changed

Some content is hidden

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

94 files changed

+1164
-1274
lines changed

build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ subprojects {
5050
version = rootProject.version
5151

5252
java {
53-
sourceCompatibility = JavaVersion.VERSION_1_8
53+
sourceCompatibility = JavaVersion.VERSION_11
54+
targetCompatibility = JavaVersion.VERSION_11
5455
}
5556

5657
compileJava {
5758
if (javaCompiler.get().metadata.languageVersion.canCompileOrRun(10)) {
58-
options.release = 8
59+
options.release = 11
5960
}
6061
}
6162

ci/checkstyle/checkstyle.xml

Lines changed: 0 additions & 108 deletions
This file was deleted.

ci/checkstyle/java-copyright-header.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

fabric-chaincode-docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ RUN gradle \
4040
fabric-chaincode-shim:publishToMavenLocal \
4141
-x javadoc \
4242
-x test \
43-
-x checkstyleMain \
44-
-x checkstyleTest
43+
-x pmdMain \
44+
-x pmdTest
4545

4646
WORKDIR /root/chaincode-java
4747
# Run the Gradle and Maven commands to generate the wrapper variants

fabric-chaincode-integration-test/src/contracts/bare-gradle/build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ group 'org.hyperledger.fabric-chaincode-java'
77
version '1.0-SNAPSHOT'
88

99
java {
10-
sourceCompatibility = JavaVersion.VERSION_1_8
10+
sourceCompatibility = JavaVersion.VERSION_11
11+
targetCompatibility = JavaVersion.VERSION_11
12+
}
13+
14+
compileJava {
15+
if (javaCompiler.get().metadata.languageVersion.canCompileOrRun(10)) {
16+
options.release = 11
17+
}
1118
}
1219

1320
repositories {

fabric-chaincode-integration-test/src/contracts/bare-maven/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<properties>
88

99
<!-- Generic properties -->
10-
<java.version>8</java.version>
10+
<java.version>11</java.version>
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1212
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1313

fabric-chaincode-integration-test/src/contracts/fabric-ledger-api/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ group 'org.hyperledger.fabric-chaincode-java'
77
version '1.0-SNAPSHOT'
88

99
java {
10-
sourceCompatibility = JavaVersion.VERSION_1_8
10+
sourceCompatibility = JavaVersion.VERSION_11
11+
targetCompatibility = JavaVersion.VERSION_11
1112
}
1213

1314
compileJava {
1415
if (javaCompiler.get().metadata.languageVersion.canCompileOrRun(10)) {
15-
options.release = 8
16+
options.release = 11
1617
}
1718
}
1819

fabric-chaincode-integration-test/src/contracts/fabric-shim-api/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ group 'org.hyperledger.fabric-chaincode-java'
77
version '1.0-SNAPSHOT'
88

99
java {
10-
sourceCompatibility = JavaVersion.VERSION_1_8
10+
sourceCompatibility = JavaVersion.VERSION_11
11+
targetCompatibility = JavaVersion.VERSION_11
1112
}
1213

1314
compileJava {
1415
if (javaCompiler.get().metadata.languageVersion.canCompileOrRun(10)) {
15-
options.release = 8
16+
options.release = 11
1617
}
1718
}
1819

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static void setUp() throws Exception {
2222
}
2323

2424
@Test
25-
public void TestInstall() {
25+
public void testInstall() {
2626

2727
InvokeHelper helper = InvokeHelper.newHelper("baregradlecc", "sachannel");
2828
String text = helper.invoke("org1", "whoami");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static void setUp() throws Exception {
2323
}
2424

2525
@Test
26-
public void TestLedgers() {
26+
public void testLedgers() {
2727
InvokeHelper helper = InvokeHelper.newHelper("ledgercc", "sachannel");
2828

2929
String text = helper.invoke("org1", "accessLedgers");

0 commit comments

Comments
 (0)