harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r692786 - /harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
Date Sun, 07 Sep 2008 08:28:32 GMT
Author: tellison
Date: Sun Sep  7 01:28:31 2008
New Revision: 692786

URL: http://svn.apache.org/viewvc?rev=692786&view=rev
Log:
Remove try catch block to let internal error escape.
Easier to debug actual error than track down anonymous exceptions.

Modified:
    harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java?rev=692786&r1=692785&r2=692786&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
Sun Sep  7 01:28:31 2008
@@ -323,31 +323,25 @@
      * @param bytes
      */
     public void unwrapSSLv2(byte[] bytes) {
+        io_stream.append(bytes);
+        io_stream.mark();
         try {
-            io_stream.append(bytes);
-            io_stream.mark();
-            try {
-                clientHello = new ClientHello(io_stream);
-            } catch (IOException e) {
-                io_stream.reset();
-                return;
-            }
-            if (nonBlocking) {
-                delegatedTasks.add(new DelegatedTask(
-                        new PrivilegedExceptionAction(){ 
-                    public Object run() throws Exception {
-                        processClientHello();
-                        return null;
+            clientHello = new ClientHello(io_stream);
+        } catch (IOException e) {
+            io_stream.reset();
+            return;
+        }
+        if (nonBlocking) {
+            delegatedTasks.add(new DelegatedTask(
+                    new PrivilegedExceptionAction() {
+                        public Object run() throws Exception {
+                            processClientHello();
+                            return null;
                         }
-                    },
-                    this,
-                    AccessController.getContext()));
-                return;
-            }
-            processClientHello();
-        } catch (Exception e) {
-            fatalAlert(AlertProtocol.INTERNAL_ERROR, "INTERNAL ERROR", e);
+                    }, this, AccessController.getContext()));
+            return;
         }
+        processClientHello();
     }
 
     /**



Mime
View raw message