syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreapatrice...@apache.org
Subject syncope git commit: fixed typo and removed unuseful string builder
Date Tue, 29 Dec 2015 12:19:15 GMT
Repository: syncope
Updated Branches:
  refs/heads/master d35f028dd -> 2261b8243


fixed typo and removed unuseful string builder


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

Branch: refs/heads/master
Commit: 2261b8243435bd7197bf2c172c8d98bcc67b3a43
Parents: d35f028
Author: Andrea Patricelli <andrea.patricelli@tirasa.net>
Authored: Tue Dec 29 13:18:53 2015 +0100
Committer: Andrea Patricelli <andrea.patricelli@tirasa.net>
Committed: Tue Dec 29 13:18:53 2015 +0100

----------------------------------------------------------------------
 .../enduser/resources/CaptchaValidateResource.java       |  7 +++----
 .../client/enduser/resources/UserSelfCreateResource.java | 11 +++++++----
 2 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/2261b824/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/CaptchaValidateResource.java
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/CaptchaValidateResource.java
b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/CaptchaValidateResource.java
index 28502b8..be07096 100644
--- a/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/CaptchaValidateResource.java
+++ b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/CaptchaValidateResource.java
@@ -55,10 +55,9 @@ public class CaptchaValidateResource extends AbstractBaseResource {
 
             if (StringUtils.isBlank(currentCaptcha) || enteredCaptcha == null) {
                 LOG.info("Could not validate captcha: current session captcha or inserted
captcha are empty or null");
-                response.setError(Response.Status.BAD_REQUEST.getStatusCode(), new StringBuilder()
-                        .append("ErrorMessage{{ Could not validate captcha: current session
captcha or entered")
-                        .append(" captcha areempty or null }}")
-                        .toString());
+                response.setError(Response.Status.BAD_REQUEST.getStatusCode(),
+                        "ErrorMessage{{ Could not validate captcha: current session captcha
or entered captcha are "
+                                + "empty or null }}");
             } else {
                 LOG.info("Is entered captcha equal to current session captcha? {}", enteredCaptcha.getValue().equals(
                         currentCaptcha));

http://git-wip-us.apache.org/repos/asf/syncope/blob/2261b824/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserSelfCreateResource.java
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserSelfCreateResource.java
b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserSelfCreateResource.java
index b065a86..d22b267 100644
--- a/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserSelfCreateResource.java
+++ b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserSelfCreateResource.java
@@ -79,14 +79,17 @@ public class UserSelfCreateResource extends AbstractBaseResource {
             } else {
                 response.setError(Response.Status.FORBIDDEN.getStatusCode(), new StringBuilder().
                         append("ErrorMessage{{").append(userTORequest == null
-                        ? "Request received is not valid"
-                        : "Self registration not allowed").append("}}").toString());
+                        ? "Request received is not valid }}"
+                        : "Self registration not allowed }}").toString());
             }
 
         } catch (Exception e) {
             LOG.error("Could not create userTO", e);
-            response.setError(Response.Status.BAD_REQUEST.getStatusCode(), new StringBuilder().append("ErrorMessage{{
")
-                    .append(e.getMessage()).append(" }}").toString());
+            response.setError(Response.Status.BAD_REQUEST.getStatusCode(), new StringBuilder()
+                    .append("ErrorMessage{{ ")
+                    .append(e.getMessage())
+                    .append(" }}")
+                    .toString());
         }
         return response;
     }


Mime
View raw message