You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2013/11/21 14:39:59 UTC

svn commit: r1544175 - /syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConnectorRestClient.java

Author: ilgrosso
Date: Thu Nov 21 13:39:59 2013
New Revision: 1544175

URL: http://svn.apache.org/r1544175
Log:
Wrong collection operation order

Modified:
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConnectorRestClient.java

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConnectorRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConnectorRestClient.java?rev=1544175&r1=1544174&r2=1544175&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConnectorRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConnectorRestClient.java Thu Nov 21 13:39:59 2013
@@ -57,8 +57,9 @@ public class ConnectorRestClient extends
     }
 
     public void create(final ConnInstanceTO connectorTO) {
+        Set<ConnConfProperty> filteredConf = filterProperties(connectorTO.getConfiguration());
         connectorTO.getConfiguration().clear();
-        connectorTO.getConfiguration().addAll(filterProperties(connectorTO.getConfiguration()));
+        connectorTO.getConfiguration().addAll(filteredConf);
         getService(ConnectorService.class).create(connectorTO);
     }
 
@@ -81,8 +82,9 @@ public class ConnectorRestClient extends
     }
 
     public void update(final ConnInstanceTO connectorTO) {
+        Set<ConnConfProperty> filteredConf = filterProperties(connectorTO.getConfiguration());
         connectorTO.getConfiguration().clear();
-        connectorTO.getConfiguration().addAll(filterProperties(connectorTO.getConfiguration()));
+        connectorTO.getConfiguration().addAll(filteredConf);
         getService(ConnectorService.class).update(connectorTO.getId(), connectorTO);
     }
 
@@ -152,7 +154,7 @@ public class ConnectorRestClient extends
      */
     public boolean check(final ConnInstanceTO connectorTO) {
         ConnInstanceTO toBeChecked = new ConnInstanceTO();
-        BeanUtils.copyProperties(connectorTO, toBeChecked, new String[] {"configuration", "configurationMap"});
+        BeanUtils.copyProperties(connectorTO, toBeChecked, new String[] { "configuration", "configurationMap" });
         toBeChecked.getConfiguration().addAll(filterProperties(connectorTO.getConfiguration()));
 
         boolean check = false;