You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2020/08/03 15:21:38 UTC

[commons-validator] branch VALIDATOR_1_7_BRANCH updated (5b75344 -> d205ce5)

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a change to branch VALIDATOR_1_7_BRANCH
in repository https://gitbox.apache.org/repos/asf/commons-validator.git.


    from 5b75344  RC2
     new ebd4563  Corrections and clarifications
     new bd2501b  Drop Clirr and Cobertura
     new d205ce5  systemPropertyVariables set too late in Surefire

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml                                              | 20 +++++++-------------
 src/changes/changes.xml                              | 14 ++++++++++----
 .../validator/routines/DateValidatorTest.java        | 16 ++++++++++++++++
 3 files changed, 33 insertions(+), 17 deletions(-)


[commons-validator] 01/03: Corrections and clarifications

Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch VALIDATOR_1_7_BRANCH
in repository https://gitbox.apache.org/repos/asf/commons-validator.git

commit ebd45637090d0748dcf4c7f11c480de00d65a2c7
Author: Sebb <se...@apache.org>
AuthorDate: Sun Aug 2 17:12:31 2020 +0100

    Corrections and clarifications
---
 src/changes/changes.xml | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index a8153d9..b25fc79 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -88,16 +88,19 @@ Apache Commons Validator.
 
  BREAKING CHANGES:
 
-   * Now requires Java 7
+
+ * Now requires Java 7
+ * N.B. Java 9 changed the way Locales are handled. This affects the output from some Date-related methods, and may cause some tests to break.
 
 
  DEPENDENCIES
  ============
 
- *   Updates Apache Commons BeanUtils dependency from 1.9.2 to 1.9.3.
-     This picks up BEANUTILS-482: Update commons-collections from 3.2.1 to 3.2.2 (CVE-2015-4852).
 
-For the current list of dependencies, please see
+ * Updates Apache Commons BeanUtils dependency from 1.9.2 to 1.9.4.
+  This picks up BEANUTILS-482: Update commons-collections from 3.2.1 to 3.2.2 (CVE-2015-4852).
+
+  For the current list of dependencies, please see
 http://commons.apache.org/validator/dependencies.html
   ">
     <action issue="VALIDATOR-474" type="add" dev="sebb">


[commons-validator] 02/03: Drop Clirr and Cobertura

Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch VALIDATOR_1_7_BRANCH
in repository https://gitbox.apache.org/repos/asf/commons-validator.git

commit bd2501b2109f13bf89a06b6ac503f03359dd793a
Author: Sebb <se...@apache.org>
AuthorDate: Sun Aug 2 17:38:00 2020 +0100

    Drop Clirr and Cobertura
---
 pom.xml                 | 11 +----------
 src/changes/changes.xml |  3 +++
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/pom.xml b/pom.xml
index ad50c23..e5753c6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,7 +78,7 @@
   </distributionManagement>
 
   <build>
-    <defaultGoal>clean verify apache-rat:check clirr:check checkstyle:check javadoc:javadoc</defaultGoal>
+    <defaultGoal>clean verify apache-rat:check checkstyle:check javadoc:javadoc</defaultGoal>
     <resources>
       <resource>
         <directory>${basedir}</directory>
@@ -215,15 +215,6 @@
         </reportSets>
       </plugin>
       <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>cobertura-maven-plugin</artifactId>
-        <version>${commons.cobertura.version}</version>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>clirr-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
         <artifactId>maven-pmd-plugin</artifactId>
         <version>3.13.0</version>
         <configuration>
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index b25fc79..5bbaa36 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -103,6 +103,9 @@ Apache Commons Validator.
   For the current list of dependencies, please see
 http://commons.apache.org/validator/dependencies.html
   ">
+    <action type="update" dev="sebb">
+    Drop Clirr and Cobertura in favour of JApiCmp and JaCoCo
+    </action>
     <action issue="VALIDATOR-474" type="add" dev="sebb">
     DomainValidator should allow local overrides
     </action>


[commons-validator] 03/03: systemPropertyVariables set too late in Surefire

Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch VALIDATOR_1_7_BRANCH
in repository https://gitbox.apache.org/repos/asf/commons-validator.git

commit d205ce5b632c1e06f524d7cc08efc645148e2458
Author: Sebb <se...@apache.org>
AuthorDate: Mon Aug 3 12:23:34 2020 +0100

    systemPropertyVariables set too late in Surefire
---
 pom.xml                                                  |  9 ++++++---
 .../commons/validator/routines/DateValidatorTest.java    | 16 ++++++++++++++++
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index e5753c6..d43e9bb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -314,9 +314,12 @@
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-surefire-plugin</artifactId>
             <configuration>
-                <systemPropertyVariables>
-                    <java.locale.providers>COMPAT,CLDR</java.locale.providers>
-                </systemPropertyVariables>
+              <!--
+                systemPropertyVariables are set too late in Surefire
+                versions after 2.21.0 and before 3.0-M4 (but only on Windows!)
+                Use the command-line instead to ensure the property is set early enough
+              -->
+              <argLine>-Djava.locale.providers=COMPAT,SPI</argLine>
             </configuration>
           </plugin>
         </plugins>
diff --git a/src/test/java/org/apache/commons/validator/routines/DateValidatorTest.java b/src/test/java/org/apache/commons/validator/routines/DateValidatorTest.java
index a17f6b0..43de6b2 100644
--- a/src/test/java/org/apache/commons/validator/routines/DateValidatorTest.java
+++ b/src/test/java/org/apache/commons/validator/routines/DateValidatorTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.validator.routines;
 
+import java.text.DateFormat;
 import java.util.Date;
 import java.util.Locale;
 import java.util.TimeZone;
@@ -49,6 +50,21 @@ public class DateValidatorTest extends AbstractCalendarValidatorTest {
     }
 
     /**
+     * Check that locale providers are set up correctly
+     * If not, the parse will fail
+     */
+    public void testLocaleProviders() throws Exception {
+        String localeProviders = System.getProperty("java.locale.providers");
+        if (localeProviders != null) { // may be null before Java 9
+            assertTrue("java.locale.providers must start with COMPAT", localeProviders.startsWith("COMPAT"));
+        }
+        String txt = "3/20/15 10:59:00 PM";  // This relies on the locale format prior to Java 9 to parse correctly
+        DateFormat dateformat= DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM, Locale.US); 
+        dateformat.setTimeZone(TimeZone.getTimeZone("GMT"));
+        Date date = dateformat.parse(txt);
+        assertNotNull(date);
+    }
+    /**
      * Test DateValidator validate Methods
      */
     public void testDateValidatorMethods() {