You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2018/04/26 11:30:51 UTC

[1/4] syncope git commit: Upgrading Swagger UI

Repository: syncope
Updated Branches:
  refs/heads/2_0_X 1c8962719 -> c859a87ae
  refs/heads/master 9e9002f4b -> c0e2aedef


Upgrading Swagger UI


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

Branch: refs/heads/master
Commit: c59662741ccfb0e9e9b0ae156ec57b7606e68e83
Parents: 9e9002f
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Thu Apr 26 08:27:21 2018 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Thu Apr 26 09:01:36 2018 +0200

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/c5966274/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4269ab4..e5524ef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -419,7 +419,7 @@ under the License.
     <flowable-modeler.directory>${project.build.directory}/flowable-modeler</flowable-modeler.directory>    
 
     <swagger-core.version>2.0.1</swagger-core.version>    
-    <swagger-ui.version>3.13.4</swagger-ui.version>
+    <swagger-ui.version>3.13.6</swagger-ui.version>
     <guava.version>20.0</guava.version>
 
     <jquery.version>2.2.4</jquery.version>


[3/4] syncope git commit: Upgrading Swagger UI

Posted by il...@apache.org.
Upgrading Swagger UI


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

Branch: refs/heads/2_0_X
Commit: c859a87aec5fd522533b3a33098500a210ab4fcc
Parents: 4aba9a7
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Thu Apr 26 08:27:21 2018 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Thu Apr 26 13:29:40 2018 +0200

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/c859a87a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2814713..2fdd598 100644
--- a/pom.xml
+++ b/pom.xml
@@ -423,7 +423,7 @@ under the License.
     <flowable-modeler.directory>${project.build.directory}/flowable-modeler</flowable-modeler.directory>
 
     <swagger-core.version>1.5.17</swagger-core.version>    
-    <swagger-ui.version>3.13.4</swagger-ui.version>
+    <swagger-ui.version>3.13.6</swagger-ui.version>
     <guava.version>20.0</guava.version>
 
     <jquery.version>2.2.4</jquery.version>


[2/4] syncope git commit: [SYNCOPE-1306] fixing date value without conversion pattern

Posted by il...@apache.org.
[SYNCOPE-1306] fixing date value without conversion pattern


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

Branch: refs/heads/2_0_X
Commit: 4aba9a7ca0ce423885e3fe6f9c30cd6e6c13b891
Parents: 1c89627
Author: dayash <di...@tirasa.net>
Authored: Thu Apr 26 12:35:05 2018 +0200
Committer: dayash <di...@tirasa.net>
Committed: Thu Apr 26 13:07:21 2018 +0200

----------------------------------------------------------------------
 .../jpa/entity/AbstractPlainAttrValue.java      |  3 +-
 .../provisioning/api/utils/FormatUtils.java     | 29 ++++++++++++++++----
 2 files changed, 24 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/4aba9a7c/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java
index 5a6df87..fed4d05 100644
--- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java
+++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java
@@ -256,8 +256,7 @@ public abstract class AbstractPlainAttrValue extends AbstractGeneratedKeyEntity
                 result = getAttr() == null || getAttr().getSchema() == null
                         || getAttr().getSchema().getConversionPattern() == null
                         ? FormatUtils.format(getDateValue())
-                        : FormatUtils.format(
-                                getDateValue(), false, getAttr().getSchema().getConversionPattern());
+                        : FormatUtils.format(getDateValue(), false, getAttr().getSchema().getConversionPattern());
                 break;
 
             case Binary:

http://git-wip-us.apache.org/repos/asf/syncope/blob/4aba9a7c/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/utils/FormatUtils.java
----------------------------------------------------------------------
diff --git a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/utils/FormatUtils.java b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/utils/FormatUtils.java
index e1c7ce5..2f262f2 100644
--- a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/utils/FormatUtils.java
+++ b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/utils/FormatUtils.java
@@ -36,9 +36,7 @@ public final class FormatUtils {
 
         @Override
         protected SimpleDateFormat initialValue() {
-            SimpleDateFormat sdf = new SimpleDateFormat();
-            sdf.applyPattern(SyncopeConstants.DEFAULT_DATE_PATTERN);
-            return sdf;
+            return new SimpleDateFormat();
         }
     };
 
