Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Commit 2080902

Browse files
committed
FABJ-401 Update dependencies
Change-Id: I13237f83ec910fe0fb599a46bab8221cf25b7fdb Signed-off-by: rickr <cr22rc@gmail.com>
1 parent a2140f9 commit 2080902

File tree

2 files changed

+44
-30
lines changed

2 files changed

+44
-30
lines changed

pom.xml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@
2828
<tag>fabric-sdk-java-1.0</tag>
2929
</scm>
3030
<properties>
31-
<grpc.version>1.17.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
31+
<grpc.version>1.18.0</grpc.version><!-- CURRENT_GRPC_VERSION -->
3232
<protobuf.version>3.6.1</protobuf.version>
3333
<bouncycastle.version>1.60</bouncycastle.version>
3434
<httpclient.version>4.5.6</httpclient.version>
35+
<javadoc.version>3.0.1</javadoc.version>
3536
<skipITs>true</skipITs>
3637
<alpn-boot-version>8.1.7.v20160121</alpn-boot-version>
3738
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38-
<jacoco.version>0.7.9</jacoco.version>
39+
<jacoco.version>0.8.2</jacoco.version>
3940
<log4j.version>1.2.17</log4j.version>
4041
<org.hyperledger.fabric.sdktest.ITSuite>IntegrationSuite.java</org.hyperledger.fabric.sdktest.ITSuite>
4142
<gpg.executable>gpg2</gpg.executable>
@@ -234,14 +235,14 @@
234235
<extension>
235236
<groupId>kr.motd.maven</groupId>
236237
<artifactId>os-maven-plugin</artifactId>
237-
<version>1.4.1.Final</version>
238+
<version>1.6.1</version>
238239
</extension>
239240
</extensions>
240241
<plugins>
241242
<plugin>
242243
<groupId>org.apache.maven.plugins</groupId>
243244
<artifactId>maven-surefire-plugin</artifactId>
244-
<version>2.19.1</version>
245+
<version>3.0.0-M3</version>
245246
<configuration>
246247
<argLine>${surefireArgLine}</argLine>
247248
<includes>
@@ -253,7 +254,7 @@
253254
<plugin>
254255
<groupId>org.apache.maven.plugins</groupId>
255256
<artifactId>maven-failsafe-plugin</artifactId>
256-
<version>2.19.1</version>
257+
<version>3.0.0-M3</version>
257258
<configuration>
258259
<argLine>${failsafeArgLine}</argLine>
259260
<includes>
@@ -303,7 +304,7 @@
303304
<plugin>
304305
<groupId>org.apache.maven.plugins</groupId>
305306
<artifactId>maven-compiler-plugin</artifactId>
306-
<version>3.3</version>
307+
<version>3.8.0</version>
307308
<configuration>
308309
<source>1.8</source>
309310
<target>1.8</target>
@@ -312,7 +313,7 @@
312313
<plugin>
313314
<groupId>org.apache.maven.plugins</groupId>
314315
<artifactId>maven-javadoc-plugin</artifactId>
315-
<version>2.10.4</version>
316+
<version>${javadoc.version}</version>
316317
<configuration>
317318
<excludePackageNames>
318319
org.hyperledger.fabric_ca.sdk.helper:org.hyperledger.fabric.protos.*:org.hyperledger.fabric.sdk.helper:org.hyperledger.fabric.sdk.transaction:org.hyperledger.fabric.sdk.security:org.hyperledger.fabric.sdk.idemix
@@ -326,7 +327,7 @@
326327
<plugin>
327328
<groupId>org.apache.maven.plugins</groupId>
328329
<artifactId>maven-checkstyle-plugin</artifactId>
329-
<version>2.17</version>
330+
<version>3.0.0</version>
330331
<executions>
331332
<execution>
332333
<goals>
@@ -339,7 +340,11 @@
339340
<logViolationsToConsole>true</logViolationsToConsole>
340341
<failOnViolation>true</failOnViolation>
341342
<failsOnError>true</failsOnError>
342-
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
343+
<!--<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>-->
344+
<sourceDirectories>
345+
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
346+
</sourceDirectories>
347+
343348
<configLocation>checkstyle-config.xml</configLocation>
344349
<includeTestSourceDirectory>true</includeTestSourceDirectory>
345350
</configuration>
@@ -479,7 +484,7 @@
479484
<plugin>
480485
<groupId>org.apache.maven.plugins</groupId>
481486
<artifactId>maven-antrun-plugin</artifactId>
482-
<version>1.4</version>
487+
<version>1.8</version>
483488
<executions>
484489
<execution>
485490
<phase>generate-test-resources</phase>
@@ -498,7 +503,7 @@
498503
<plugin>
499504
<groupId>pl.project13.maven</groupId>
500505
<artifactId>git-commit-id-plugin</artifactId>
501-
<version>2.2.2</version>
506+
<version>2.2.6</version>
502507
<executions>
503508
<execution>
504509
<id>get-the-git-infos</id>
@@ -539,12 +544,13 @@
539544
<profiles>
540545
<profile>
541546
<id>owasp</id>
547+
<!-- RUN with mvn -P owasp verify -->
542548
<build>
543549
<plugins>
544550
<plugin>
545551
<groupId>org.owasp</groupId>
546552
<artifactId>dependency-check-maven</artifactId>
547-
<version>3.2.0</version>
553+
<version>4.0.2</version>
548554
<executions>
549555
<execution>
550556
<goals>
@@ -565,7 +571,7 @@
565571
<plugin>
566572
<groupId>org.sonatype.plugins</groupId>
567573
<artifactId>nexus-staging-maven-plugin</artifactId>
568-
<version>1.6.7</version>
574+
<version>1.6.8</version> <!-- was 1.6.7 -->
569575
<extensions>true</extensions>
570576
<configuration>
571577
<serverId>ossrh</serverId>
@@ -575,7 +581,7 @@
575581
</plugin>
576582
<plugin>
577583
<artifactId>maven-assembly-plugin</artifactId>
578-
<version>2.3</version>
584+
<version>3.1.1</version> <!-- was 2.3 -->
579585
<configuration>
580586
<descriptorRefs>
581587
<descriptorRef>jar-with-dependencies</descriptorRef>
@@ -596,7 +602,7 @@
596602
<configuration>
597603
<useAgent>true</useAgent>
598604
</configuration>
599-
<version>1.5</version>
605+
<version>1.6</version> <!-- was 1.5 -->
600606
<executions>
601607
<execution>
602608
<id>sign-artifacts</id>
@@ -610,7 +616,7 @@
610616
<plugin>
611617
<groupId>org.apache.maven.plugins</groupId>
612618
<artifactId>maven-source-plugin</artifactId>
613-
<version>2.2.1</version>
619+
<version>3.0.1</version> <!-- was 2.2.1 -->
614620
<executions>
615621
<execution>
616622
<id>attach-sources</id>
@@ -623,7 +629,7 @@
623629
<plugin>
624630
<groupId>org.apache.maven.plugins</groupId>
625631
<artifactId>maven-javadoc-plugin</artifactId>
626-
<version>2.10.4</version>
632+
<version>${javadoc.version}</version>
627633
<configuration>
628634
<excludePackageNames>
629635
org.hyperledger.fabric_ca.sdk.helper:org.hyperledger.fabric.protos.*:org.hyperledger.fabric.sdk.helper:org.hyperledger.fabric.sdk.transaction:org.hyperledger.fabric.sdk.security

