Skip to content

Make client to be Java 11 compatible #609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This doc is intended for contributors to `cadence-java-client` (hopefully that's

## Development Environment

* Java 8.
* Java 11 (currently, we use Java 11 to compile Java 8 code).
* Thrift 0.9.3
* Gradle build tool
* Docker
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ java {

dependencies {
errorproneJavac('com.google.errorprone:javac:9+181-r4173-1')
errorprone('com.google.errorprone:error_prone_core:2.3.3')
errorprone('com.google.errorprone:error_prone_core:2.3.4')

compile group: 'com.uber.tchannel', name: 'tchannel-core', version: '0.8.5'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
Expand All @@ -61,6 +61,7 @@ dependencies {
compile group: 'com.google.guava', name: 'guava', version: '28.1-jre'
compile group: 'com.cronutils', name: 'cron-utils', version: '9.0.0'
compile group: 'io.micrometer', name: 'micrometer-core', version: '1.1.2'
compile group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'

testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'com.googlecode.junit-toolbox', name: 'junit-toolbox', version: '2.4'
Expand Down
6 changes: 3 additions & 3 deletions docker/buildkite/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM openjdk:8-alpine
FROM adoptopenjdk/openjdk11:alpine

# Apache Thrift version
ENV APACHE_THRIFT_VERSION=0.9.3

# Install dependencies using apk
RUN apk update && apk add --virtual wget ca-certificates wget && apk add --virtual build-dependencies build-base gcc
# Git is needed in order to update the dls submodule
RUN apk add --virtual git
RUN apk add git libstdc++

# Compile source
RUN set -ex ;\
Expand All @@ -22,4 +22,4 @@ RUN set -ex ;\
RUN apk del build-dependencies wget && rm -rf /var/cache/apk/*

RUN mkdir /cadence-java-client
WORKDIR /cadence-java-client
WORKDIR /cadence-java-client
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class DecisionTaskToken {

DecisionTaskToken(ExecutionId executionId, int historySize) {
this.executionId = Objects.requireNonNull(executionId);
this.historySize = Objects.requireNonNull(historySize);
this.historySize = historySize;
}

ExecutionId getExecutionId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public void testException() {
assertNotNull(causeFromConverted);
assertEquals(DataConverterException.class, causeFromConverted.getClass());
assertNotNull(causeFromConverted.getCause());
assertEquals(StackOverflowError.class, causeFromConverted.getCause().getClass());
assertEquals(IllegalArgumentException.class, causeFromConverted.getCause().getClass());

assertNotNull(causeFromConverted.getSuppressed());
assertEquals(1, causeFromConverted.getSuppressed().length);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/uber/cadence/workflow/WorkflowTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ public void testUntypedAsyncStartWithTimeout() throws Exception {
WorkflowStub workflowStub =
workflowClient.newUntypedWorkflowStub(
"TestWorkflow1::execute", newWorkflowOptionsBuilder(taskList).build());
Long timeout = new Long(200);
Long timeout = Long.valueOf(200);
CompletableFuture<WorkflowExecution> future =
workflowStub.startAsyncWithTimeout(timeout, TimeUnit.MILLISECONDS, taskList);
testUntypedAndStackTraceHelper(workflowStub, future.get());
Expand Down Expand Up @@ -3386,7 +3386,7 @@ public void testSignalWorkflowAsyncWithTimeout() throws Exception {
CompletableFuture<WorkflowExecution> future = workflowStub.startAsync(taskList);
future.get();

Long timeout = new Long(200);
Long timeout = Long.valueOf(200);
String testSignalInput = "hello";
CompletableFuture<String> resultFuture =
workflowStub
Expand Down