[Git][java-team/libcommons-validator-java][master] 5 commits: New upstream version 1.7

sun min (@sunmin) gitlab at salsa.debian.org
Fri Feb 3 09:37:53 GMT 2023



sun min pushed to branch master at Debian Java Maintainers / libcommons-validator-java


Commits:
645df0df by sun min at 2023-01-19T11:32:42+08:00
New upstream version 1.7

- - - - -
0c7c48d7 by sun min at 2023-01-30T19:17:42+08:00
New upstream version 1.7
- - - - -
29e1ba9f by sun min at 2023-01-30T19:17:42+08:00
Update upstream source from tag 'upstream/1.7'

Update to upstream version '1.7'
with Debian dir 376dbc3011727fbf6d56159c5835e5c5abdead75
- - - - -
afb2c154 by sun min at 2023-02-03T17:33:51+08:00
do not ignore test failures

- - - - -
f63b6622 by sun min at 2023-02-03T17:37:26+08:00
Update changelog

- - - - -


14 changed files:

- − .github/dependabot.yml
- − .github/workflows/maven.yml
- − .gitignore
- + .pc/.quilt_patches
- + .pc/.quilt_series
- + .pc/.version
- src/test/java/org/apache/commons/validator/routines/DomainValidatorStartupTest.java → .pc/01-delete-domain-validator-startup-test/src/test/java/org/apache/commons/validator/routines/DomainValidatorStartupTest.java
- + .pc/applied-patches
- − .travis.yml
- − PROPOSAL.html
- debian/changelog
- debian/maven.properties
- + debian/patches/01-delete-domain-validator-startup-test
- + debian/patches/series


Changes:

=====================================
.github/dependabot.yml deleted
=====================================
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-version: 2
-updates:
-  - package-ecosystem: "maven"
-    directory: "/"
-    schedule:
-      interval: "daily"
-  - package-ecosystem: "github-actions"
-    directory: "/"
-    schedule:
-      interval: "daily"


=====================================
.github/workflows/maven.yml deleted
=====================================
@@ -1,41 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-name: Java CI
-
-on: [push]
-
-jobs:
-  build:
-
-    runs-on: ubuntu-latest
-    continue-on-error: ${{ matrix.experimental }}
-    strategy:
-      matrix:
-        java: [ 7, 8, 11, 14 ]
-        experimental: [false]
-        include:
-          - java: 15-ea
-            experimental: true        
-        
-    steps:
-    - uses: actions/checkout at v2.3.1
-    - name: Set up JDK ${{ matrix.java }}
-      uses: actions/setup-java at v1.4.0
-      with:
-        java-version: ${{ matrix.java }}
-    - name: Build with Maven
-      run: mvn --batch-mode apache-rat:check javadoc:javadoc -Ddoclint=all package --file pom.xml
-#      run: mvn --batch-mode apache-rat:check package --file pom.xml


=====================================
.gitignore deleted
=====================================
@@ -1,6 +0,0 @@
-/target/
-/.settings/
-/.classpath
-/.project
-/site-content/
-/.vscode/


=====================================
.pc/.quilt_patches
=====================================
@@ -0,0 +1 @@
+debian/patches


=====================================
.pc/.quilt_series
=====================================
@@ -0,0 +1 @@
+series


=====================================
.pc/.version
=====================================
@@ -0,0 +1 @@
+2


=====================================
src/test/java/org/apache/commons/validator/routines/DomainValidatorStartupTest.java → .pc/01-delete-domain-validator-startup-test/src/test/java/org/apache/commons/validator/routines/DomainValidatorStartupTest.java
=====================================


=====================================
.pc/applied-patches
=====================================
@@ -0,0 +1 @@
+01-delete-domain-validator-startup-test


=====================================
.travis.yml deleted
=====================================
@@ -1,31 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-language: java
-dist: trusty
-cache:
-  directories:
-    - $HOME/.m2
-matrix:
-  include:
-    - jdk: openjdk7
-    - jdk: openjdk8
-    - jdk: openjdk11
-    - os: linux-ppc64le
-      jdk: openjdk8
-script:
-  - mvn clean test
-after_success:
-  - mvn clean cobertura:cobertura coveralls:report


