Skip to content
Snippets Groups Projects
Commit 24f8c388 authored by OZG-Cloud Team's avatar OZG-Cloud Team
Browse files

OZG-6354 extract stub building; add SuppressedAnnotation

parent c3a2a6a9
No related branches found
No related tags found
No related merge requests found
......@@ -112,6 +112,11 @@ public class VorgangManagerServerResolver {
var channel = createChannel(channelName);
var stub = stubFactory.createStub(stubClass, channel);
stub = applyStubTransformers(stub, channelName);
return buildClosableStub(stub, channel);
}
@SuppressWarnings("unchecked")
private <T extends AbstractStub<?>> ClosableStub<T> buildClosableStub(AbstractStub<?> stub, ManagedChannel channel) {
return ClosableStub.<T>builder().stub((T) stub).channel(channel).build();
}
......@@ -131,6 +136,11 @@ public class VorgangManagerServerResolver {
var channelName = getChannelName(organisationsEinheitId);
var stub = stubFactory.createStub(stubClass, createChannelByName(channelName));
stub = applyStubTransformers(stub, channelName);
return buildConsistingStub(stub);
}
@SuppressWarnings("unchecked")
private <T extends AbstractStub<?>> ConsistingStub<T> buildConsistingStub(AbstractStub<?> stub) {
return ConsistingStub.<T>builder().stub((T) stub).build();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment