@@ -43,8 +43,6 @@ final class ResultQueue {
4343
4444 private final LinkedBlockingQueue <Result > resultLinkedBlockingQueue ;
4545
46- private Object aggregatedResult = null ;
47-
4846 private final AtomicReference <Throwable > error = new AtomicReference <>();
4947
5048 private final CompletableFuture <Void > readComplete ;
@@ -68,14 +66,6 @@ public void add(final Result result) {
6866 tryDrainNextWaiting (false );
6967 }
7068
71- private <V > V validate (final String aggregateTo , final Class <?> expected ) {
72- if (!(expected .isAssignableFrom (aggregatedResult .getClass ())))
73- throw new IllegalStateException (String .format ("Side-effect \" %s\" contains the type %s that is not acceptable for %s" ,
74- aggregatedResult .getClass ().getSimpleName (), aggregateTo ));
75-
76- return (V ) aggregatedResult ;
77- }
78-
7969 public CompletableFuture <List <Result >> await (final int items ) {
8070 final CompletableFuture <List <Result >> result = new CompletableFuture <>();
8171 waiting .add (Pair .with (result , items ));
@@ -105,11 +95,6 @@ void drainTo(final Collection<Result> collection) {
10595 }
10696
10797 void markComplete (final Map <String ,Object > statusAttributes ) {
108- // if there was some aggregation performed in the queue then the full object is hanging out waiting to be
109- // added to the ResultSet
110- if (aggregatedResult != null )
111- add (new Result (aggregatedResult ));
112-
11398 this .statusAttributes = null == statusAttributes ? Collections .emptyMap () : statusAttributes ;
11499
115100 this .readComplete .complete (null );
0 commit comments