abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r610974 - /incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/util/AutoReleasingInputStream.java
Date Thu, 10 Jan 2008 23:02:30 GMT
Author: jmsnell
Date: Thu Jan 10 15:02:30 2008
New Revision: 610974

URL: http://svn.apache.org/viewvc?rev=610974&view=rev
Log:
fix NPE caused under certain conditions

Modified:
    incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/util/AutoReleasingInputStream.java

Modified: incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/util/AutoReleasingInputStream.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/util/AutoReleasingInputStream.java?rev=610974&r1=610973&r2=610974&view=diff
==============================================================================
--- incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/util/AutoReleasingInputStream.java
(original)
+++ incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/util/AutoReleasingInputStream.java
Thu Jan 10 15:02:30 2008
@@ -35,6 +35,7 @@
 
   @Override
   public int read() throws IOException {
+    if (this.in == null) return -1;
     try {
       int r = super.read();
       if (r == -1) {
@@ -50,6 +51,7 @@
 
   @Override
   public int read(byte[] b, int off, int len) throws IOException {
+    if (this.in == null) return -1;
     try {
       int r= super.read(b, off, len);
       if (r == -1) {



Mime
View raw message