syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreapatrice...@apache.org
Subject [syncope] branch 2_0_X updated: removed unnecessary if statement
Date Tue, 04 Jun 2019 09:11:16 GMT
This is an automated email from the ASF dual-hosted git repository.

andreapatricelli pushed a commit to branch 2_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/2_0_X by this push:
     new 88c6bd6  removed unnecessary if statement
88c6bd6 is described below

commit 88c6bd6af9685903648f2040b7d9312a24d39b76
Author: Andrea Patricelli <andreapatricelli@apache.org>
AuthorDate: Tue Jun 4 11:11:05 2019 +0200

    removed unnecessary if statement
---
 .../syncope/client/console/panels/SchemaTypePanel.java       | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
index 91a995b..01ab5a3 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
@@ -304,13 +304,11 @@ public class SchemaTypePanel extends TypesDirectoryPanel<SchemaTO,
SchemaProvide
             AjaxRequestTarget target = payload.getTarget();
 
             keyword = payload.getKeyword();
-            if (keyword != null) {
-                if (!keyword.startsWith("*")) {
-                    keyword = "*" + keyword;
-                }
-                if (!keyword.endsWith("*")) {
-                    keyword = keyword + "*";
-                }
+            if (!StringUtils.startsWith(keyword, "*")) {
+                keyword = "*" + keyword;
+            }
+            if (!StringUtils.endsWith(keyword, "*")) {
+                keyword = keyword + "*";
             }
 
             updateResultTable(target);


Mime
View raw message