Maven Project Info Reports Plugin
  1. Maven Project Info Reports Plugin
  2. MPIR-199

ProjectInfoReportUtils.java : Avoid using blocking call [ url.openStream() ] while opening stream from an URL

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1, 2.1.2, 2.2
    • Fix Version/s: 2.3
    • Component/s: dependencies
    • Labels:
      None
    • Environment:
      any, with no internet connectivity [=~ intranet , behind proxy etc.. ]
    • Number of attachments :
      0

      Description

      This issue is related to http://jira.codehaus.org/browse/MPIR-150

      it would be nice if url.openStream();
      from

      ProjectInfoReportUtils.java
      InputStream in =null;
      
      try
      {
        in = url.openStream();
      

      can be replaced with

      //Define constant TIMEOUT with pre set timeout
       
        InputStream in =null;
      
        try
        {
         URLConnection conn = url.openConnection();
         conn.setConnectTimeout(TIMEOUT);
         conn.setReadTimeout(TIMEOUT);
         in = conn.getInputStream();
      

      url.openStream(); is a blocking call that makes caller wait forever and eventually timeouts at the end

        Activity

        Hide
        Vincent Siveton added a comment -

        fixed in r1036439, snapshot deployed

        Show
        Vincent Siveton added a comment - fixed in r1036439, snapshot deployed

          People

          • Assignee:
            Vincent Siveton
            Reporter:
            Prashant Bhate
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: