You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Brill Pappin (JIRA)" <ji...@apache.org> on 2008/04/07 16:53:25 UTC

[jira] Created: (WICKET-1490) Small iprovement to the Start.java generated by the maven archtype

Small iprovement to the Start.java generated by the maven archtype
------------------------------------------------------------------

                 Key: WICKET-1490
                 URL: https://issues.apache.org/jira/browse/WICKET-1490
             Project: Wicket
          Issue Type: Improvement
          Components: wicket-quickstart
    Affects Versions: 1.3.3
            Reporter: Brill Pappin
            Priority: Minor


The maven archtype generates a very useful class called Start.java in src/test/java.

It uses a loop to receive input to know when it should shut down.

On line Start.java:36
while (System.in.available() == 0) {
    Thread.sleep(5000);
}

should be replaced with:
System.in.read();
System.out.println("Stopping embedded Jetty server...");

essentially instead of going into the sleep loop, we're using the blocking aspect of the input stream to know when we should allow the thread to exit.

			

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-1490) Small iprovement to the Start.java generated by the maven archtype

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag resolved WICKET-1490.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4-RC2
         Assignee: Juergen Donnerstag

thanks

> Small iprovement to the Start.java generated by the maven archtype
> ------------------------------------------------------------------
>
>                 Key: WICKET-1490
>                 URL: https://issues.apache.org/jira/browse/WICKET-1490
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-quickstart
>    Affects Versions: 1.3.3
>            Reporter: Brill Pappin
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>             Fix For: 1.4-RC2
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> The maven archtype generates a very useful class called Start.java in src/test/java.
> It uses a loop to receive input to know when it should shut down.
> On line Start.java:36
> while (System.in.available() == 0) {
>     Thread.sleep(5000);
> }
> should be replaced with:
> System.in.read();
> System.out.println("Stopping embedded Jetty server...");
> essentially instead of going into the sleep loop, we're using the blocking aspect of the input stream to know when we should allow the thread to exit.
> 			

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.