Author: asankha
Date: Sat Oct 28 10:21:03 2006
New Revision: 468705

URL: http://svn.apache.org/viewvc?view=rev&rev=468705
Log:
replace use of assert with an exception

Modified:
    
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/ProxyService.java

Modified: 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/ProxyService.java
URL: 
http://svn.apache.org/viewvc/incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/ProxyService.java?view=diff&rev=468705&r1=468704&r2=468705
==============================================================================
--- 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/ProxyService.java
 (original)
+++ 
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/ProxyService.java
 Sat Oct 28 10:21:03 2006
@@ -110,7 +110,9 @@
                         handleException("Unknown WSDL format.. not WSDL 1.1 or 
WSDL 2.0");
                     }
 
-                    assert wsdlToAxisServiceBuilder != null;
+                    if (wsdlToAxisServiceBuilder == null) {
+                        throw new SynapseException("Could not get the WSDL to 
Axis Service Builder");
+                    }
                     proxyService = wsdlToAxisServiceBuilder.populateService();
                     proxyService.setWsdlFound(true);
 
@@ -136,7 +138,9 @@
 
         // Set the name and description. Currently Axis2 uses the name as the
         // default Service destination
-        assert proxyService != null;
+        if (proxyService == null) {
+            throw new SynapseException("Could not create a proxy service");
+        }
         proxyService.setName(name);
         if (description != null) {
             proxyService.setServiceDescription(description);



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to