Skip to content

Commit

Permalink
[MNG-4864] npe when transferring artifacts
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1023501 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
bentmann committed Oct 17, 2010
1 parent 267d537 commit 5ab998f
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ public void transferProgressed( TransferEvent event )
for ( Map.Entry<TransferResource, Long> entry : downloads.entrySet() )
{
long total = entry.getKey().getContentLength();
long complete = entry.getValue().longValue();

buffer.append( getStatus( complete, total ) ).append( " " );
Long complete = entry.getValue();
// NOTE: This null check guards against http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6312056
if ( complete != null )
{
buffer.append( getStatus( complete.longValue(), total ) ).append( " " );
}
}

int pad = lastLength - buffer.length();
Expand Down

0 comments on commit 5ab998f

Please sign in to comment.