incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmidd...@apache.org
Subject svn commit: r543566 - /incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceListener.java
Date Fri, 01 Jun 2007 18:28:32 GMT
Author: dmiddlem
Date: Fri Jun  1 11:28:31 2007
New Revision: 543566

URL: http://svn.apache.org/viewvc?view=rev&rev=543566
Log:
Adding some better handling for various invalid address scenarios.

Modified:
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceListener.java

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceListener.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceListener.java?view=diff&rev=543566&r1=543565&r2=543566
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceListener.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceListener.java
Fri Jun  1 11:28:31 2007
@@ -19,6 +19,7 @@
 
 package org.apache.yoko.bindings.corba.types;
 
+import org.apache.yoko.bindings.corba.utils.CorbaObjectReferenceHelper;
 import org.apache.yoko.bindings.corba.utils.CorbaUtils;
 
 import org.omg.CORBA.ORB;
@@ -40,7 +41,17 @@
     public void processCharacters(String text) {
         //REVISIT, just checking the address for now.
         if ((currentElement != null) && (currentElement.getLocalPart().equals("Address")))
{
-            org.omg.CORBA.Object ref = CorbaUtils.importObjectReference(orb, text);
+            org.omg.CORBA.Object ref = null;
+
+            if (text.equals(CorbaObjectReferenceHelper.ADDRESSING_NAMESPACE_URI + "/anonymous"))
{
+                throw new RuntimeException("Anonymous endpoint reference types not supported");
+            }
+
+            try {
+                ref = CorbaUtils.importObjectReference(orb, text);
+            } catch (org.omg.CORBA.BAD_PARAM ex) {
+                throw new RuntimeException("Unable to resolve CORBA object with address "
+ text);
+            }
             value.setReference(ref);
         }
     }



Mime
View raw message