Skip to content

Commit 90f97ae

Browse files
committed
Fixed #28
o Checking zOut for null otherwise i get a NPE during test with maven-archiver.
1 parent 189630b commit 90f97ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/codehaus/plexus/archiver/zip/AbstractZipArchiver.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,9 @@ protected void close()
779779
{
780780
if ( zipArchiveOutputStream != null )
781781
{
782-
zOut.writeTo( zipArchiveOutputStream );
782+
if ( zOut != null) {
783+
zOut.writeTo( zipArchiveOutputStream );
784+
}
783785
zipArchiveOutputStream.close();
784786
}
785787
}

0 commit comments

Comments
 (0)