=====================================
PROPOSAL.html deleted
=====================================
@@ -1,112 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied..
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<html>
-<head>
-<title>Proposal for Validator Library Package</title>
-</head>
-<body bgcolor="white">
-
-<div align="center">
-<h1>Proposal for <em>Validator</em> Package</h1>
-</div>
-
-<h3>(0) Rationale</h3>
-
-<p>There is a need for the validation of JavaBeans to validate 
-user input from forms and validate business rules.  There is also a 
-need to define different validation rules and error messages based on 
-the user's locale.
-</p>
-
-<p>The Validator package will provide the capability to configure 
-validators (validation methods) with different method signatures.  
-So the basic framework can have an interface built on it to deal 
-with validations on web layers, ejb layers, etc.
-</p>
-
-<h3>(1) Scope of the Package</h3>
-
-<p>The package shall create and maintain a package that provides 
-basic validation functionality.
-</p>
-
-<p>
-The package should :
-<ul>
-<li>Provide in an easy way to define validations for fields</li>
-<li>Provide internationalization support for validation rules and error messages.</li>
-<li>Provide an easy way to define validators</li>
-<li>Provide a way to store information in a validator definition so JavaScript client 
-    side validation can be auto-generated matching the server side validation.</li>
-</ul>
-</p>
-
-<p>
-Non-goals:
-<ul>
-<li>This package does not auto-generate JavaScript client side code.</li>
-</ul>
-</p>
-
-<h3>(1.5) Interaction With Other Packages</h3>
-
-<p><em>Validator</em> relies on:
-</p>
-
-<ul>
-  <li>Jakarta Regexp</li>
-</ul>
-
-<h3>(2) Required Jakarta-Commons Resources</h3>
-
-<ul>
-  <li>Commons BeanUtils</li>
-  <li>Commons Collections</li>
-  <li>Commons Digester</li>
-</ul>
-
-<ul>
-<li>CVS Repository - New directory <code>validator</code> in the 
-<code>jakarta-commons</code> CVS repository.</li>
-
-<li>Initial Committers - The list is provided below. </li>
-
-<li>Mailing List - Discussions will take place on the general
-<em>dev at commons.apache.org</em> mailing list. To help list
-subscribers identify messages of interest, it is suggested that the
-message subject of messages about this component be prefixed with
-[Validator].</li>
-
-<li>Bugzilla - New component "Validator" under the "Commons" product
-category, with appropriate version identifiers as needed.</li>
-
-<li>Jyve FAQ - New category "commons-validator" (when available).</li>
-</ul>
-
-
-<h3>(4) Initial Committers</h3>
-
-<p>The initial committers on the Validator component shall be:</p>
-
-<ul>
-   <li><a href="mailto:dwinterfeldt at apache.org">David Winterfeldt</a></li>
-</ul>
-
-<br><br>
-
-</body>
-</html>


=====================================
debian/changelog
=====================================
@@ -3,9 +3,10 @@ libcommons-validator-java (1:1.7-1) UNRELEASED; urgency=medium
   * Team upload.
   * New upstream release.
   * Add commons-csv-java as new dependency.
-  * Skip running the tests.
+  * Do not ignore test failures,remove the test class
+    DomainValidatorStartupTest.java.
 
- -- Sun Min <sunmin89 at outlook.com>  Tue, 17 Jan 2023 16:47:10 +0800
+ -- Sun Min <sunmin89 at outlook.com>  Fri, 3 Feb 2023 14:16:10 +0800
 
 libcommons-validator-java (1:1.6-3) unstable; urgency=medium
 


=====================================
debian/maven.properties
=====================================
@@ -1,6 +1,4 @@
 project.build.sourceEncoding=UTF-8
-maven.test.failure.ignore=true
-maven.test.skip=true
 commons.spotbugs.version=4.7.3
 maven.compiler.source=1.8
 maven.compiler.target=1.8


