Skip to content

Commit

Permalink
Merge pull request #1 from apache/master
Browse files Browse the repository at this point in the history
update to current
  • Loading branch information
alcole committed Mar 15, 2021
2 parents 8d0b6a1 + 72734d2 commit 01434f3
Show file tree
Hide file tree
Showing 136 changed files with 3,024 additions and 1,875 deletions.
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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"
48 changes: 48 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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, pull_request]

jobs:
build:

runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
java: [ 8, 11, 15 ]
experimental: [false]
include:
- java: 16-ea
experimental: true
- java: 17-ea
experimental: true

steps:
- uses: actions/checkout@v2.3.4
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1.4.3
with:
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn -V --batch-mode -Ddoclint=all --file pom.xml --no-transfer-progress
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/target/
/.settings/
/.classpath
/.project
/site-content/
/.vscode/
/commons-validator.iml
52 changes: 28 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
# 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
sudo: false

jdk:
- openjdk7
- oraclejdk8

after_success:
- mvn clean cobertura:cobertura coveralls:report
# 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
cache:
directories:
- $HOME/.m2
matrix:
include:
- jdk: openjdk8
- jdk: openjdk11
- jdk: openjdk15
script:
- mvn -V --no-transfer-progress clean test
after_success:
- mvn -V --no-transfer-progress clean cobertura:cobertura coveralls:report
46 changes: 32 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
| commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+======================================================================+
| |
| 1) Re-generate using: mvn commons:contributing-md |
| 1) Re-generate using: mvn commons-build:contributing-md |
| |
| 2) Set the following properties in the component's pom: |
| - commons.jira.id (required, alphabetic, upper case) |
Expand All @@ -50,48 +50,66 @@ Getting Started

