Source:
<code>HttpResponse validateAndStoreSpans(SpanBytesDecoder decoder, ServiceRequestContext ctx, HttpRequest req) { CompletableCallback result = new CompletableCallback(); <START> CompletableFuture<AggregatedHttpRequest> requestFuture = ctx.makeContextAware( <END> req.aggregateWithPooledObjects(ctx.eventLoop(), ctx.alloc()) ); requestFuture.handle((msg, t) -> { if (t != null) { result.onError(t); return null; } final HttpData content; try { content = UnzippingBytesRequestConverter.convertRequest(ctx, msg); } catch (IllegalArgumentException e) { result.onError(e); return null; } try { if (content.isEmpty()) { result.onSuccess(null); return null; } final ByteBuffer nioBuffer; if (content instanceof ByteBufHolder) { nioBuffer = ((ByteBufHolder) content).content().nioBuffer(); } else { nioBuffer = ByteBuffer.wrap(content.array()); } try { SpanBytesDecoderDetector.decoderForListMessage(nioBuffer); } catch (IllegalArgumentException e) { result.onError(new IllegalArgumentException("Expected a " + decoder + " encoded list\n")); return null; } SpanBytesDecoder unexpectedDecoder = testForUnexpectedFormat(decoder, nioBuffer); if (unexpectedDecoder != null) { result.onError(new IllegalArgumentException( "Expected a " + decoder + " encoded list, but received: " + unexpectedDecoder + "\n")); return null; } List<Span> spans = new ArrayList<>(); if (!decoder.decodeList(nioBuffer, spans)) { result.onError(new IllegalArgumentException("Empty " + decoder.name() + " message")); return null; } collector.accept(spans, result); } finally { ReferenceCountUtil.release(content); } return null; }); return HttpResponse.from(result); }</code><technical_language>Hmm - a bit surprised aggregator call callback right executor, case, I simpler req.aggregate(...).handleAsync((), ctx.contextAwareExecutor())</technical_language>

Target:
HttpResponse validateAndStoreSpans(SpanBytesDecoder decoder, ServiceRequestContext ctx, HttpRequest req) { CompletableCallback result = new CompletableCallback(); req.aggregateWithPooledObjects(ctx.eventLoop(), ctx.alloc()).handleAsync((msg, t) -> { if (t != null) { result.onError(t); return null; } final HttpData content; try { content = UnzippingBytesRequestConverter.convertRequest(ctx, msg); } catch (IllegalArgumentException e) { result.onError(e); return null; } try { if (content.isEmpty()) { result.onSuccess(null); return null; } final ByteBuffer nioBuffer; if (content instanceof ByteBufHolder) { nioBuffer = ((ByteBufHolder) content).content().nioBuffer(); } else { nioBuffer = ByteBuffer.wrap(content.array()); } try { SpanBytesDecoderDetector.decoderForListMessage(nioBuffer); } catch (IllegalArgumentException e) { result.onError(new IllegalArgumentException("Expected a " + decoder + " encoded list\n")); return null; } SpanBytesDecoder unexpectedDecoder = testForUnexpectedFormat(decoder, nioBuffer); if (unexpectedDecoder != null) { result.onError(new IllegalArgumentException( "Expected a " + decoder + " encoded list, but received: " + unexpectedDecoder + "\n")); return null; } List<Span> spans = new ArrayList<>(); if (!decoder.decodeList(nioBuffer, spans)) { result.onError(new IllegalArgumentException("Empty " + decoder.name() + " message")); return null; } collector.accept(spans, result); } finally { ReferenceCountUtil.release(content); } return null; }, ctx.contextAwareExecutor()); return HttpResponse.from(result); }