Skip to content

Commit

Permalink
Revert "Changes for Upgrade to Java 11 #194"
Browse files Browse the repository at this point in the history
  • Loading branch information
t11947 authored Aug 27, 2020
1 parent 696cb86 commit 26ffa1b
Show file tree
Hide file tree
Showing 19 changed files with 68 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cache:
directories:
- $HOME/.m2
jdk:
- oraclejdk11
- oraclejdk8
sudo: false
dist: trusty
addons:
Expand Down
6 changes: 5 additions & 1 deletion code-style/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@
</module>

<module name="TreeWalker">
<property name="cacheFile" value="${checkstyle.cache.file}"/>

<module name="SuppressWarningsHolder"/>

<module name="AtclauseOrder"/>
<module name="JavadocMethod"/>
<module name="JavadocMethod">
<property name="allowMissingJavadoc" value="true"/>
</module>
<module name="JavadocStyle">
<property name="checkFirstSentence" value="false"/>
</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public T apply(final T state, final T input) {
return _apply(state, input);
}

protected abstract T _apply(T a, T b);
protected abstract T _apply(final T a, final T b);

@Override
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ public Number _apply(final Number a, final Number b) {
return null;
}

protected abstract Integer aggregateInt(Integer a, Integer b);
protected abstract Integer aggregateInt(final Integer a, final Integer b);

protected abstract Long aggregateLong(Long a, Long b);
protected abstract Long aggregateLong(final Long a, final Long b);

protected abstract Double aggregateDouble(Double a, Double b);
protected abstract Double aggregateDouble(final Double a, final Double b);

protected abstract Float aggregateFloat(Float a, Float b);
protected abstract Float aggregateFloat(final Float a, final Float b);

protected abstract Short aggregateShort(Short a, Short b);
protected abstract Short aggregateShort(final Short a, final Short b);
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public byte[] apply(final byte[] compressed) {
return new byte[0];
}

try (GZIPInputStream gzipStream = new GZIPInputStream(new ByteArrayInputStream(compressed))) {
try (final GZIPInputStream gzipStream = new GZIPInputStream(new ByteArrayInputStream(compressed))) {
return IOUtils.toByteArray(gzipStream);
} catch (final IOException e) {
throw new RuntimeException("Failed to decompress provided gzipped string", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
import uk.gov.gchq.koryphe.ValidationResult;

public interface InputValidator {
ValidationResult isInputValid(Class<?>... arguments);
ValidationResult isInputValid(final Class<?>... arguments);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
import uk.gov.gchq.koryphe.ValidationResult;

public interface OutputValidator {
ValidationResult isOutputValid(Class<?>... arguments);
ValidationResult isOutputValid(final Class<?>... arguments);
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public abstract class Signature {
* @param arguments Class or Tuple of classes to test.
* @return ValidationResult containing the isValid flag and errors messages.
*/
public abstract ValidationResult assignable(Class<?>... arguments);
public abstract ValidationResult assignable(final Class<?>... arguments);

public abstract Class[] getClasses();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import uk.gov.gchq.koryphe.tuple.n.Tuple2;

public abstract class KorypheFunction2<T, U, R> extends KorypheFunctionN<Tuple2<T, U>, R> {
public abstract R apply(T t, U u);
public abstract R apply(final T t, final U u);

public R delegateApply(final Tuple2<T, U> tuple) {
return apply(tuple.get0(), tuple.get1());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import uk.gov.gchq.koryphe.tuple.n.Tuple3;

public abstract class KorypheFunction3<T, U, V, R> extends KorypheFunctionN<Tuple3<T, U, V>, R> {
public abstract R apply(T t, U u, V v);
public abstract R apply(final T t, final U u, final V v);

@Override
public R delegateApply(final Tuple3<T, U, V> tuple) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import uk.gov.gchq.koryphe.tuple.n.Tuple4;

public abstract class KorypheFunction4<T, U, V, W, R> extends KorypheFunctionN<Tuple4<T, U, V, W>, R> {
public abstract R apply(T t, U u, V v, W w);
public abstract R apply(final T t, final U u, final V v, final W w);

@Override
public R delegateApply(final Tuple4<T, U, V, W> tuple) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import uk.gov.gchq.koryphe.tuple.n.Tuple5;

public abstract class KorypheFunction5<T, U, V, W, X, R> extends KorypheFunctionN<Tuple5<T, U, V, W, X>, R> {
public abstract R apply(T t, U u, V v, W w, X x);
public abstract R apply(final T t, final U u, final V v, final W w, final X x);

@Override
public R delegateApply(final Tuple5<T, U, V, W, X> tuple) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ public R apply(final TUPLE tuple) {
}
}

protected abstract R delegateApply(TUPLE tuple);
protected abstract R delegateApply(final TUPLE tuple);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import uk.gov.gchq.koryphe.tuple.n.Tuple2;

public abstract class KoryphePredicate2<T, U> extends KoryphePredicateN<Tuple2<T, U>> {
public abstract boolean test(T t, U u);
public abstract boolean test(final T t, final U u);

@Override
protected boolean delegateTest(final Tuple2<T, U> tuple) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import uk.gov.gchq.koryphe.tuple.n.Tuple3;

public abstract class KoryphePredicate3<T, U, V> extends KoryphePredicateN<Tuple3<T, U, V>> {
public abstract boolean test(T t, U u, V v);
public abstract boolean test(final T t, final U u, final V v);

@Override
protected boolean delegateTest(final Tuple3<T, U, V> tuple) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import uk.gov.gchq.koryphe.tuple.n.Tuple4;

public abstract class KoryphePredicate4<T, U, V, W> extends KoryphePredicateN<Tuple4<T, U, V, W>> {
public abstract boolean test(T t, U u, V v, W w);
public abstract boolean test(final T t, final U u, final V v, final W w);

@Override
protected boolean delegateTest(final Tuple4<T, U, V, W> tuple) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import uk.gov.gchq.koryphe.tuple.n.Tuple5;

public abstract class KoryphePredicate5<T, U, V, W, X> extends KoryphePredicateN<Tuple5<T, U, V, W, X>> {
public abstract boolean test(T t, U u, V v, W w, X x);
public abstract boolean test(final T t, final U u, final V v, final W w, final X x);

@Override
protected boolean delegateTest(final Tuple5<T, U, V, W, X> tuple) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ public boolean test(final TUPLE tuple) {
}
}

protected abstract boolean delegateTest(TUPLE tuple);
protected abstract boolean delegateTest(final TUPLE tuple);
}
108 changes: 42 additions & 66 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,35 @@
</modules>

<properties>
<java.version>11</java.version>
<java.version>1.8</java.version>

<findbugs.annotations.version>3.0.1u2</findbugs.annotations.version>
<findbugs.jsr305.version>3.0.2</findbugs.jsr305.version>
<guava.version>29.0-jre</guava.version>
<findbugs.version>3.0.1</findbugs.version>
<guava.version>27.0.1-jre</guava.version>
<hamcrest.version>1.3</hamcrest.version>
<jackson.version>2.6.7</jackson.version>
<junit5.version>5.6.2</junit5.version>
<junitSurefireProvider.version>1.3.2</junitSurefireProvider.version>
<mockito.version>3.3.3</mockito.version>
<slf4j.api.version>1.7.30</slf4j.api.version>
<jackson.version>2.6.5</jackson.version>
<junit5.version>5.6.0</junit5.version>
<junitSurefireProvider.version>1.1.0</junitSurefireProvider.version>
<mockito.version>1.9.5</mockito.version>
<slf4j.api.version>1.7.25</slf4j.api.version>

<checkstyle.plugin.version>3.1.1</checkstyle.plugin.version>
<commons-lang3.version>3.11</commons-lang3.version>
<commons-csv.version>1.8</commons-csv.version>
<commons-codec.version>1.14</commons-codec.version>
<commons-io.version>2.7</commons-io.version>
<org.json.version>20200518</org.json.version>
<enforcer.plugin.version>3.0.0-M3</enforcer.plugin.version>
<compiler.plugin.verson>3.8.1</compiler.plugin.verson>
<checkstyle.plugin.version>2.17</checkstyle.plugin.version>
<commons-lang3.version>3.3.2</commons-lang3.version>
<commons-csv.version>1.4</commons-csv.version>
<commons-codec.version>1.6</commons-codec.version>
<commons-io.version>2.4</commons-io.version>
<org.json-version>20180813</org.json-version>
<compiler.plugin.verson>3.8.0</compiler.plugin.verson>
<findbugs.plugin.version>3.0.5</findbugs.plugin.version>
<gpg.plugin.version>1.6</gpg.plugin.version>
<jacoco.plugin.version>0.8.5</jacoco.plugin.version>
<jar.plugin.version>3.2.0</jar.plugin.version>
<javadoc.plugin.version>3.2.0</javadoc.plugin.version>
<minimum.maven.version>3.3.9</minimum.maven.version>
<nexus.plugin.version>1.6.8</nexus.plugin.version>
<release.plugin.version>3.0.0-M1</release.plugin.version>
<scm.plugin.version>3.0.0</scm.plugin.version>
<source.plugin.version>3.2.1</source.plugin.version>
<spotbugs.plugin.version>4.0.4</spotbugs.plugin.version>
<surefire.plugin.version>3.0.0-M5</surefire.plugin.version>
<class-path-scanner.version>3.1.12</class-path-scanner.version>
<jacoco.plugin.version>0.7.7.201606060606</jacoco.plugin.version>
<jar.plugin.version>2.4</jar.plugin.version>
<javadoc.plugin.version>2.10.3</javadoc.plugin.version>
<nexus.plugin.version>1.6.7</nexus.plugin.version>
<release.plugin.version>2.5.3</release.plugin.version>
<scm.plugin.version>1.1</scm.plugin.version>
<source.plugin.version>2.4</source.plugin.version>
<surefire.plugin.version>2.22.1</surefire.plugin.version>
<class-path-scanner.version>2.10.0</class-path-scanner.version>


<!-- Define SCM properties for use with Release Plugin -->
Expand Down Expand Up @@ -104,12 +101,12 @@
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
<version>${findbugs.annotations.version}</version>
<version>${findbugs.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>${findbugs.jsr305.version}</version>
<version>${findbugs.version}</version>
</dependency>
<dependency>
<groupId>io.github.lukehutch</groupId>
Expand Down Expand Up @@ -178,7 +175,7 @@
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<artifactId>mockito-all</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
Expand All @@ -197,32 +194,12 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>${org.json.version}</version>
<version>${org.json-version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${enforcer.plugin.version}</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>${minimum.maven.version}</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down Expand Up @@ -264,17 +241,16 @@
</executions>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs.plugin.version}</version>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>${findbugs.plugin.version}</version>
<configuration>
<effort>Low</effort>
<threshold>Low</threshold>
<xmlOutput>true</xmlOutput>
<spotbugsXmlOutputDirectory>
${project.build.directory}/spotbugs
</spotbugsXmlOutputDirectory>
<spotbugsXmlOutputFilename>findbugs.xml</spotbugsXmlOutputFilename>
<findbugsXmlOutputDirectory>
${project.build.directory}/findbugs
</findbugsXmlOutputDirectory>
</configuration>
<executions>
<execution>
Expand All @@ -287,10 +263,9 @@
<effort>Low</effort>
<threshold>Low</threshold>
<xmlOutput>true</xmlOutput>
<spotbugsXmlOutputDirectory>
${project.build.directory}/spotbugs
</spotbugsXmlOutputDirectory>
<spotbugsXmlOutputFilename>findbugs.xml</spotbugsXmlOutputFilename>
<findbugsXmlOutputDirectory>
${project.build.directory}/findbugs
</findbugsXmlOutputDirectory>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -341,6 +316,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>${javadoc.plugin.version}</version>
<configuration>
<aggregate>true</aggregate>
<show>public</show>
<nohelp>true</nohelp>
<header>Koryphe ${project.version}</header>
Expand Down Expand Up @@ -561,9 +537,9 @@
</configuration>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs.plugin.version}</version>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>${findbugs.plugin.version}</version>
<configuration>
<fork>false</fork>
</configuration>
Expand Down

0 comments on commit 26ffa1b

Please sign in to comment.