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

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


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

  Modified:    src/main/org/jboss/remoting/marshal/http  Tag: remoting_2_x
                        HTTPUnMarshaller.java
  Log:
  JBREM-635:  (1) Test for EOFException in read(). (2) No longer throws exception from isBinaryData()
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.10.2.1  +9 -10     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.10
  retrieving revision 1.10.2.1
  diff -u -b -r1.10 -r1.10.2.1
  --- HTTPUnMarshaller.java	21 Sep 2006 07:37:03 -0000	1.10
  +++ HTTPUnMarshaller.java	7 Dec 2006 21:44:43 -0000	1.10.2.1
  @@ -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;
  @@ -59,14 +60,16 @@
       */
      public Object read(InputStream inputStream, Map metadata) throws IOException, ClassNotFoundException
      {
  +      if (isBinaryData(metadata))
  +      {
         try
         {
  -         if (isBinaryData(metadata))
               return super.read(inputStream, metadata);
         }
  -      catch (Exception e)
  +         catch (EOFException e)
         {
  -         log.warn("Can not get Content-Type from header for http unmarshalling.");
  +            return null;
  +         }
         }
         
         int contentLength = -1;
  @@ -212,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