syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [2/2] syncope git commit: Correcting key type
Date Wed, 14 Dec 2016 10:44:36 GMT
Correcting key type


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

Branch: refs/heads/master
Commit: 504e88a713d756b24c2e6bdfc82e306796dc4b5a
Parents: ad4546e
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Wed Dec 14 11:42:59 2016 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Wed Dec 14 11:44:13 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/syncope/core/logic/MailTemplateLogic.java  | 6 +++---
 .../org/apache/syncope/core/logic/ReportTemplateLogic.java     | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/504e88a7/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java
b/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java
index 5abf4ae..7839e12 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java
@@ -168,15 +168,15 @@ public class MailTemplateLogic extends AbstractTransactionalLogic<MailTemplateTO
 
         if (ArrayUtils.isNotEmpty(args)) {
             for (int i = 0; key == null && i < args.length; i++) {
-                if (args[i] instanceof Long) {
-                    key = ((Long) args[i]).toString();
+                if (args[i] instanceof String) {
+                    key = ((String) args[i]).toString();
                 } else if (args[i] instanceof MailTemplateTO) {
                     key = ((MailTemplateTO) args[i]).getKey();
                 }
             }
         }
 
-        if ((key != null) && !key.equals("0")) {
+        if (key != null) {
             try {
                 return getMailTemplateTO(key);
             } catch (Throwable ignore) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/504e88a7/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java
b/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java
index a1d8bfe..f44427f 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java
@@ -181,15 +181,15 @@ public class ReportTemplateLogic extends AbstractTransactionalLogic<ReportTempla
 
         if (ArrayUtils.isNotEmpty(args)) {
             for (int i = 0; key == null && i < args.length; i++) {
-                if (args[i] instanceof Long) {
-                    key = ((Long) args[i]).toString();
+                if (args[i] instanceof String) {
+                    key = ((String) args[i]).toString();
                 } else if (args[i] instanceof ReportTemplateTO) {
                     key = ((ReportTemplateTO) args[i]).getKey();
                 }
             }
         }
 
-        if ((key != null) && !key.equals("0")) {
+        if (key != null) {
             try {
                 return getReportTemplateTO(key);
             } catch (Throwable ignore) {


Mime
View raw message