Skip to content

Commit

Permalink
Merge pull request #74 from spotify/ngn/jdk9
Browse files Browse the repository at this point in the history
Build on JDK 9
  • Loading branch information
protocol7 committed Jul 5, 2017
2 parents 333c1fa + 816c3f2 commit 212b3cf
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 40 deletions.
19 changes: 15 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,21 @@ secure: "H4tUL1Greyj588Kb1/FnRapFT/57KaApQYAZx2KRORkddYSzPq2tovI1S8AnqzCHpVtfjin

language: java

jdk:
- oraclejdk8
- oraclejdk7
- openjdk7

matrix:
include:
- os: linux
dist: trusty
jdk: oraclejdk8
- os: linux
dist: trusty
jdk: oraclejdk9
- os: linux
dist: precise
jdk: oraclejdk7
- os: linux
dist: precise
jdk: openjdk7

install:
- mvn install -DskipTests=true -Dgpg.skip=true
Expand Down
82 changes: 47 additions & 35 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@

<!-- Tests -->
<dependency>
<artifactId>mockito-all</artifactId>
<artifactId>mockito-core</artifactId>
<groupId>org.mockito</groupId>
<version>1.9.5</version>
<version>2.8.47</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -197,39 +197,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.13</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<consoleOutput>true</consoleOutput>
<failOnViolation>true</failOnViolation>
<failsOnError>true</failsOnError>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<maxAllowedViolations>0</maxAllowedViolations>
</configuration>
<executions>
<execution>
<id>checkstyle</id>
<phase>process-sources</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<failOnViolation>true</failOnViolation>
<failsOnError>true</failsOnError>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>5.9</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
Expand All @@ -251,5 +218,50 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>java8</id>
<activation>
<jdk>[,1.9)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.13</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<consoleOutput>true</consoleOutput>
<failOnViolation>true</failOnViolation>
<failsOnError>true</failsOnError>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<maxAllowedViolations>0</maxAllowedViolations>
</configuration>
<executions>
<execution>
<id>checkstyle</id>
<phase>process-sources</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<failOnViolation>true</failOnViolation>
<failsOnError>true</failsOnError>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>5.9</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

2 changes: 1 addition & 1 deletion src/test/java/com/spotify/folsom/RecoveryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void testOverloadAndTimeoutRecovery() throws Exception {

// Have memcached block indefinitely on all GET requests
final GetAnswer answer = new GetAnswer();
when(cache.get(any(Key[].class))).then(answer);
when(cache.get((Key[]) any())).then(answer);

// Overload the client
final int overload = 10;
Expand Down

0 comments on commit 212b3cf

Please sign in to comment.