=====================================
debian/patches/01-delete-domain-validator-startup-test
=====================================
@@ -0,0 +1,232 @@
+Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
+Date: Fri, 3 Feb 2023 12:58:46 +0800
+Subject: Remove test file DomainValidatorStartupTest.java. It depends on the junit-clptr
+package which is not available in Debian. 
+
+Forwarded: not-needed
+Last-Update: 2023-02-03
+
+--- libcommons-validator-java-1.7.orig/src/test/java/org/apache/commons/validator/routines/DomainValidatorStartupTest.java
++++ /dev/null
+@@ -1,221 +0,0 @@
+-/*
+- * Licensed to the Apache Software Foundation (ASF) under one or more
+- * contributor license agreements.  See the NOTICE file distributed with
+- * this work for additional information regarding copyright ownership.
+- * The ASF licenses this file to You under the Apache License, Version 2.0
+- * (the "License"); you may not use this file except in compliance with
+- * the License.  You may obtain a copy of the License at
+- *
+- *      http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-package org.apache.commons.validator.routines;
+-
+-import static org.junit.Assert.*;
+-
+-import java.util.ArrayList;
+-import java.util.List;
+-
+-import org.apache.commons.validator.routines.DomainValidator.ArrayType;
+-import org.junit.Test;
+-import org.junit.runner.RunWith;
+-
+-import org.bitstrings.test.junit.runner.ClassLoaderPerTestRunner;
+-
+-/**
+- * Startup Tests for the DomainValidator.
+- *
+- * @version $Revision$
+- */
+- at RunWith( ClassLoaderPerTestRunner.class )
+-public class DomainValidatorStartupTest {
+-
+-    @Test(expected = IllegalArgumentException.class)
+-    public void testUpdateBaseArrayCC() {
+-        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_RO, new String[]{"com"});
+-    }
+-
+-    @Test(expected = IllegalArgumentException.class)
+-    public void testUpdateBaseArrayGeneric() {
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_RO, new String[]{"com"});
+-    }
+-
+-    @Test(expected = IllegalArgumentException.class)
+-    public void testUpdateBaseArrayInfra() {
+-        DomainValidator.updateTLDOverride(ArrayType.INFRASTRUCTURE_RO, new String[]{"com"});
+-    }
+-
+-    @Test(expected = IllegalArgumentException.class)
+-    public void testUpdateBaseArrayLocal() {
+-        DomainValidator.updateTLDOverride(ArrayType.LOCAL_RO, new String[]{"com"});
+-    }
+-
+-    @Test
+-    public void testUpdateCountryCode1a() {
+-        DomainValidator validator = DomainValidator.getInstance();
+-        assertFalse(validator.isValidCountryCodeTld("com")); // cannot be valid
+-    }
+-
+-    @Test
+-    public void testUpdateCountryCode1b() {
+-        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_PLUS, new String[]{"com"});
+-        DomainValidator validator = DomainValidator.getInstance();
+-        assertTrue(validator.isValidCountryCodeTld("com")); // it is now!
+-    }
+-
+-    @Test
+-    public void testUpdateCountryCode2() {
+-        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_PLUS, new String[]{"com"});
+-        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_MINUS, new String[]{"com"});
+-        DomainValidator validator = DomainValidator.getInstance();
+-        assertFalse(validator.isValidCountryCodeTld("com")); // show that minus overrides the rest
+-    }
+-
+-    @Test
+-    public void testUpdateCountryCode3a() { // show ch is valid
+-        DomainValidator validator = DomainValidator.getInstance();
+-        assertTrue(validator.isValidCountryCodeTld("ch"));
+-    }
+-
+-    @Test
+-    public void testUpdateCountryCode3b() { // show ch can be made invalid
+-        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_MINUS, new String[]{"ch"});
+-        DomainValidator validator = DomainValidator.getInstance();
+-        assertFalse(validator.isValidCountryCodeTld("ch"));
+-    }
+-
+-    @Test
+-    public void testUpdateCountryCode3c() { // show ch can be made valid again by replacing the CC array
+-        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_MINUS, new String[]{"ch"});
+-        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_MINUS, new String[]{"xx"});
+-        DomainValidator validator = DomainValidator.getInstance();
+-        assertTrue(validator.isValidCountryCodeTld("ch"));
+-    }
+-
+-    @Test
+-    public void testUpdateGeneric1() {
+-        DomainValidator validator = DomainValidator.getInstance();
+-        assertFalse(validator.isValidGenericTld("ch")); // cannot be valid
+-    }
+-
+-    @Test
+-    public void testUpdateGeneric2() {
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, new String[]{"ch"});
+-        DomainValidator validator = DomainValidator.getInstance();
+-        assertTrue(validator.isValidGenericTld("ch")); // it is now!
+-    }
+-
+-    @Test
+-    public void testUpdateGeneric3() {
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, new String[]{"ch"});
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_MINUS, new String[]{"ch"});
+-        DomainValidator validator = DomainValidator.getInstance();
+-        assertFalse(validator.isValidGenericTld("ch")); // show that minus overrides the rest
+-        assertTrue(validator.isValidGenericTld("com"));
+-    }
+-
+-    @Test
+-    public void testUpdateGeneric4() {
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, new String[]{"ch"});
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_MINUS, new String[]{"ch"});
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_MINUS, new String[]{"com"});
+-        DomainValidator validator = DomainValidator.getInstance();
+-        assertFalse(validator.isValidGenericTld("com"));
+-    }
+-
+-    @Test
+-    public void testUpdateGeneric5() {
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, new String[]{"ch"});
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_MINUS, new String[]{"ch"});
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_MINUS, new String[]{"com"});
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_MINUS, new String[]{"xx"}); // change the minus list
+-        DomainValidator validator = DomainValidator.getInstance();
+-        assertTrue(validator.isValidGenericTld("com"));
+-    }
+-
+-    @Test
+-    public void testVALIDATOR_412a() {
+-        DomainValidator validator = DomainValidator.getInstance();
+-        assertFalse(validator.isValidGenericTld("local"));
+-        assertFalse(validator.isValid("abc.local"));
+-        assertFalse(validator.isValidGenericTld("pvt"));
+-        assertFalse(validator.isValid("abc.pvt"));
+-    }
+-
+-    @Test
+-    public void testVALIDATOR_412b() {
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, new String[]{"local", "pvt"});
+-        DomainValidator validator = DomainValidator.getInstance();
+-        assertTrue(validator.isValidGenericTld("local"));
+-        assertTrue(validator.isValid("abc.local"));
+-        assertTrue(validator.isValidGenericTld("pvt"));
+-        assertTrue(validator.isValid("abc.pvt"));
+-    }
+-
+-    @Test
+-    public void testVALIDATOR_412c() {
+-        DomainValidator validator = DomainValidator.getInstance(true);
+-        assertFalse(validator.isValidLocalTld("local"));
+-        assertFalse(validator.isValid("abc.local"));
+-        assertFalse(validator.isValidLocalTld("pvt"));
+-        assertFalse(validator.isValid("abc.pvt"));
+-    }
+-
+-    @Test
+-    public void testVALIDATOR_412d() {
+-        DomainValidator.updateTLDOverride(ArrayType.LOCAL_PLUS, new String[]{"local", "pvt"});
+-        DomainValidator validator = DomainValidator.getInstance(true);
+-        assertTrue(validator.isValidLocalTld("local"));
+-        assertTrue(validator.isValidLocalTld("pvt"));
+-        assertTrue(validator.isValid("abc.local"));
+-        assertTrue(validator.isValid("abc.pvt"));
+-    }
+-
+-    @Test
+-    public void testCannotUpdate() {
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, new String[]{"ch"}); // OK
+-        DomainValidator dv = DomainValidator.getInstance();
+-        assertNotNull(dv);
+-        try {
+-            DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, new String[]{"ch"});
+-            fail("Expected IllegalStateException");
+-        } catch (IllegalStateException ise) {
+-            // expected
+-        }
+-    }
+-
+-    @Test
+-    public void testInstanceOverride() { // Show that the instance picks up static values
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, new String[]{"gp"});
+-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_MINUS, new String[]{"com"});
+-        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_PLUS, new String[]{"cp"});
+-        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_MINUS, new String[]{"ch"});
+-        DomainValidator validator = DomainValidator.getInstance(false);
+-        assertTrue(validator.isValidGenericTld("gp"));
+-        assertFalse(validator.isValidGenericTld("com"));
+-        assertTrue(validator.isValidCountryCodeTld("cp"));
+-        assertFalse(validator.isValidCountryCodeTld("ch"));
+-
+-        // show we can override them for a new instance
+-        List<DomainValidator.Item> items = new ArrayList<>();
+-        items.add(new DomainValidator.Item(ArrayType.GENERIC_MINUS,new String[]{""}));
+-        items.add(new DomainValidator.Item(ArrayType.COUNTRY_CODE_MINUS,new String[]{""}));
+-        validator = DomainValidator.getInstance(false, items);
+-        assertTrue(validator.isValidGenericTld("gp"));
+-        assertTrue(validator.isValidGenericTld("com")); // Should be true again
+-        assertTrue(validator.isValidCountryCodeTld("cp"));
+-        assertTrue(validator.isValidCountryCodeTld("ch")); // Should be true again
+-
+-        // Show the class overrides are unaffected
+-        validator = DomainValidator.getInstance(false);
+-        assertTrue(validator.isValidGenericTld("gp"));
+-        assertFalse(validator.isValidGenericTld("com"));
+-        assertTrue(validator.isValidCountryCodeTld("cp"));
+-        assertFalse(validator.isValidCountryCodeTld("ch"));
+-    }
+-}


=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+01-delete-domain-validator-startup-test



View it on GitLab: https://salsa.debian.org/java-team/libcommons-validator-java/-/compare/962327b447706c0829e08e619c519b141238c4f4...f63b6622ba8720711accede4f2ea14119fd2aeb9

-- 
View it on GitLab: https://salsa.debian.org/java-team/libcommons-validator-java/-/compare/962327b447706c0829e08e619c519b141238c4f4...f63b6622ba8720711accede4f2ea14119fd2aeb9
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20230203/c939fe4a/attachment.htm>


More information about the pkg-java-commits mailing list