src/main/java/org/hyperledger/fabric/sdk/identity/IdemixRoles.java

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,73 +25,80 @@ int getValue() {
2525

2626
/**
2727
* Receives an array of IdemixRoles and returns the bitmask combination of all
28+
*
2829
* @param roles that we want to combine
2930
* @return bitmask
3031
*/
31-
static int getRoleMask(IdemixRoles[] roles) {
32+
static int getRoleMask(IdemixRoles[] roles) {
3233
int mask = 0;
33-
for (IdemixRoles role: roles) {
34+
for (IdemixRoles role : roles) {
3435
mask = mask | role.value;
3536
}
3637
return mask;
3738
}
3839

3940
/**
4041
* Receives an array of MspPrincipal.MSPRole and returns the bitmask combination of all
42+
*
4143
* @param roles that we want to combine
4244
* @return bitmask
4345
*/
44-
static int getRoleMask(MspPrincipal.MSPRole [] roles) {
46+
static int getRoleMask(MspPrincipal.MSPRole[] roles) {
4547
int mask = 0;
46-
for (MspPrincipal.MSPRole role: roles) {
47-
mask = mask | getIdemixRoleFromMSPRole(role);
48+
for (MspPrincipal.MSPRole role : roles) {
49+
mask = mask | getIdemixRoleFromMSPRole(role);
4850
}
4951
return mask;
5052
}
5153

5254
/**
5355
* Receives a MspPrincipal.MSPRole and returns the bitmask
56+
*
5457
* @param role that we want to combine
5558
* @return bitmask
5659
*/
57-
static int getRoleMask(MspPrincipal.MSPRole role) {
58-
return getRoleMask(new MspPrincipal.MSPRole[]{role});
60+
static int getRoleMask(MspPrincipal.MSPRole role) {
61+
return getRoleMask(new MspPrincipal.MSPRole[] {role});
5962
}
6063

6164
/**
6265
* Receives a bitmask and a roleMask to test. If the roleMask is contained in the bit mask returns true.
63-
* @param bitmask where to test the roleMask
66+
*
67+
* @param bitmask where to test the roleMask
6468
* @param searchRole roleMask to test
6569
* @return true if roleMask contained
6670
*/
67-
static boolean checkRole(int bitmask, IdemixRoles searchRole) {
71+
static boolean checkRole(int bitmask, IdemixRoles searchRole) {
6872
return (bitmask & searchRole.value) == searchRole.value;
6973
}
7074

7175
/**
7276
* Receives a MSPRole and returns the correspondent IdemixRole value
77+
*
7378
* @param role to transform to int
7479
* @return IdemixRole value
7580
*/
76-
static int getIdemixRoleFromMSPRole(MspPrincipal.MSPRole role) {
81+
static int getIdemixRoleFromMSPRole(MspPrincipal.MSPRole role) {
7782
return getIdemixRoleFromMSPRole(role.getRole());
7883
}
7984

8085
/**
8186
* Receives a MSPRole Type and returns the correspondent IdemixRole value
87+
*
8288
* @param type to transform to int
8389
* @return IdemixRole value
8490
*/
85-
static int getIdemixRoleFromMSPRole(MspPrincipal.MSPRole.MSPRoleType type) {
91+
static int getIdemixRoleFromMSPRole(MspPrincipal.MSPRole.MSPRoleType type) {
8692
return getIdemixRoleFromMSPRole(type.getNumber());
8793
}
8894

8995
/**
9096
* Receives a MSPRole int value and returns the correspondent IdemixRole value
97+
*
9198
* @param type to transform to int
9299
* @return IdemixRole value
93100
*/
94-
static int getIdemixRoleFromMSPRole(int type) {
101+
static int getIdemixRoleFromMSPRole(int type) {
95102
switch (type) {
96103
case MspPrincipal.MSPRole.MSPRoleType.ADMIN_VALUE:
97104
return ADMIN.getValue();
@@ -108,10 +115,11 @@ static int getIdemixRoleFromMSPRole(int type) {
108115

109116
/**
110117
* Receives an integer that represents a roleMask and return the correspondent MSPRole value
118+
*
111119
* @param role to transform to MSProle
112120
* @return MSPRole
113121
*/
114-
static MspPrincipal.MSPRole.MSPRoleType getMSPRoleFromIdemixRole(int role) {
122+
static MspPrincipal.MSPRole.MSPRoleType getMSPRoleFromIdemixRole(int role) {
115123
if (role == ADMIN.getValue()) {
116124
return MspPrincipal.MSPRole.MSPRoleType.ADMIN;
117125
}

0 commit comments

Comments
 (0)