Skip to content

Commit bcca6ea

Browse files
formatting applied by running ./gradlew build. (#756)
1 parent db299b9 commit bcca6ea

File tree

12 files changed

+434
-463
lines changed

12 files changed

+434
-463
lines changed

src/main/java/com/uber/cadence/internal/compatibility/Thrift2ProtoAdapter.java

Lines changed: 57 additions & 57 deletions
Large diffs are not rendered by default.

src/main/java/com/uber/cadence/internal/compatibility/proto/DecisionMapper.java

Lines changed: 186 additions & 173 deletions
Large diffs are not rendered by default.

src/main/java/com/uber/cadence/internal/compatibility/proto/EnumMapper.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,5 +286,4 @@ static QueryResultType queryTaskCompletedType(com.uber.cadence.QueryTaskComplete
286286
}
287287
throw new IllegalArgumentException("unexpected enum value");
288288
}
289-
290289
}

src/main/java/com/uber/cadence/internal/compatibility/proto/RequestMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
import static com.uber.cadence.internal.compatibility.proto.Helpers.arrayToByteString;
2828
import static com.uber.cadence.internal.compatibility.proto.Helpers.daysToDuration;
2929
import static com.uber.cadence.internal.compatibility.proto.Helpers.newFieldMask;
30-
import static com.uber.cadence.internal.compatibility.proto.Helpers.secondsToDuration;
3130
import static com.uber.cadence.internal.compatibility.proto.Helpers.nullToEmpty;
31+
import static com.uber.cadence.internal.compatibility.proto.Helpers.secondsToDuration;
3232
import static com.uber.cadence.internal.compatibility.proto.TypeMapper.badBinaries;
3333
import static com.uber.cadence.internal.compatibility.proto.TypeMapper.clusterReplicationConfigurationArray;
3434
import static com.uber.cadence.internal.compatibility.proto.TypeMapper.failure;

src/main/java/com/uber/cadence/internal/compatibility/thrift/EnumMapper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@ public static DecisionTaskTimedOutCause decisionTaskTimedOutCause(
305305
}
306306

307307
public static CancelExternalWorkflowExecutionFailedCause
308-
cancelExternalWorkflowExecutionFailedCause(
309-
com.uber.cadence.api.v1.CancelExternalWorkflowExecutionFailedCause t) {
308+
cancelExternalWorkflowExecutionFailedCause(
309+
com.uber.cadence.api.v1.CancelExternalWorkflowExecutionFailedCause t) {
310310
switch (t) {
311311
case CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_INVALID:
312312
return null;
@@ -317,8 +317,8 @@ public static DecisionTaskTimedOutCause decisionTaskTimedOutCause(
317317
}
318318

319319
public static SignalExternalWorkflowExecutionFailedCause
320-
signalExternalWorkflowExecutionFailedCause(
321-
com.uber.cadence.api.v1.SignalExternalWorkflowExecutionFailedCause t) {
320+
signalExternalWorkflowExecutionFailedCause(
321+
com.uber.cadence.api.v1.SignalExternalWorkflowExecutionFailedCause t) {
322322
switch (t) {
323323
case SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_INVALID:
324324
return null;

src/main/java/com/uber/cadence/internal/compatibility/thrift/ErrorMapper.java

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -41,43 +41,47 @@ public static TException Error(StatusRuntimeException ex) {
4141
return new AccessDeniedError(ex.getMessage());
4242
case INTERNAL:
4343
return new InternalServiceError(ex.getMessage());
44-
case NOT_FOUND: {
45-
if ("EntityNotExistsError".equals(details)
46-
&& ex.getMessage().contains("already completed.")) {
47-
return new WorkflowExecutionAlreadyCompletedError(ex.getMessage());
48-
} else {
49-
// TODO add cluster info
50-
return new EntityNotExistsError(ex.getMessage());
44+
case NOT_FOUND:
45+
{
46+
if ("EntityNotExistsError".equals(details)
47+
&& ex.getMessage().contains("already completed.")) {
48+
return new WorkflowExecutionAlreadyCompletedError(ex.getMessage());
49+
} else {
50+
// TODO add cluster info
51+
return new EntityNotExistsError(ex.getMessage());
52+
}
5153
}
52-
}
53-
case ALREADY_EXISTS: {
54-
switch (details) {
55-
case "CancellationAlreadyRequestedError":
56-
return new CancellationAlreadyRequestedError(ex.getMessage());
57-
case "DomainAlreadyExistsError":
58-
return new DomainAlreadyExistsError(ex.getMessage());
59-
case "WorkflowExecutionAlreadyStartedError": {
60-
// TODO add started wf info
61-
WorkflowExecutionAlreadyStartedError e = new WorkflowExecutionAlreadyStartedError();
62-
e.setMessage(ex.getMessage());
63-
return e;
54+
case ALREADY_EXISTS:
55+
{
56+
switch (details) {
57+
case "CancellationAlreadyRequestedError":
58+
return new CancellationAlreadyRequestedError(ex.getMessage());
59+
case "DomainAlreadyExistsError":
60+
return new DomainAlreadyExistsError(ex.getMessage());
61+
case "WorkflowExecutionAlreadyStartedError":
62+
{
63+
// TODO add started wf info
64+
WorkflowExecutionAlreadyStartedError e = new WorkflowExecutionAlreadyStartedError();
65+
e.setMessage(ex.getMessage());
66+
return e;
67+
}
6468
}
6569
}
66-
}
6770
case DATA_LOSS:
6871
return new InternalDataInconsistencyError(ex.getMessage());
6972
case FAILED_PRECONDITION:
7073
switch (details) {
71-
// TODO add infos
74+
// TODO add infos
7275
case "ClientVersionNotSupportedError":
7376
return new ClientVersionNotSupportedError();
7477
case "FeatureNotEnabledError":
7578
return new FeatureNotEnabledError();
76-
case "DomainNotActiveError": {
77-
DomainNotActiveError e = new DomainNotActiveError();
78-
e.setMessage(ex.getMessage());
79-
return e;
80-
}
79+
case "DomainNotActiveError":
80+
{
81+
DomainNotActiveError e = new DomainNotActiveError();
82+
e.setMessage(ex.getMessage());
83+
return e;
84+
}
8185
}
8286
case RESOURCE_EXHAUSTED:
8387
switch (details) {

0 commit comments

Comments
 (0)