@@ -62,10 +60,15 @@ public final class FormatUtils {
 
     public static String format(final Date date, final boolean lenient, final String conversionPattern) {
         SimpleDateFormat sdf = DATE_FORMAT.get();
-        if (conversionPattern != null) {
+
+        if (conversionPattern == null) {
+            sdf.applyPattern(SyncopeConstants.DEFAULT_DATE_PATTERN);
+        } else {
             sdf.applyPattern(conversionPattern);
         }
+
         sdf.setLenient(lenient);
+
         return sdf.format(date);
     }
 
@@ -75,10 +78,17 @@ public final class FormatUtils {
 
     public static String format(final long number, final String conversionPattern) {
         DecimalFormat df = DECIMAL_FORMAT.get();
+
+        String previous = df.toPattern();
         if (conversionPattern != null) {
             df.applyPattern(conversionPattern);
         }
-        return df.format(number);
+
+        String formatted = df.format(number);
+
+        df.applyPattern(previous);
+
+        return formatted;
     }
 
     public static String format(final double number) {
@@ -87,10 +97,17 @@ public final class FormatUtils {
 
     public static String format(final double number, final String conversionPattern) {
         DecimalFormat df = DECIMAL_FORMAT.get();
+
+        String previous = df.toPattern();
         if (conversionPattern != null) {
             df.applyPattern(conversionPattern);
         }
-        return df.format(number);
+
+        String formatted = df.format(number);
+
+        df.applyPattern(previous);
+
+        return formatted;
     }
 
     public static Date parseDate(final String source) throws ParseException {


[4/4] syncope git commit: [SYNCOPE-1306] fixing date value without conversion pattern - This closes #73

Posted by il...@apache.org.
[SYNCOPE-1306] fixing date value without conversion pattern - This closes #73


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

Branch: refs/heads/master
Commit: c0e2aedef5360101a78fb0932c7ea16fc2ae3c8b
Parents: c596627
Author: dayash <di...@tirasa.net>
Authored: Thu Apr 26 12:35:05 2018 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Thu Apr 26 13:30:28 2018 +0200

----------------------------------------------------------------------
 .../jpa/entity/AbstractPlainAttrValue.java      |  3 +-
 .../provisioning/api/utils/FormatUtils.java     | 29 ++++++++++++++++----
 2 files changed, 24 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/c0e2aede/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java
index bd19107..f259eb6 100644
--- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java
+++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java
@@ -256,8 +256,7 @@ public abstract class AbstractPlainAttrValue extends AbstractGeneratedKeyEntity
                 result = getAttr() == null || getAttr().getSchema() == null
                         || getAttr().getSchema().getConversionPattern() == null
                         ? FormatUtils.format(getDateValue())
-                        : FormatUtils.format(
-                                getDateValue(), false, getAttr().getSchema().getConversionPattern());
+                        : FormatUtils.format(getDateValue(), false, getAttr().getSchema().getConversionPattern());
                 break;
 
             case Binary:

http://git-wip-us.apache.org/repos/asf/syncope/blob/c0e2aede/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/utils/FormatUtils.java
----------------------------------------------------------------------
diff --git a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/utils/FormatUtils.java b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/utils/FormatUtils.java
index e1c7ce5..2f262f2 100644
--- a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/utils/FormatUtils.java
+++ b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/utils/FormatUtils.java
@@ -36,9 +36,7 @@ public final class FormatUtils {
 
         @Override
         protected SimpleDateFormat initialValue() {
-            SimpleDateFormat sdf = new SimpleDateFormat();
-            sdf.applyPattern(SyncopeConstants.DEFAULT_DATE_PATTERN);
-            return sdf;
+            return new SimpleDateFormat();
         }
     };
 
@@ -62,10 +60,15 @@ public final class FormatUtils {
 
     public static String format(final Date date, final boolean lenient, final String conversionPattern) {
         SimpleDateFormat sdf = DATE_FORMAT.get();
-        if (conversionPattern != null) {
+
+        if (conversionPattern == null) {
+            sdf.applyPattern(SyncopeConstants.DEFAULT_DATE_PATTERN);
+        } else {
             sdf.applyPattern(conversionPattern);
         }
+
         sdf.setLenient(lenient);
+
         return sdf.format(date);
     }
 
@@ -75,10 +78,17 @@ public final class FormatUtils {
 
     public static String format(final long number, final String conversionPattern) {
         DecimalFormat df = DECIMAL_FORMAT.get();
+
+        String previous = df.toPattern();
         if (conversionPattern != null) {
             df.applyPattern(conversionPattern);
         }
-        return df.format(number);
+
+        String formatted = df.format(number);
+
+        df.applyPattern(previous);
+
+        return formatted;
     }
 
     public static String format(final double number) {
@@ -87,10 +97,17 @@ public final class FormatUtils {
 
     public static String format(final double number, final String conversionPattern) {
         DecimalFormat df = DECIMAL_FORMAT.get();
+
+        String previous = df.toPattern();
         if (conversionPattern != null) {
             df.applyPattern(conversionPattern);
         }
-        return df.format(number);
+
+        String formatted = df.format(number);
+
+        df.applyPattern(previous);
+
+        return formatted;
     }
 
     public static Date parseDate(final String source) throws ParseException {