incubator-ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1190269 - /incubator/ace/trunk/ace-client-rest/src/main/java/org/apache/ace/client/rest/Workspace.java
Date Fri, 28 Oct 2011 12:18:13 GMT
Author: marrs
Date: Fri Oct 28 12:18:13 2011
New Revision: 1190269

URL: http://svn.apache.org/viewvc?rev=1190269&view=rev
Log:
ACE-196 applied the patch (which also had ACE-195 in it)

Modified:
    incubator/ace/trunk/ace-client-rest/src/main/java/org/apache/ace/client/rest/Workspace.java

Modified: incubator/ace/trunk/ace-client-rest/src/main/java/org/apache/ace/client/rest/Workspace.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-client-rest/src/main/java/org/apache/ace/client/rest/Workspace.java?rev=1190269&r1=1190268&r2=1190269&view=diff
==============================================================================
--- incubator/ace/trunk/ace-client-rest/src/main/java/org/apache/ace/client/rest/Workspace.java
(original)
+++ incubator/ace/trunk/ace-client-rest/src/main/java/org/apache/ace/client/rest/Workspace.java
Fri Oct 28 12:18:13 2011
@@ -168,8 +168,21 @@ public class Workspace {
         }
         else {
             if (ARTIFACT2FEATURE.equals(entityType) || FEATURE2DISTRIBUTION.equals(entityType)
|| DISTRIBUTION2TARGET.equals(entityType)) {
-                RepositoryObject left = getLeft(entityType, attributes.get("left"));
-                RepositoryObject right = getRight(entityType, attributes.get("right"));
+
+                String leftAttribute = attributes.get("left");
+                String rightAttribute = attributes.get("right");
+
+                RepositoryObject left = null;
+                if(leftAttribute != null) {
+                    left = getLeft(entityType, leftAttribute);
+                }
+
+                RepositoryObject right = null;
+                if(rightAttribute != null) {
+                    right = getRight(entityType, rightAttribute);
+                }
+
+
                 if (left != null) {
                     if (left instanceof StatefulGatewayObject) {
                         if (((StatefulGatewayObject) left).isRegistered()) {
@@ -215,8 +228,19 @@ public class Workspace {
             }
         }
         if (ARTIFACT2FEATURE.equals(entityType) || FEATURE2DISTRIBUTION.equals(entityType)
|| DISTRIBUTION2TARGET.equals(entityType)) {
-            RepositoryObject left = getLeft(entityType, repositoryObject.getAttribute("left"));
-            RepositoryObject right = getRight(entityType, repositoryObject.getAttribute("right"));
+            String leftAttribute = repositoryObject.getAttribute("left");
+            String rightAttribute = repositoryObject.getAttribute("right");
+
+            RepositoryObject left = null;
+            if (leftAttribute != null) {
+                left = getLeft(entityType, leftAttribute);
+            }
+
+            RepositoryObject right = null;
+            if (rightAttribute != null) {
+                right = getRight(entityType, rightAttribute);
+            }
+
             if (left != null) {
                 if (left instanceof StatefulGatewayObject) {
                     if (((StatefulGatewayObject) left).isRegistered()) {



Mime
View raw message