Skip to content

Commit dee4303

Browse files
committed
reduce the public interface for ClientHook
1 parent f8b5857 commit dee4303

2 files changed

Lines changed: 3 additions & 45 deletions

File tree

runtime/src/main/java/org/capnproto/Capability.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,14 @@
66
public final class Capability {
77

88
public static ClientHook newBrokenCap(String reason) {
9-
return newBrokenClient(reason, false, BROKEN_CAPABILITY_BRAND);
10-
}
11-
12-
public static ClientHook newBrokenCap(Throwable exc) {
13-
return newBrokenClient(exc, false, BROKEN_CAPABILITY_BRAND);
9+
return newBrokenClient(BROKEN_CAPABILITY_BRAND);
1410
}
1511

1612
public static ClientHook newNullCap() {
17-
return newBrokenClient(RpcException.failed("Called null capability"), true, NULL_CAPABILITY_BRAND);
18-
}
19-
20-
private static ClientHook newBrokenClient(String reason, boolean resolved, Object brand) {
21-
return newBrokenClient(RpcException.failed(reason), resolved, brand);
13+
return newBrokenClient(NULL_CAPABILITY_BRAND);
2214
}
2315

24-
private static ClientHook newBrokenClient(Throwable exc, boolean resolved, Object brand) {
16+
private static ClientHook newBrokenClient(Object brand) {
2517
return new ClientHook() {
2618
@Override
2719
public Object getBrand() {

runtime/src/main/java/org/capnproto/RpcException.java

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)