[ 
http://jira.codehaus.org/browse/MPIR-199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vincent Siveton closed MPIR-199.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3
         Assignee: Vincent Siveton

fixed in r1036439, snapshot deployed

> ProjectInfoReportUtils.java : Avoid using blocking call [ url.openStream() ] 
> while opening stream from an URL
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: MPIR-199
>                 URL: http://jira.codehaus.org/browse/MPIR-199
>             Project: Maven 2.x Project Info Reports Plugin
>          Issue Type: Bug
>          Components: dependencies
>    Affects Versions: 2.1.1, 2.1.2, 2.2
>         Environment: any, with no internet connectivity [=~ intranet , behind 
> proxy etc.. ]
>            Reporter: Prashant  Bhate
>            Assignee: Vincent Siveton
>             Fix For: 2.3
>
>
> This issue is related to  http://jira.codehaus.org/browse/MPIR-150 
> it would be nice if  {{url.openStream();}} 
> from
> {code:title=ProjectInfoReportUtils.java|borderStyle=solid}
> InputStream in =null;
> try
> {
>   in = url.openStream();
> {code}
> can be replaced with 
> {code}
> //Define constant TIMEOUT with pre set timeout
>  
>   InputStream in =null;
>   try
>   {
>    URLConnection conn = url.openConnection();
>    conn.setConnectTimeout(TIMEOUT);
>    conn.setReadTimeout(TIMEOUT);
>    in = conn.getInputStream();
> {code}
> {{url.openStream();}} is a blocking call that makes caller wait forever and 
> eventually timeouts at the end

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to