This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/master by this push: new 0628030 [SYNCOPE-1619] Boolean fix 0628030 is described below commit 062803068e88ac7838c4b1bc7c0de84c09184fde Author: Marco Di Sabatino Di Diodoro <marco.disabat...@tirasa.net> AuthorDate: Sat Feb 27 16:03:01 2021 +0100 [SYNCOPE-1619] Boolean fix --- .../java/org/apache/syncope/common/lib/types/AttrSchemaType.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java b/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java index cf93418..51acaed 100644 --- a/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java +++ b/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java @@ -49,8 +49,10 @@ public enum AttrSchemaType { } public static AttrSchemaType getAttrSchemaTypeByClass(final Class<?> type) { - return Stream.of(AttrSchemaType.values()) - .filter(item -> type == item.getType()).findFirst().orElse(AttrSchemaType.String); + return type == boolean.class + ? AttrSchemaType.Boolean + : Stream.of(AttrSchemaType.values()).filter(item -> type == item.getType()). + findFirst().orElse(AttrSchemaType.String); } }