Author: keith
Date: Wed Apr 23 04:14:29 2008
New Revision: 16054

Log:

We can use userRegistry.resourceExists(path1) instead of getting the resource 
and checking for it


Modified:
   trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java

Modified: 
trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java
==============================================================================
--- trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java   
(original)
+++ trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java   
Wed Apr 23 04:14:29 2008
@@ -830,15 +830,7 @@
             ResourceImpl resource1;
 
             //todo: Workaround to figure out whether the resource is deleted. 
Remove when registry implements undelete/rollback.
-            boolean resourceExists = false;
-            try {
-                userRegistry.get(path1);
-                resourceExists = true;
-            } catch (RegistryException e) {
-                //just swallowing the exception
-            }
-
-            if (resourceExists) {
+            if (userRegistry.resourceExists(path1)) {
                 //Getting the existing latest version from the registry
                 resource1 = (ResourceImpl) userRegistry.get(path1);
 

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to