[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [ernie/master] Don't break when parsing tarballs with empty files.



Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Thu, 8 Apr 2010 15:58:39 +0200
Subject: Don't break when parsing tarballs with empty files.
Commit: 8e5344e86d867b10188e22e732b17f7b6cd9b92a

---
 src/BridgeSnapshotReader.java |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/BridgeSnapshotReader.java b/src/BridgeSnapshotReader.java
index 792b539..8cadcc5 100644
--- a/src/BridgeSnapshotReader.java
+++ b/src/BridgeSnapshotReader.java
@@ -64,6 +64,9 @@ public class BridgeSnapshotReader {
                   baos.write(data, 0, len);
                 }
                 byte[] allData = baos.toByteArray();
+                if (allData.length == 0) {
+                  continue;
+                }
                 String ascii = new String(allData, "US-ASCII");
                 BufferedReader br3 = new BufferedReader(new StringReader(
                     ascii));
-- 
1.6.5