Skip to content

Commit 273dc64

Browse files
committed
WIP
1 parent 5e4f40b commit 273dc64

9 files changed

Lines changed: 8 additions & 24 deletions

File tree

build.gradle.kts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ tasks.register("printGitStatus") {
8484
}
8585
}
8686

87-
// tasks.register("createRelease") {
88-
// group = "release"
89-
// description = "Create a release branch and git tag"
87+
tasks.register("createRelease") {
88+
group = "release"
89+
description = "Create a release branch and git tag"
9090

9191
// if (isGitDirty) {
9292
// throw GradleException("Local git repository is not clean")
@@ -115,7 +115,7 @@ tasks.register("printGitStatus") {
115115
// runCommand("git", "branch", releaseBranch)
116116
// runCommand("git", "push", "origin", releaseBranch)
117117
// }
118-
// }
118+
}
119119

120120
plugins {
121121
id("java")
@@ -161,6 +161,10 @@ tasks.withType<Pmd> {
161161
}
162162
}
163163

164+
tasks.withType<JavaCompile>().configureEach {
165+
options.compilerArgs.addAll(listOf("-Xlint:unchecked", "-Xlint:deprecation"))
166+
}
167+
164168
repositories {
165169
gradlePluginPortal()
166170
mavenCentral()

src/main/java/dev/dbos/transact/context/DBOSContext.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ public class DBOSContext {
1616
StartWorkflowOptions startOptions;
1717
String startedWorkflowId;
1818

19-
// TODO: auth support
20-
// String authenticatedUser;
21-
// List<String> authenticatedRoles;
22-
// String assumedRole;
23-
2419
// current workflow fields
2520
private final String workflowId;
2621
private int functionId;

src/main/java/dev/dbos/transact/execution/DBOSExecutor.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ public <T, E extends Exception> T callFunctionAsStep(
356356
return functionResult;
357357
}
358358

359-
@SuppressWarnings("unchecked")
360359
public <T, E extends Exception> T runStepInternal(
361360
ThrowingSupplier<T, E> stepfunc, StepOptions opts, String childWfId) throws E {
362361
try {
@@ -376,7 +375,6 @@ public <T, E extends Exception> T runStepInternal(
376375
}
377376
}
378377

379-
@SuppressWarnings("unchecked")
380378
private <T, E extends Exception> T handleExistingResult(StepResult result, String functionName)
381379
throws E {
382380
if (result.getOutput() != null) {
@@ -397,7 +395,6 @@ private <T, E extends Exception> T handleExistingResult(StepResult result, Strin
397395
}
398396
}
399397

400-
@SuppressWarnings("unchecked")
401398
public <T, E extends Exception> T runStepInternal(
402399
String stepName,
403400
boolean retryAllowed,
@@ -513,8 +510,6 @@ private static <R, E extends Exception> WorkflowHandle<R, E> retrieveWorkflow(
513510
}
514511

515512
public void sleep(Duration duration) {
516-
// CB TODO: This should be OK outside DBOS
517-
518513
DBOSContext context = DBOSContextHolder.get();
519514

520515
if (context.getWorkflowId() == null) {

src/main/java/dev/dbos/transact/internal/DBOSInvocationHandler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public DBOSInvocationHandler(
2828
this.executorSupplier = executorSupplier;
2929
}
3030

31-
@SuppressWarnings("unchecked")
3231
public static <T> T createProxy(
3332
Class<T> interfaceClass,
3433
Object implementation,

src/main/java/dev/dbos/transact/workflow/Scheduled.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,4 @@
99
@Target(ElementType.METHOD)
1010
public @interface Scheduled {
1111
String cron();
12-
13-
// TODO: add scheduler mode enum + queueName params
14-
// https://github.com/dbos-inc/dbos-transact-java/issues/87
1512
}

src/main/java/dev/dbos/transact/workflow/internal/WorkflowHandleFuture.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public String workflowId() {
2626
return workflowId;
2727
}
2828

29-
@SuppressWarnings("unchecked")
3029
@Override
3130
public T getResult() throws E {
3231
return executor.<T, E>callFunctionAsStep(

src/test/java/dev/dbos/transact/admin/AdminServerTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ public void ensurePostJsonNotPost() throws IOException {
6060

6161
List<WorkflowHandle<?, ?>> handles = new ArrayList<>();
6262
for (int i = 0; i < 5; i++) {
63-
@SuppressWarnings("unchecked")
6463
var handle = (WorkflowHandle<Object, Exception>) mock(WorkflowHandle.class);
6564
when(handle.workflowId()).thenReturn("workflow-00%d".formatted(i));
6665
handles.add(handle);
@@ -81,7 +80,6 @@ public void ensurePostJsonNotJson() throws IOException {
8180

8281
List<WorkflowHandle<?, ?>> handles = new ArrayList<>();
8382
for (int i = 0; i < 5; i++) {
84-
@SuppressWarnings("unchecked")
8583
var handle = (WorkflowHandle<Object, Exception>) mock(WorkflowHandle.class);
8684
when(handle.workflowId()).thenReturn("workflow-00%d".formatted(i));
8785
handles.add(handle);
@@ -158,7 +156,6 @@ public void workflowRecovery() throws IOException {
158156

159157
List<WorkflowHandle<?, ?>> handles = new ArrayList<>();
160158
for (int i = 0; i < 5; i++) {
161-
@SuppressWarnings("unchecked")
162159
var handle = (WorkflowHandle<Object, Exception>) mock(WorkflowHandle.class);
163160
when(handle.workflowId()).thenReturn("workflow-00%d".formatted(i));
164161
handles.add(handle);

src/test/java/dev/dbos/transact/conductor/ConductorTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,6 @@ public void canFork() throws Exception {
502502
String workflowId = "sample-wf-id";
503503
String newWorkflowId = "new-" + workflowId;
504504

505-
@SuppressWarnings("unchecked")
506505
var mockHandle = (WorkflowHandle<Object, Exception>) mock(WorkflowHandle.class);
507506
when(mockHandle.workflowId()).thenReturn(newWorkflowId);
508507
when(mockExec.forkWorkflow(eq(workflowId), anyInt(), any())).thenReturn(mockHandle);

src/test/java/dev/dbos/transact/workflow/TimeoutTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ public void parentChildTimeOut() throws Exception {
288288

289289
WorkflowOptions options = new WorkflowOptions(wfid1);
290290

291-
// TODO: https://github.com/dbos-inc/dbos-transact-java/issues/86
292291
assertThrows(
293292
Exception.class,
294293
() -> {

0 commit comments

Comments
 (0)