diff options
Diffstat (limited to 'container-core/src/main/java/com/yahoo/processing')
8 files changed, 22 insertions, 38 deletions
diff --git a/container-core/src/main/java/com/yahoo/processing/handler/ProcessingResponse.java b/container-core/src/main/java/com/yahoo/processing/handler/ProcessingResponse.java index 2727d111829..a8ccc28c751 100644 --- a/container-core/src/main/java/com/yahoo/processing/handler/ProcessingResponse.java +++ b/container-core/src/main/java/com/yahoo/processing/handler/ProcessingResponse.java @@ -31,8 +31,7 @@ import com.yahoo.processing.response.DataList; * wrapper of the knowhow needed to render the Response from processing. * * @author bratseth - * @author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a> - * @since 5.1.12 + * @author Steinar Knutsen */ public class ProcessingResponse extends AsyncHttpResponse { @@ -44,7 +43,6 @@ public class ProcessingResponse extends AsyncHttpResponse { /** True if the return status has been set explicitly and should not be further changed */ private boolean explicitStatusSet = false; - @SuppressWarnings("unchecked") public ProcessingResponse(int status, com.yahoo.processing.Request processingRequest, com.yahoo.processing.Response processingResponse, Renderer renderer, diff --git a/container-core/src/main/java/com/yahoo/processing/handler/ProcessingTestDriver.java b/container-core/src/main/java/com/yahoo/processing/handler/ProcessingTestDriver.java index 8fc0b49c71b..d4e55dbc556 100644 --- a/container-core/src/main/java/com/yahoo/processing/handler/ProcessingTestDriver.java +++ b/container-core/src/main/java/com/yahoo/processing/handler/ProcessingTestDriver.java @@ -23,7 +23,6 @@ import java.util.concurrent.Executors; * Create an instance of this to test making processing requests and get the response or response data. * * @author bratseth - * @since 5.21 */ @Beta public class ProcessingTestDriver extends RequestHandlerTestDriver { @@ -31,20 +30,20 @@ public class ProcessingTestDriver extends RequestHandlerTestDriver { private final ProcessingHandler processingHandler; public ProcessingTestDriver(Collection<Chain<Processor>> chains) { - this(chains, new ComponentRegistry<Renderer>()); + this(chains, new ComponentRegistry<>()); } public ProcessingTestDriver(String binding, Collection<Chain<Processor>> chains) { - this(chains, new ComponentRegistry<Renderer>()); + this(chains, new ComponentRegistry<>()); } @SafeVarargs @SuppressWarnings("varargs") public ProcessingTestDriver(Chain<Processor> ... chains) { - this(Arrays.asList(chains), new ComponentRegistry<Renderer>()); + this(Arrays.asList(chains), new ComponentRegistry<>()); } @SafeVarargs @SuppressWarnings("varargs") public ProcessingTestDriver(String binding, Chain<Processor> ... chains) { - this(binding, Arrays.asList(chains), new ComponentRegistry<Renderer>()); + this(binding, Arrays.asList(chains), new ComponentRegistry<>()); } public ProcessingTestDriver(Collection<Chain<Processor>> chains, ComponentRegistry<Renderer> renderers) { this(createProcessingHandler(chains, renderers, AccessLog.voidAccessLog())); @@ -64,7 +63,7 @@ public class ProcessingTestDriver extends RequestHandlerTestDriver { public ProcessingTestDriver(Chain<Processor> chain, AccessLogInterface accessLogInterface) { this(createProcessingHandler( Collections.singleton(chain), - new ComponentRegistry<Renderer>(), + new ComponentRegistry<>(), createAccessLog(accessLogInterface))); } @@ -76,10 +75,9 @@ public class ProcessingTestDriver extends RequestHandlerTestDriver { return new AccessLog(componentRegistry); } - private static ProcessingHandler createProcessingHandler( - Collection<Chain<Processor>> chains, - ComponentRegistry<Renderer> renderers, - AccessLog accessLog) { + private static ProcessingHandler createProcessingHandler(Collection<Chain<Processor>> chains, + ComponentRegistry<Renderer> renderers, + AccessLog accessLog) { Executor executor = Executors.newSingleThreadExecutor(); ChainRegistry<Processor> registry = new ChainRegistry<>(); diff --git a/container-core/src/main/java/com/yahoo/processing/handler/ResponseHeaders.java b/container-core/src/main/java/com/yahoo/processing/handler/ResponseHeaders.java index 0267b892878..3a21c5a3ec9 100644 --- a/container-core/src/main/java/com/yahoo/processing/handler/ResponseHeaders.java +++ b/container-core/src/main/java/com/yahoo/processing/handler/ResponseHeaders.java @@ -14,7 +14,6 @@ import java.util.Map; * A Response may contain multiple such data objects, and all of them will be added to the response. * * @author bratseth - * @since 5.1.23 */ public class ResponseHeaders extends AbstractData { diff --git a/container-core/src/main/java/com/yahoo/processing/processors/RequestPropertyTracer.java b/container-core/src/main/java/com/yahoo/processing/processors/RequestPropertyTracer.java index e08cf013c19..a42b027b795 100644 --- a/container-core/src/main/java/com/yahoo/processing/processors/RequestPropertyTracer.java +++ b/container-core/src/main/java/com/yahoo/processing/processors/RequestPropertyTracer.java @@ -12,8 +12,7 @@ import java.util.Map; * A processor which adds the current content of the Request.properties() to * the trace before calling the next processor, if traceLevel is 4 or more. * - * @author bratseth - * @since 5.1.17 + * @author bratseth */ public class RequestPropertyTracer extends Processor { diff --git a/container-core/src/main/java/com/yahoo/processing/rendering/AsynchronousRenderer.java b/container-core/src/main/java/com/yahoo/processing/rendering/AsynchronousRenderer.java index b6298558ff9..eb39c4c8117 100644 --- a/container-core/src/main/java/com/yahoo/processing/rendering/AsynchronousRenderer.java +++ b/container-core/src/main/java/com/yahoo/processing/rendering/AsynchronousRenderer.java @@ -20,8 +20,7 @@ public abstract class AsynchronousRenderer <RESPONSE extends Response> extends R * Exposes JDisc wiring to ensure asynchronous cleanup. * * @param channel the channel to the client receiving the response - * @param completionHandler the JDisc completion handler which will be invoked at the end - * of the rendering + * @param completionHandler the JDisc completion handler which will be invoked at the end of the rendering * @throws IllegalStateException if attempted invoked more than once */ public abstract void setNetworkWiring(ContentChannel channel, CompletionHandler completionHandler); 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 fdc3b63fc92..f86cad7c619 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 @@ -53,10 +53,8 @@ public abstract class AsynchronousSectionedRenderer<RESPONSE extends Response> e * stream to be used throughput the rendering. Subsequent calls must use the * same stream. * - * @param stream - * the stream to render to in this and all subsequent calls. - * @throws IOException - * passed on from the stream + * @param stream the stream to render to in this and all subsequent calls. + * @throws IOException passed on from the stream */ public abstract void beginResponse(OutputStream stream) throws IOException; diff --git a/container-core/src/main/java/com/yahoo/processing/rendering/ProcessingRenderer.java b/container-core/src/main/java/com/yahoo/processing/rendering/ProcessingRenderer.java index 556eec9b460..052c1c3f7f5 100644 --- a/container-core/src/main/java/com/yahoo/processing/rendering/ProcessingRenderer.java +++ b/container-core/src/main/java/com/yahoo/processing/rendering/ProcessingRenderer.java @@ -167,7 +167,7 @@ public class ProcessingRenderer extends AsynchronousSectionedRenderer<Response> private static class TraceRenderingVisitor extends TraceVisitor { - private JSONWriter jsonWriter; + private final JSONWriter jsonWriter; public TraceRenderingVisitor(JSONWriter jsonWriter) { this.jsonWriter = jsonWriter; @@ -226,4 +226,5 @@ public class ProcessingRenderer extends AsynchronousSectionedRenderer<Response> return (IOException) super.getCause(); } } + } 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 d04eda943af..a7fa557f71a 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 @@ -46,16 +46,11 @@ public abstract class Renderer<RESPONSE extends Response> extends AbstractCompon * exception causing failure wrapped in an ExecutionException if rendering * was not successful. * - * @param stream - * a stream API bridge to JDisc - * @param response - * the response to render - * @param execution - * the execution which created this response - * @param request - * the request matching the response - * @return a ListenableFuture containing a boolean where true indicates a - * successful rendering + * @param stream a stream API bridge to JDisc + * @param response the response to render + * @param execution the execution which created this response + * @param request the request matching the response + * @return a ListenableFuture containing a boolean where true indicates a successful rendering */ public abstract ListenableFuture<Boolean> render(OutputStream stream, RESPONSE response, Execution execution, Request request); @@ -63,17 +58,14 @@ public abstract class Renderer<RESPONSE extends Response> extends AbstractCompon /** * Name of the output encoding, if applicable. * - *<p>TODO: ensure null is OK - * - * @return The encoding of the output if applicable, e.g. "utf-8" + * @return the encoding of the output if applicable, e.g. "utf-8" */ public abstract String getEncoding(); /** * The MIME type of the rendered content sent to the client. * - * @return The mime type of the data written to the writer, e.g. - * "text/plain" + * @return The mime type of the data written to the writer, e.g. "text/plain" */ public abstract String getMimeType(); |