Skip to content

Commit 07f0d85

Browse files
committed
add null check in EntityProxy.equals and remove unused variable in test
1 parent e8a90c7 commit 07f0d85

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

client/src/main/java/com/microsoft/durabletask/EntityProxy.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl
107107
case "hashCode":
108108
return entityId.hashCode();
109109
case "equals":
110+
if (args == null || args.length == 0) {
111+
return false;
112+
}
110113
if (args[0] == proxy) {
111114
return true;
112115
}

client/src/test/java/com/microsoft/durabletask/TaskOrchestrationEntityEventTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ void callEntity_nullResultViaEventRaised_triggerBindingPath() throws Exception {
763763

764764
TaskOrchestrationExecutor executor = createExecutor(orchestratorName, ctx -> {
765765
// Void operation — result is null
766-
Void value = ctx.callEntity(entityId, "reset", null, Void.class).await();
766+
ctx.callEntity(entityId, "reset", null, Void.class).await();
767767
ctx.complete("done");
768768
});
769769

0 commit comments

Comments
 (0)