use sendInternal rather than calling hook directly

This commit is contained in:
Vaci Koblizek 2020-11-20 16:27:44 +00:00
parent d3e639eaee
commit e314d26ab3
3 changed files with 10 additions and 1 deletions

View file

@ -2031,7 +2031,7 @@ private:
sp, " return ", paramFactory, ";\n", sp, " return ", paramFactory, ";\n",
sp, " }\n", sp, " }\n",
sp, " default Response send() {\n", sp, " default Response send() {\n",
sp, " return new Response(this.getHook().send());\n", sp, " return new Response(this.sendInternal());\n",
sp, " }\n", sp, " }\n",
sp, " }\n", sp, " }\n",
sp, " public static final class Response\n", sp, " public static final class Response\n",

View file

@ -221,6 +221,11 @@ public final class AnyPointer {
return AnyPointer.factory; return AnyPointer.factory;
} }
@Override
public RemotePromise<Reader> sendInternal() {
return this.send();
}
public RemotePromise<Reader> send() { public RemotePromise<Reader> send() {
return this.getHook().send(); return this.getHook().send();
} }

View file

@ -16,6 +16,10 @@ public interface Request<Params> {
Request<AnyPointer.Builder> getTypelessRequest(); Request<AnyPointer.Builder> getTypelessRequest();
default RemotePromise<AnyPointer.Reader> sendInternal() {
return this.getTypelessRequest().sendInternal();
}
static <Params> Request<Params> newBrokenRequest(FromPointerBuilder<Params> paramsFactory, static <Params> Request<Params> newBrokenRequest(FromPointerBuilder<Params> paramsFactory,
Throwable exc) { Throwable exc) {