[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/marshal/http ...

Ron Sigal ron_sigal at yahoo.com
Thu Dec 7 16:43:30 EST 2006


  User: rsigal  
  Date: 06/12/07 16:43:30

  Modified:    src/main/org/jboss/remoting/marshal/http 
                        HTTPUnMarshaller.java
  Log:
  JBREM-635:  (1) Test for EOFException in read(). (2) No longer throws exception from isBinaryData().
  
  Revision  Changes    Path
  1.12      +11 -5     JBossRemoting/src/main/org/jboss/remoting/marshal/http/HTTPUnMarshaller.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: HTTPUnMarshaller.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/marshal/http/HTTPUnMarshaller.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -b -r1.11 -r1.12
  --- HTTPUnMarshaller.java	21 Nov 2006 05:49:49 -0000	1.11
  +++ HTTPUnMarshaller.java	7 Dec 2006 21:43:30 -0000	1.12
  @@ -31,6 +31,7 @@
   import java.io.BufferedReader;
   import java.io.ByteArrayInputStream;
   import java.io.ByteArrayOutputStream;
  +import java.io.EOFException;
   import java.io.IOException;
   import java.io.InputStream;
   import java.io.InputStreamReader;
  @@ -60,7 +61,16 @@
      public Object read(InputStream inputStream, Map metadata) throws IOException, ClassNotFoundException
      {
         if (isBinaryData(metadata))
  +      {
  +         try
  +         {
            return super.read(inputStream, metadata);
  +         }
  +         catch (EOFException e)
  +         {
  +            return null;
  +         }
  +      }
         
         int contentLength = -1;
         Object ret = null;
  @@ -205,10 +215,6 @@
               }
               isBinary = WebUtil.isBinary((String) value);
            }
  -         else
  -         {
  -            throw new IOException("Can not not determine data type because content-type not specified.");
  -         }
         }
         return isBinary;
      }
  
  
  



More information about the jboss-cvs-commits mailing list