You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by md...@apache.org on 2018/03/28 08:17:37 UTC

syncope git commit: Fixed NullPointer message when logs are in debug mode

Repository: syncope
Updated Branches:
  refs/heads/1_2_X 3b9ef4107 -> 1ed1bee11


Fixed NullPointer message when logs are in debug mode


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

Branch: refs/heads/1_2_X
Commit: 1ed1bee1112dc10f2b67a2ba285a3c9fceacb42b
Parents: 3b9ef41
Author: Marco Di Sabatino Di Diodoro <ma...@tirasa.net>
Authored: Wed Mar 28 10:17:21 2018 +0200
Committer: Marco Di Sabatino Di Diodoro <ma...@tirasa.net>
Committed: Wed Mar 28 10:17:21 2018 +0200

----------------------------------------------------------------------
 .../syncope/core/rest/controller/SchemaController.java       | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/1ed1bee1/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java b/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java
index 69a41c9..bd9e1dd 100644
--- a/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java
+++ b/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java
@@ -280,13 +280,11 @@ public class SchemaController extends AbstractTransactionalController<SchemaTO>
         if (ArrayUtils.isNotEmpty(args)) {
             for (int i = 0; (name == null || kind == null) && i < args.length; i++) {
                 if (args[i] instanceof String) {
-                    if (kind == null) {
-                        kind = (String) args[i];
-                    } else {
-                        name = (String) args[i];
-                    }
+                    name = (String) args[i];
                 } else if (args[i] instanceof SchemaTO) {
                     name = ((SchemaTO) args[i]).getName();
+                } else if (args[i] instanceof AttributableType) {
+                    kind = ((AttributableType) args[i]).name();
                 }
             }
         }