From 3ff15111ce265956777dcb861867388b87fda1a8 Mon Sep 17 00:00:00 2001 From: Jon Bratseth Date: Tue, 13 Jun 2023 17:06:09 +0200 Subject: Non-functional changes only --- .../rendering/AsynchronousSectionedRenderer.java | 18 +++++++++--------- .../java/com/yahoo/processing/rendering/Renderer.java | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'container-core/src/main/java/com/yahoo/processing/rendering') diff --git a/container-core/src/main/java/com/yahoo/processing/rendering/AsynchronousSectionedRenderer.java b/container-core/src/main/java/com/yahoo/processing/rendering/AsynchronousSectionedRenderer.java index 2749b73272d..246286ea1e6 100644 --- a/container-core/src/main/java/com/yahoo/processing/rendering/AsynchronousSectionedRenderer.java +++ b/container-core/src/main/java/com/yahoo/processing/rendering/AsynchronousSectionedRenderer.java @@ -143,7 +143,7 @@ public abstract class AsynchronousSectionedRenderer e } /** - * Create an renderer using the specified executor instead of the default one which should be used for production. + * Create a renderer using the specified executor instead of the default one which should be used for production. * Using a custom executor is useful for tests to avoid creating new threads for each renderer registry. * * @param executor the executor to use or null to use the default executor suitable for production @@ -226,7 +226,7 @@ public abstract class AsynchronousSectionedRenderer e this.response = response; this.stream = stream; this.execution = execution; - DataListListener parentOfTopLevelListener = new DataListListener(new ParentOfTopLevel(request,response.data()), null); + DataListListener parentOfTopLevelListener = new DataListListener(new ParentOfTopLevel(request, response.data()), null); dataListListenerStack.addFirst(parentOfTopLevelListener); success = new CompletableFuture<>(); try { @@ -264,13 +264,13 @@ public abstract class AsynchronousSectionedRenderer e /** * How deep into the tree of nested data lists the callback currently is. - * beginList() is invoked after this this is increased, and endList() is + * beginList() is invoked after this is increased, and endList() is * invoked before it is decreased. * * @return an integer of 1 or above */ public int getRecursionLevel() { - return dataListListenerStack.size()-1; + return dataListListenerStack.size() - 1; } /** @@ -406,7 +406,7 @@ public abstract class AsynchronousSectionedRenderer e /** Renders a list. */ private void renderDataList(DataList list) throws IOException { - final boolean ordered = isOrdered(list); + boolean ordered = isOrdered(list); if (list.asList() == null) { logger.log(Level.WARNING, "DataList.asList() returned null, indicating it is closed. " + "This is likely caused by adding the same list multiple " + @@ -565,9 +565,9 @@ public abstract class AsynchronousSectionedRenderer e */ private static class ParentOfTopLevel extends AbstractDataList { - private DataList trueTopLevel; + private final DataList trueTopLevel; - public ParentOfTopLevel(Request request,DataList trueTopLevel) { + public ParentOfTopLevel(Request request, DataList trueTopLevel) { super(request); this.trueTopLevel = trueTopLevel; freeze(); @@ -585,13 +585,13 @@ public abstract class AsynchronousSectionedRenderer e @Override public Data get(int index) { - if (index>0) throw new IndexOutOfBoundsException(); + if (index > 0) throw new IndexOutOfBoundsException(); return trueTopLevel; } @Override public List asList() { - return Collections.singletonList(trueTopLevel); + return Collections.singletonList(trueTopLevel); } @Override diff --git a/container-core/src/main/java/com/yahoo/processing/rendering/Renderer.java b/container-core/src/main/java/com/yahoo/processing/rendering/Renderer.java index df53ac846f2..97ca0bfb6a4 100644 --- a/container-core/src/main/java/com/yahoo/processing/rendering/Renderer.java +++ b/container-core/src/main/java/com/yahoo/processing/rendering/Renderer.java @@ -53,7 +53,7 @@ public abstract class Renderer extends AbstractCompon * @return a {@link CompletableFuture} containing a boolean where true indicates a successful rendering */ public abstract CompletableFuture renderResponse(OutputStream stream, RESPONSE response, - Execution execution, Request request); + Execution execution, Request request); /** * Name of the output encoding, if applicable. -- cgit v1.2.3