Author: rajith
Date: Tue Nov  3 14:55:30 2009
New Revision: 832441

URL: http://svn.apache.org/viewvc?rev=832441&view=rev
Log:
This is for QPID-2176
Rob had already added the null check.
I added a ProtocolViolationException, that will be thrown if we receive any 
frames for an already detached session.

Added:
    
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/ProtocolViolationException.java
Modified:
    
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java

Modified: 
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java?rev=832441&r1=832440&r2=832441&view=diff
==============================================================================
--- 
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java
 (original)
+++ 
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java
 Tue Nov  3 14:55:30 2009
@@ -322,7 +322,8 @@
         }
         else
         {
-            // TODO
+            throw new ProtocolViolationException(
+                                       "Received frames for an already 
dettached session", null);
         }
     }
 

Added: 
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/ProtocolViolationException.java
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/ProtocolViolationException.java?rev=832441&view=auto
==============================================================================
--- 
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/ProtocolViolationException.java
 (added)
+++ 
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/ProtocolViolationException.java
 Tue Nov  3 14:55:30 2009
@@ -0,0 +1,35 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.transport;
+
+
+/**
+ * ProtocolViolationException
+ *
+ */
+
+public final class ProtocolViolationException extends ConnectionException
+{
+    public ProtocolViolationException(String msg,Throwable cause)
+    {
+        super(msg, cause);
+    }
+}



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to