[logback-dev] svn commit: r1234 - logback/trunk/logback-access/src/main/java/ch/qos/logback/access/spi

noreply.ceki at qos.ch noreply.ceki at qos.ch
Tue Jan 16 17:32:11 CET 2007


Author: ceki
Date: Tue Jan 16 17:32:10 2007
New Revision: 1234

Modified:
   logback/trunk/logback-access/src/main/java/ch/qos/logback/access/spi/Util.java

Log:
defend against null InputStream

Modified: logback/trunk/logback-access/src/main/java/ch/qos/logback/access/spi/Util.java
==============================================================================
--- logback/trunk/logback-access/src/main/java/ch/qos/logback/access/spi/Util.java	(original)
+++ logback/trunk/logback-access/src/main/java/ch/qos/logback/access/spi/Util.java	Tue Jan 16 17:32:10 2007
@@ -8,6 +8,9 @@
   static final int BUF_SIZE= 128;
   
   public static String readToString(InputStream in) throws IOException {
+    if(in == null) {
+      return null;
+    }
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     byte[] buf = new byte[BUF_SIZE];
     int n = 0;



More information about the logback-dev mailing list