[ 
https://issues.apache.org/jira/browse/SLING-7258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16262261#comment-16262261
 ] 

Konrad Windszus edited comment on SLING-7258 at 11/22/17 10:44 AM:
-------------------------------------------------------------------

Can you use try with resources 
(https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html)
 instead so everything is properly closed with much less code? Also please use 
this constructor instead 
https://docs.oracle.com/javase/7/docs/api/java/io/InputStreamReader.html#InputStreamReader(java.io.InputStream,%20java.nio.charset.Charset)
 with 
https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html
 instead of the magic constant "UTF-8". Also making the field {{content}} final 
helps to get rid of the null check.


was (Author: kwin):
Can you use try with resources 
(https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html)
 instead so everything is properly closed with much less code? Also please use 
this constructor instead 
https://docs.oracle.com/javase/7/docs/api/java/io/InputStreamReader.html#InputStreamReader(java.io.InputStream,%20java.nio.charset.Charset)
 with 
https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html
 instead of the magic constant "UTF-8".

> org.apache.sling.starter.startup.impl.StartupFilter should return 503 when 
> Sling is starting
> --------------------------------------------------------------------------------------------
>
>                 Key: SLING-7258
>                 URL: https://issues.apache.org/jira/browse/SLING-7258
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Starter Startup 1.0.2
>            Reporter: Radu Cotescu
>            Assignee: Radu Cotescu
>             Fix For: Launchpad Builder 10, Starter Startup 1.0.4
>
>         Attachments: starting.png
>
>
> The {{org.apache.sling.starter.startup.impl.StartupFilter}} should return 503 
> when Sling is starting, since that's the correct state of the server until 
> it's ready to accept requests.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to