[MNG-4864] npe when transferring artifacts

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1023501 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-10-17 13:51:13 +00:00
parent 267d537031
commit 5ab998fa4e
1 changed files with 6 additions and 3 deletions

View File

@ -57,9 +57,12 @@ class ConsoleMavenTransferListener
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();