Skip to content

Commit 82b7e33

Browse files
Switching to JDK 9
1 parent 2c57e2d commit 82b7e33

File tree

3 files changed

+27
-66
lines changed

3 files changed

+27
-66
lines changed

.travis.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
language: java
2-
sudo: required
2+
sudo: false
33
jdk:
4-
- oraclejdk8
5-
- openjdk7
4+
- oraclejdk9
65
env:
76
global:
87
- secure: gZBB5FXkBFbMwXP8CzREmg2GShlS1rE+OnrOAGoevrJdrCFUiw7GW1NYI0no31hUV0wy3vaqLOdvOoITyNm75xc1oRKaAN31CwDhhDCrJwyT/yJOWj/HLwxZIq4icIDrD5vKsUiyXVH/XXXmqvF76TlY1KdIBFicDtWWYLlz2XijoKInQpSbMa4ntpETb4daXTcz7bcjJ0N1hXTSlWnuxXRn4jdLKyn0ksPQ+8HxNKfCqkGumI1H0jB60eaKNGsG1dZwKrY5HnFzmYptPaYVlNutO17wjvKM5CJ8XdSiojymaMrgT6Tl6UzUnE5yfUp3QsWGaypYDX32Nt4qOS304/pmDA3uy+pUtoPhPWgaLf55KAKqsWrRsP32cqeBRpXrWEvP9V/9wYa7cchAAD5wApaJVQSbJVX8WzeMw+DgL8LQlg8y1KHh4POIY6Z5IZnVdKr9eElB2Ii2wTHJHaJZWK35PsXezAnOfsrkjm4PxtuhnogaH/g/M1l6+Zwdc5lptRlixRnOzI6W6mKux63hm9jW44kTWcVsG3J4cyjDno1uLDdJ6ra9qvnAgN398V3MUWZXPVmhOzM2l8HV0fJqGc57FPLa5Aeo3k10jqWTtA7hYcbk00GEqeMvD2ZeOdmTVGi/N25ZHNipNs3Z3abEhnBVAUq3eWBCGik2eeNIDm0= # MAVEN_GPG_PASSPHRASE
@@ -11,15 +10,15 @@ env:
1110
- secure: "cPCXRHx79m0MXE8/3/WXpwUyUwZkTMCpGgIrV2VryGpl6+47kRgHWHUWJ/4Duj/hWrH+VyQ/NheAjwwX90Czu3m+InnoQv7lZO4drH+kd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fYF2we53uuN1tvzBJ5yxuHjsoteTkbdoYpIinAHI3QfREwwRX19Q4jjJU9GTT12n/7GQopXzuytK6M6xlltVVD/KffmdyiqqWA1u391t2HcgmX6TyvHS4jNy9hbJ+/zfqwZG+NQFSPz99LAiGpLYmctY3A5oofM16x07Tofk/HvbCMCjuMsk0zLgd1m915TFJ5ZUQ510ohrM5IBSdUJ6NUc=" #CODACY_PROJECT_TOKEN
1312
install:
14-
- mvn dependency:go-offline -Pdependency-check
15-
- mvn dependency:go-offline -Pcoverage
16-
- mvn dependency:go-offline -Prelease
13+
- mvn dependency:go-offline -Pdependency-check,coverage,release
1714
before_script:
1815
- mvn --update-snapshots dependency-check:check -Pdependency-check
1916
script:
20-
- mvn clean test
17+
- mvn clean test jacoco:report verify -Pcoverage
2118
after_success:
22-
- "if [[ ${TRAVIS_JDK_VERSION} == 'oraclejdk8' ]]; then mvn test jacoco:report verify -Pcoverage; fi"
19+
- jdk_switcher use oraclejdk8
20+
- curl -o ~/codacy-coverage-reporter-assembly-latest.jar https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/2.0.1/codacy-coverage-reporter-2.0.1-assembly.jar
21+
- $JAVA_HOME/bin/java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r target/site/jacoco/jacoco.xml
2322
cache:
2423
directories:
2524
- $HOME/.m2

pom.xml

Lines changed: 14 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.cryptomator</groupId>
55
<artifactId>siv-mode</artifactId>
6-
<version>1.2.2</version>
6+
<version>1.2.3</version>
77

88
<name>SIV Mode</name>
99
<description>RFC 5297 SIV mode: deterministic authenticated encryption</description>
@@ -59,6 +59,12 @@
5959
<version>2.8.47</version>
6060
<scope>test</scope>
6161
</dependency>
62+
<dependency>
63+
<groupId>com.google.guava</groupId>
64+
<artifactId>guava</artifactId>
65+
<version>23.6-jre</version>
66+
<scope>test</scope>
67+
</dependency>
6268
<dependency>
6369
<groupId>org.openjdk.jmh</groupId>
6470
<artifactId>jmh-core</artifactId>
@@ -77,10 +83,13 @@
7783
<plugins>
7884
<plugin>
7985
<artifactId>maven-compiler-plugin</artifactId>
80-
<version>3.6.2</version>
86+
<version>3.7.0</version>
8187
<configuration>
8288
<source>1.7</source>
8389
<target>1.7</target>
90+
<release>7</release>
91+
<encoding>UTF-8</encoding>
92+
<showWarnings>true</showWarnings>
8493
</configuration>
8594
</plugin>
8695
<plugin>
@@ -96,7 +105,7 @@
96105
</plugin>
97106
<plugin>
98107
<artifactId>maven-shade-plugin</artifactId>
99-
<version>3.0.0</version>
108+
<version>3.1.0</version>
100109
<executions>
101110
<execution>
102111
<phase>package</phase>
@@ -155,7 +164,7 @@
155164
<plugin>
156165
<groupId>org.owasp</groupId>
157166
<artifactId>dependency-check-maven</artifactId>
158-
<version>2.1.0</version>
167+
<version>2.1.1</version>
159168
<configuration>
160169
<cveValidForHours>24</cveValidForHours>
161170
<failBuildOnCVSS>0</failBuildOnCVSS>
@@ -174,20 +183,6 @@
174183

175184
<profile>
176185
<id>coverage</id>
177-
<dependencies>
178-
<dependency>
179-
<groupId>com.codacy</groupId>
180-
<artifactId>codacy-coverage-reporter</artifactId>
181-
<version>2.0.0</version>
182-
<classifier>assembly</classifier>
183-
<exclusions>
184-
<exclusion>
185-
<groupId>*</groupId>
186-
<artifactId>*</artifactId>
187-
</exclusion>
188-
</exclusions>
189-
</dependency>
190-
</dependencies>
191186
<build>
192187
<plugins>
193188
<plugin>
@@ -203,28 +198,6 @@
203198
</execution>
204199
</executions>
205200
</plugin>
206-
<plugin>
207-
<groupId>org.codehaus.mojo</groupId>
208-
<artifactId>exec-maven-plugin</artifactId>
209-
<version>1.6.0</version>
210-
<executions>
211-
<execution>
212-
<phase>verify</phase>
213-
<goals>
214-
<goal>java</goal>
215-
</goals>
216-
<configuration>
217-
<mainClass>com.codacy.CodacyCoverageReporter</mainClass>
218-
<arguments>
219-
<argument>-l</argument>
220-
<argument>Java</argument>
221-
<argument>-r</argument>
222-
<argument>${project.build.directory}/site/jacoco/jacoco.xml</argument>
223-
</arguments>
224-
</configuration>
225-
</execution>
226-
</executions>
227-
</plugin>
228201
</plugins>
229202
</build>
230203
</profile>
@@ -257,7 +230,7 @@
257230
</plugin>
258231
<plugin>
259232
<artifactId>maven-javadoc-plugin</artifactId>
260-
<version>2.10.4</version>
233+
<version>3.0.0</version>
261234
<executions>
262235
<execution>
263236
<id>attach-javadocs</id>
@@ -280,17 +253,6 @@
280253
</execution>
281254
</executions>
282255
</plugin>
283-
<plugin>
284-
<groupId>org.sonatype.plugins</groupId>
285-
<artifactId>nexus-staging-maven-plugin</artifactId>
286-
<version>1.6.8</version>
287-
<extensions>true</extensions>
288-
<configuration>
289-
<serverId>ossrh</serverId>
290-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
291-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
292-
</configuration>
293-
</plugin>
294256
</plugins>
295257
</build>
296258
</profile>

src/test/java/org/cryptomator/siv/EncryptionTestCase.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import java.util.Arrays;
99
import java.util.List;
1010

11-
import javax.xml.bind.DatatypeConverter;
11+
import com.google.common.io.BaseEncoding;
1212

1313
public class EncryptionTestCase {
1414
private final byte[] ctrKey;
@@ -39,15 +39,15 @@ public static EncryptionTestCase[] readTestCases() throws IOException {
3939
// No more test cases
4040
break;
4141
}
42-
byte[] ctrKey = DatatypeConverter.parseHexBinary(ctrKeyStr);
43-
byte[] macKey = DatatypeConverter.parseHexBinary(reader.readLine());
44-
byte[] plaintext = DatatypeConverter.parseHexBinary(reader.readLine());
42+
byte[] ctrKey = BaseEncoding.base16().decode(ctrKeyStr.toUpperCase());
43+
byte[] macKey = BaseEncoding.base16().decode(reader.readLine().toUpperCase());
44+
byte[] plaintext = BaseEncoding.base16().decode(reader.readLine().toUpperCase());
4545
int adCount = Integer.parseInt(reader.readLine());
4646
byte[][] ad = new byte[adCount][];
4747
for (int adIdx = 0; adIdx < adCount; adIdx++) {
48-
ad[adIdx] = DatatypeConverter.parseHexBinary(reader.readLine());
48+
ad[adIdx] = BaseEncoding.base16().decode(reader.readLine().toUpperCase());
4949
}
50-
byte[] ciphertext = DatatypeConverter.parseHexBinary(reader.readLine());
50+
byte[] ciphertext = BaseEncoding.base16().decode(reader.readLine().toUpperCase());
5151

5252
String divider = reader.readLine();
5353
if (!divider.equals("---")) {

0 commit comments

Comments
 (0)