syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [03/10] git commit: [SYNCOPE-558] Silence unwanted errors
Date Fri, 17 Oct 2014 12:04:19 GMT
[SYNCOPE-558] Silence unwanted errors


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/03a59e78
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/03a59e78
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/03a59e78

Branch: refs/heads/1_2_X
Commit: 03a59e783b270695162628c08fd5f048f8cc99fe
Parents: fd29227
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Fri Oct 17 14:01:58 2014 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Fri Oct 17 14:01:58 2014 +0200

----------------------------------------------------------------------
 .../console/pages/panels/LayoutsPanel.java        | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/03a59e78/console/src/main/java/org/apache/syncope/console/pages/panels/LayoutsPanel.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/panels/LayoutsPanel.java
b/console/src/main/java/org/apache/syncope/console/pages/panels/LayoutsPanel.java
index 48f7163..c061ea9 100644
--- a/console/src/main/java/org/apache/syncope/console/pages/panels/LayoutsPanel.java
+++ b/console/src/main/java/org/apache/syncope/console/pages/panels/LayoutsPanel.java
@@ -152,17 +152,21 @@ public class LayoutsPanel extends Panel {
         add(container);
     }
 
-    private AttributeTO getConfiguration(
-            final LayoutType layoutType, final AttributableType type) {
-        AttributeTO attributeTO = confRestClient.read(layoutType.getParameter());
-        if (attributeTO != null) {
-            return attributeTO;
-        } else {
+    private AttributeTO getConfiguration(final LayoutType layoutType, final AttributableType
type) {
+        AttributeTO attributeTO = null;
+        try {
+            attributeTO = confRestClient.read(layoutType.getParameter());
+        } catch (Exception e) {
+            // ignore
+        }
+
+        if (attributeTO == null) {
             attributeTO = new AttributeTO();
             attributeTO.setSchema(layoutType.getParameter());
             attributeTO.getValues().addAll(getAllFields(type));
-            return attributeTO;
         }
+
+        return attributeTO;
     }
 
     private List<String> getAllFields(final AttributableType type) {


Mime
View raw message