+ Make sure you have a [JIRA account](https://issues.apache.org/jira/).
+ Make sure you have a [GitHub account](https://github.com/signup/free).
+ If you're planning to implement a new feature it makes sense to discuss you're changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons Validator's scope.
+ Submit a ticket for your issue, assuming one does not already exist.
+ If you're planning to implement a new feature it makes sense to discuss your changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons Validator's scope.
+ Submit a [Jira Ticket][jira] for your issue, assuming one does not already exist.
+ Clearly describe the issue including steps to reproduce when it is a bug.
+ Make sure you fill in the earliest version that you know has the issue.
+ Fork the repository on GitHub.
+ Find the corresponding [repository on GitHub](https://github.com/apache/?query=commons-),
[fork](https://help.github.com/articles/fork-a-repo/) and check out your forked repository.

Making Changes
--------------

+ Create a topic branch from where you want to base your work (this is usually the master/trunk branch).
+ Create a _topic branch_ for your isolated work.
* Usually you should base your branch on the `master` or `trunk` branch.
* A good topic branch name can be the JIRA bug id plus a keyword, e.g. `VALIDATOR-123-InputStream`.
* If you have submitted multiple JIRA issues, try to maintain separate branches and pull requests.
+ Make commits of logical units.
* Make sure your commit messages are meaningful and in the proper format. Your commit message should contain the key of the JIRA issue.
* e.g. `VALIDATOR-123: Close input stream earlier`
+ Respect the original code style:
+ Only use spaces for indentation.
+ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
+ Check for unnecessary whitespace with git diff --check before committing.
+ Make sure your commit messages are in the proper format. Your commit message should contain the key of the JIRA issue.
+ Make sure you have added the necessary tests for your changes.
+ Create minimal diffs - disable _On Save_ actions like _Reformat Source Code_ or _Organize Imports_. If you feel the source code should be reformatted create a separate PR for this change first.
+ Check for unnecessary whitespace with `git diff` -- check before committing.
+ Make sure you have added the necessary tests for your changes, typically in `src/test/java`.
+ Run all the tests with `mvn clean verify` to assure nothing else was accidentally broken.

Making Trivial Changes
----------------------

The JIRA tickets are used to generate the changelog for the next release.

For changes of a trivial nature to comments and documentation, it is not always necessary to create a new ticket in JIRA.
In this case, it is appropriate to start the first line of a commit with '(doc)' instead of a ticket number.


Submitting Changes
------------------

+ Sign the [Contributor License Agreement][cla] if you haven't already.
+ Sign and submit the Apache [Contributor License Agreement][cla] if you haven't already.
* Note that small patches & typical bug fixes do not require a CLA as
clause 5 of the [Apache License](https://www.apache.org/licenses/LICENSE-2.0.html#contributions)
covers them.
+ Push your changes to a topic branch in your fork of the repository.
+ Submit a pull request to the repository in the apache organization.
+ Submit a _Pull Request_ to the corresponding repository in the `apache` organization.
* Verify _Files Changed_ shows only your intended changes and does not
include additional files like `target/*.class`
+ Update your JIRA ticket and include a link to the pull request in the ticket.

If you prefer to not use GitHub, then you can instead use
`git format-patch` (or `svn diff`) and attach the patch file to the JIRA issue.


Additional Resources
--------------------

+ [Contributing patches](https://commons.apache.org/patches.html)
+ [Apache Commons Validator JIRA project page](https://issues.apache.org/jira/browse/VALIDATOR)
+ [Apache Commons Validator JIRA project page][jira]
+ [Contributor License Agreement][cla]
+ [General GitHub documentation](https://help.github.com/)
+ [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
+ [GitHub pull request documentation](https://help.github.com/articles/creating-a-pull-request/)
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
+ #apachecommons IRC channel on freenode.org
+ `#apache-commons` IRC channel on `irc.freenode.net`

[cla]:https://www.apache.org/licenses/#clas
[jira]:https://issues.apache.org/jira/browse/VALIDATOR
2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Apache Commons Validator
Copyright 2001-2017 The Apache Software Foundation
Copyright 2001-2020 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
| commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+======================================================================+
| |
| 1) Re-generate using: mvn commons:readme-md |
| 1) Re-generate using: mvn commons-build:readme-md |
| |
| 2) Set the following properties in the component's pom: |
| - commons.componentid (required, alphabetic, lower case) |
Expand All @@ -43,8 +43,10 @@
Apache Commons Validator
===================

[![Build Status](https://travis-ci.org/apache/commons-validator.svg?branch=trunk)](https://travis-ci.org/apache/commons-validator)
[![Build Status](https://travis-ci.org/apache/commons-validator.svg)](https://travis-ci.org/apache/commons-validator)
[![Coverage Status](https://coveralls.io/repos/apache/commons-validator/badge.svg)](https://coveralls.io/r/apache/commons-validator)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/commons-validator/commons-validator/badge.svg)](https://maven-badges.herokuapp.com/maven-central/commons-validator/commons-validator/)
[![Javadocs](https://javadoc.io/badge/commons-validator/commons-validator/1.7.svg)](https://javadoc.io/doc/commons-validator/commons-validator/1.7)

Apache Commons Validator provides the building blocks for both client side validation and server side data validation.
It may be used standalone or with a framework like Struts.
Expand All @@ -53,7 +55,7 @@ Documentation
-------------

More information can be found on the [Apache Commons Validator homepage](https://commons.apache.org/proper/commons-validator).
The [Javadoc](https://commons.apache.org/proper/commons-validator/javadocs/api-release) can be browsed.
The [Javadoc](https://commons.apache.org/proper/commons-validator/apidocs) can be browsed.
Questions related to the usage of Apache Commons Validator should be posted to the [user mailing list][ml].

Where can I get the latest release?
Expand All @@ -66,7 +68,7 @@ Alternatively you can pull it from the central Maven repositories:
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.6</version>
<version>1.7</version>
</dependency>
```

Expand Down
79 changes: 52 additions & 27 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,63 +1,88 @@
Apache Commons Validator 1.6
Apache Commons Validator 1.7
RELEASE NOTES

The Apache Commons Validator team is pleased to announce the release of Apache Commons Validator 1.6
The Apache Commons Validator team is pleased to announce the release of Apache Commons Validator 1.7

Apache Commons Validator provides the building blocks for both client side validation and server side data validation.
It may be used standalone or with a framework like Struts.


This is primarily a maintenance release.
All projects are encouraged to update to this release of Apache Commons Validator.

Commons Validator requires Java 1.6 or later.
Commons Validator requires Java 7 or later.

Main enhancements
=================

* Modulus Ten Check Digit Implementation
* Generic CreditCard validation (syntax and checkdigit only; does not check IIN)
* CreditCard validation specification by numeric range
* DomainValidator instances can be created with instance overrides
* DomainValidator supports overrides of LOCAL TLDs

IMPORTANT NOTES
===============

BREAKING CHANGES:

* NONE.
* 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
============
The dependencies for Validator have not changed since the 1.4 release.

* 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

For complete information on Apache Commons Validator, including instructions on how to submit bug reports,
patches, or suggestions for improvement, see the Apache Apache Commons Validator website:

http://commons.apache.org/proper/commons-validator/

Download page: http://commons.apache.org/proper/commons-validator/download_validator.cgi

Changes in this version include:
===============================

New features:
o VALIDATOR-415: Simplify building new CreditCard validators
o VALIDATOR-413: Generic CreditCard validation
o VALIDATOR-394: General Modulus Ten Check Digit Implementation Thanks to Niall Pemberton.
o VALIDATOR-474: DomainValidator should allow local overrides
o VALIDATOR-473: Allow Email- and UrlValidator to use specified DomainValidator
o VALIDATOR-471: Allow DomainValidator overrides at run-time
o VALIDATOR-423: Add ISINValidator
o VALIDATOR-455: Add IBAN validator for VA – Vatican City State Thanks to Eugen Hanussek.
o VALIDATOR-446: ISSN Validator extract ISSN from EAN-13 Thanks to Alex.

Fixed Bugs:
o VALIDATOR-420: Query params validator shouldn't accept whitespaces Thanks to Marcin Gasior.
o VALIDATOR-419: Invalid IPv6 addresses that are IPv4-mapped pass InetAddressValidator validation Thanks to Denis Iskhakov.
o VALIDATOR-418: UrlValidatorTest: testIsValid() does not run all tests Thanks to Robert McGuigan.
o VALIDATOR-379: CodeValidator unconditionally trim()s the input string - document the behaviour
o VALIDATOR-387: Userinfo without colon should be valid in UrlValidator Thanks to Shumpei Akai.
o VALIDATOR-411: UrlValidator accepts ports above max limit of 16-bit unsigned integer
o VALIDATOR-407: Generic .shop top level domain is considered invalid
o VALIDATOR-405: IBANValidator - Costa Rica entry has been updated in SWIFT docs
o VALIDATOR-401: IBANValidator fails for Seychelles and Ukraine
o VALIDATOR-391: UrlValidator.isValid throws exception for FILEURLs
Fixed code so it handles URLs with no authority field Thanks to Mark E. Scott, Jr. & Jason Loomis.
o VALIDATOR-403: Accept Discover cards of 17 digits long that start with 6011 Thanks to Tanya.
o VALIDATOR-408: DISCOVER Card Validation Patterns Thanks to Raj Vaida.
o VALIDATOR-472: UrlValidator should not be more lax than java.net.URI
o VALIDATOR-283: URLValidator should check for illegal Hex characters Thanks to RC Johnson.
o VALIDATOR-445: Inet6Address may also contain a scope id Thanks to devson.
o VALIDATOR-452: Validation of URL containing IPv4-mapped IPv6 address Thanks to devson.
o VALIDATOR-438: IBANValidator fails for El Salvador
Add definition Thanks to Simon Marti.
o VALIDATOR-434: Field does not synchronize iteration on synchronized list Thanks to emopers.
o VALIDATOR-437: Update 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).
o VALIDATOR-460: Update Apache Commons BeanUtils dependency from 1.9.3 to 1.9.4
This picks up BEANUTILS-520: Mitigate CVE-2014-0114. Thanks to Jeff Schram.
o VALIDATOR-461: Generic .gmbh top level domain is considered invalid Thanks to Nils Reischmann.
o VALIDATOR-444: LongValidator: numbers bigger than the maxvalue are Valid Thanks to Martin Scholz.
o VALIDATOR-416: CreditCardValidator default ctor disagrees with Javadoc
o VALIDATOR-467: URL validator fails if path starts with double slash and has underscores Thanks to Ivan Larionov.
o VALIDATOR-464: UrlValidator says "file://bad ^ domain.com/label/test" is valid Thanks to Sebastian Choina.
o VALIDATOR-449: Leading and trailing spaces in EmailValidator should not be valid Thanks to Frederic Boutin.
o VALIDATOR-302: EMailValidator: Addresses with leading spaces must not be accepted Thanks to Guido Zockoll.
o VALIDATOR-468: DomainValidator.getTLDArray does not synch mutable arrays

Changes:
o IANA TLD lists: Updated to Version 2017020400, Last Updated Sat Feb 4 07:07:01 2017 UTC
o Update to version 73 of SWIFT IBAN list: added BY (Belarus) and IQ (Iraq); fixed Santa Lucia format
o Drop Clirr and Cobertura in favour of JApiCmp and JaCoCo
o IANA TLD lists: Updated to Version 2020073100, Last Updated Fri Jul 31 07:07:01 2020 UTC
o VALIDATOR-428: Update commons digester to 2.1 Thanks to Matthew Zavislak.


Historical list of changes: http://commons.apache.org/proper/commons-validator/changes-report.html

For complete information on Apache Commons Validator, including instructions on how to submit bug reports,
patches, or suggestions for improvement, see the Apache Apache Commons Validator website:

http://commons.apache.org/proper/commons-validator/
Enjoy!
-Apache Commons Validator team

0 comments on commit 01434f3

Please sign in to comment.