[bval] branch master updated: cosmetics
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git The following commit(s) were added to refs/heads/master by this push: new d75727b cosmetics d75727b is described below commit d75727bae72973000244149edf413055091aeb69 Author: Thomas Andraschko AuthorDate: Thu Feb 9 13:03:02 2023 +0100 cosmetics --- .gitignore| 1 + bval-jsr/src/main/java/org/apache/bval/jsr/job/ValidationJob.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 492ed91..9f9908c 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ docs/reference/src/main/docbook/en-US/version_info.xml .factorypath atlassian-ide-plugin.xml .externalToolBuilders +profile.jfr \ No newline at end of file diff --git a/bval-jsr/src/main/java/org/apache/bval/jsr/job/ValidationJob.java b/bval-jsr/src/main/java/org/apache/bval/jsr/job/ValidationJob.java index f4a2f2d..d5d6588 100644 --- a/bval-jsr/src/main/java/org/apache/bval/jsr/job/ValidationJob.java +++ b/bval-jsr/src/main/java/org/apache/bval/jsr/job/ValidationJob.java @@ -251,6 +251,7 @@ public abstract class ValidationJob { this.realContext = context; } +@Override void process(GroupStrategy groups, Consumer> sink) { Validate.notNull(sink, "sink"); final Lazy>> propertyFrames = new Lazy<>(this::propertyFrames); @@ -620,7 +621,7 @@ public abstract class ValidationJob { return maybeResults.isPresent() ? maybeResults.get().size() : 0; } -private final String interpolate(String messageTemplate, MessageInterpolator.Context context) { +private String interpolate(String messageTemplate, MessageInterpolator.Context context) { try { return validatorContext.getMessageInterpolator().interpolate(messageTemplate, context); } catch (ValidationException e) {
[bval] branch master updated (af32724 -> 4d27c5d)
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/bval.git from af32724 Merge pull request #18 from apache/dependabot/maven/org.openjfx-javafx-base-19.0.2.1 add 40d376f Bump plexus-velocity from 1.1.3 to 2.0 new 4d27c5d Merge pull request #17 from apache/dependabot/maven/org.codehaus.plexus-plexus-velocity-2.0 The 1 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[bval] 01/01: Merge pull request #17 from apache/dependabot/maven/org.codehaus.plexus-plexus-velocity-2.0
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git commit 4d27c5d168b8474a15fb66fb6d4e2c317042c508 Merge: af32724 40d376f Author: Thomas Andraschko AuthorDate: Thu Feb 9 12:15:17 2023 +0100 Merge pull request #17 from apache/dependabot/maven/org.codehaus.plexus-plexus-velocity-2.0 Bump plexus-velocity from 1.1.3 to 2.0 pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[bval] branch master updated (bd1aba5 -> af32724)
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/bval.git from bd1aba5 Merge pull request #19 from apache/dependabot/maven/org.hibernate-hibernate-validator-8.0.0.Final add 701244d Bump javafx-base from 11 to 19.0.2.1 add af32724 Merge pull request #18 from apache/dependabot/maven/org.openjfx-javafx-base-19.0.2.1 No new revisions were added by this update. Summary of changes: bval-jsr/pom.xml | 2 +- bval-tck/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
[bval] branch master updated (3f013c1 -> bd1aba5)
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/bval.git from 3f013c1 Merge pull request #20 from apache/dependabot/maven/jakarta.activation-jakarta.activation-api-2.1.1 add e5bcc12 Bump hibernate-validator from 7.0.5.Final to 8.0.0.Final add bd1aba5 Merge pull request #19 from apache/dependabot/maven/org.hibernate-hibernate-validator-8.0.0.Final No new revisions were added by this update. Summary of changes: bval-perf/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[bval] branch master updated (c2c5e0e -> 3f013c1)
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/bval.git from c2c5e0e Merge pull request #21 from apache/dependabot/maven/com.sun.xml.bind-jaxb-impl-4.0.2 add 373375f Bump jakarta.activation-api from 2.1.0 to 2.1.1 add 3f013c1 Merge pull request #20 from apache/dependabot/maven/jakarta.activation-jakarta.activation-api-2.1.1 No new revisions were added by this update. Summary of changes: bval-jsr/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
[bval] 01/01: Merge pull request #21 from apache/dependabot/maven/com.sun.xml.bind-jaxb-impl-4.0.2
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git commit c2c5e0e8fd9189f482fb673ba19a7349628f2341 Merge: 59b129f 53747b4 Author: Thomas Andraschko AuthorDate: Thu Feb 9 12:07:31 2023 +0100 Merge pull request #21 from apache/dependabot/maven/com.sun.xml.bind-jaxb-impl-4.0.2 Bump jaxb-impl from 4.0.1 to 4.0.2 bval-jsr/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[bval] branch master updated (59b129f -> c2c5e0e)
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/bval.git from 59b129f RAT add 53747b4 Bump jaxb-impl from 4.0.1 to 4.0.2 new c2c5e0e Merge pull request #21 from apache/dependabot/maven/com.sun.xml.bind-jaxb-impl-4.0.2 The 1 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: bval-jsr/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[bval] branch master updated (bb20e5d -> 59b129f)
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/bval.git from bb20e5d Update README.md new fe80c99 RAT new 59b129f RAT The 2 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: README.md | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-)
[bval] 01/02: RAT
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git commit fe80c996485c5e24cbdea3847ef22323f7f73a6c Author: Thomas Andraschko AuthorDate: Thu Feb 9 12:03:07 2023 +0100 RAT --- README.md | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index edd4f96..9e18402 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,22 @@ -# Apache MyFaces Core
[bval] 02/02: RAT
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git commit 59b129f339f47fe70d51a80988852d5dba8404ec Author: Thomas Andraschko AuthorDate: Thu Feb 9 12:03:23 2023 +0100 RAT --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e18402..8abd986 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - # Apache BVal [![Build Status](https://github.com/apache/bval/workflows/BVal%20CI/badge.svg)](https://github.com/apache/bval/actions/workflows/bval-ci.yml)
[bval] branch master updated: Update README.md
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git The following commit(s) were added to refs/heads/master by this push: new bb20e5d Update README.md bb20e5d is described below commit bb20e5da39530492c4f51fa8434d40f72169146a Author: Thomas Andraschko AuthorDate: Thu Feb 9 11:59:42 2023 +0100 Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c7d5ab..edd4f96 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Apache MyFaces Core -[![Build Status](https://github.com/apache/bval/workflows/BVal%20CI/badge.svg)](https://github.com/apache/myfaces/actions/workflows/bval-ci.yml) +[![Build Status](https://github.com/apache/bval/workflows/BVal%20CI/badge.svg)](https://github.com/apache/bval/actions/workflows/bval-ci.yml) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) This is an implementation of the Java Bean Validation (JSRs 303, 349, 380) specification for Jakarta EE and Java SE.
[bval] branch master updated: fixed name
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git The following commit(s) were added to refs/heads/master by this push: new 36efb7f fixed name 36efb7f is described below commit 36efb7fec3b30e4a958e26cfe417b9b061284a5e Author: Thomas Andraschko AuthorDate: Thu Feb 9 11:59:08 2023 +0100 fixed name --- README.me => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/README.me b/README.md similarity index 100% rename from README.me rename to README.md
[bval] branch master updated: Create README.me
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git The following commit(s) were added to refs/heads/master by this push: new 4d93d5e Create README.me 4d93d5e is described below commit 4d93d5e1787dc91bf7077d0cfb589ea53c38a8d9 Author: Thomas Andraschko AuthorDate: Thu Feb 9 11:58:22 2023 +0100 Create README.me --- README.me | 26 ++ 1 file changed, 26 insertions(+) diff --git a/README.me b/README.me new file mode 100644 index 000..2c7d5ab --- /dev/null +++ b/README.me @@ -0,0 +1,26 @@ +# Apache MyFaces Core +[![Build Status](https://github.com/apache/bval/workflows/BVal%20CI/badge.svg)](https://github.com/apache/myfaces/actions/workflows/bval-ci.yml) +[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) + +This is an implementation of the Java Bean Validation (JSRs 303, 349, 380) specification for Jakarta EE and Java SE. +The technical objective is to provide a class level constraint declaration and validation facility for the Java application developer, as well as a constraint +metadata repository and query API. +See: https://beanvalidation.org/ + +## Branches + +### Master / 3.0.x + +Bean Validation 3.0 implementation + +### 2.x + +Bean Validation 2.x implementation + +### 1.1.x + +Bean Validation 1.x implementation + +## Installation + +mvn clean install
[bval] branch dependabot/maven/jakarta.activation-jakarta.activation-api-2.1.1 created (now 373375f)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/jakarta.activation-jakarta.activation-api-2.1.1 in repository https://gitbox.apache.org/repos/asf/bval.git at 373375f Bump jakarta.activation-api from 2.1.0 to 2.1.1 No new revisions were added by this update.
[bval] branch dependabot/maven/org.openjfx-javafx-base-19.0.2.1 created (now 701244d)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/org.openjfx-javafx-base-19.0.2.1 in repository https://gitbox.apache.org/repos/asf/bval.git at 701244d Bump javafx-base from 11 to 19.0.2.1 No new revisions were added by this update.
[bval] branch dependabot/maven/com.sun.xml.bind-jaxb-impl-4.0.2 created (now 53747b4)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/com.sun.xml.bind-jaxb-impl-4.0.2 in repository https://gitbox.apache.org/repos/asf/bval.git at 53747b4 Bump jaxb-impl from 4.0.1 to 4.0.2 No new revisions were added by this update.
[bval] branch dependabot/maven/org.hibernate-hibernate-validator-8.0.0.Final created (now e5bcc12)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/org.hibernate-hibernate-validator-8.0.0.Final in repository https://gitbox.apache.org/repos/asf/bval.git at e5bcc12 Bump hibernate-validator from 7.0.5.Final to 8.0.0.Final No new revisions were added by this update.
[bval] branch dependabot/maven/org.codehaus.plexus-plexus-velocity-2.0 created (now 40d376f)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/org.codehaus.plexus-plexus-velocity-2.0 in repository https://gitbox.apache.org/repos/asf/bval.git at 40d376f Bump plexus-velocity from 1.1.3 to 2.0 No new revisions were added by this update.
[bval] branch master updated: add dependabot
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git The following commit(s) were added to refs/heads/master by this push: new 2bb6943 add dependabot 2bb6943 is described below commit 2bb69433c28e398c81e9a54886255d10e72684be Author: Thomas Andraschko AuthorDate: Thu Feb 9 11:48:12 2023 +0100 add dependabot --- .github/dependabot.yml | 28 1 file changed, 28 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000..83d68e2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +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 +# +# 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" + \ No newline at end of file
[bval] branch master updated: workaround for arquillian/owb/suite bug
This is an automated email from the ASF dual-hosted git repository. rmannibucau pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git The following commit(s) were added to refs/heads/master by this push: new 19c8cf9 workaround for arquillian/owb/suite bug 19c8cf9 is described below commit 19c8cf9e79cf0bd06f1b8b8e92a940d9e31d5cc4 Author: Romain Manni-Bucau AuthorDate: Thu Feb 9 10:58:45 2023 +0100 workaround for arquillian/owb/suite bug --- .../apache/bval/tck/TCKSuiteOWBEnhancements.java | 63 ++ ...org.jboss.arquillian.core.spi.LoadableExtension | 1 + 2 files changed, 64 insertions(+) diff --git a/bval-tck/src/test/java/org/apache/bval/tck/TCKSuiteOWBEnhancements.java b/bval-tck/src/test/java/org/apache/bval/tck/TCKSuiteOWBEnhancements.java new file mode 100644 index 000..15c827e --- /dev/null +++ b/bval-tck/src/test/java/org/apache/bval/tck/TCKSuiteOWBEnhancements.java @@ -0,0 +1,63 @@ +/* + * 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.bval.tck; + +import org.apache.webbeans.arquillian.standalone.OwbArquillianSingletonService; +import org.apache.webbeans.arquillian.standalone.OwbStandaloneConfiguration; +import org.apache.webbeans.arquillian.standalone.OwbStandaloneContainer; +import org.apache.webbeans.config.WebBeansFinder; +import org.jboss.arquillian.container.spi.client.container.DeployableContainer; +import org.jboss.arquillian.core.spi.LoadableExtension; + +import java.lang.invoke.MethodHandles; +import java.util.Collection; +import java.util.List; + +public class TCKSuiteOWBEnhancements implements LoadableExtension { +@Override +public void register(final ExtensionBuilder extensionBuilder) { +extensionBuilder.override(DeployableContainer.class, OwbStandaloneContainer.class, ExtendedOwbStandaloneContainer.class); +} + +// testng suites handling looks buggy since it does not shutdown previous container when running another suite so this does not work with owb +public static class ExtendedOwbStandaloneContainer extends OwbStandaloneContainer { +@Override +public void setup(final OwbStandaloneConfiguration owbStandaloneConfiguration) { +final var singletonService = WebBeansFinder.getSingletonService(); +if (singletonService instanceof OwbArquillianSingletonService) { +setParent("singletonService", (OwbArquillianSingletonService) singletonService, OwbArquillianSingletonService.class); +setParent("useOnlyArchiveResources", true, boolean.class); +setParent("useOnlyArchiveResourcesExcludes", List.of("META-INF/services/jakarta.validation.spi.ValidationProvider"), Collection.class); +return; +} +super.setup(owbStandaloneConfiguration); +} + +private void setParent(final String field, final T value, final Class type) { +try { +MethodHandles.privateLookupIn(OwbStandaloneContainer.class, MethodHandles.lookup()) +.findSetter(OwbStandaloneContainer.class, field, type) +.bindTo(this) +.invoke(value); +} catch (final Throwable e) { +throw new IllegalStateException(e); +} +} +} +} diff --git a/bval-tck/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/bval-tck/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension new file mode 100644 index 000..535064d --- /dev/null +++ b/bval-tck/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension @@ -0,0 +1 @@ +org.apache.bval.tck.TCKSuiteOWBEnhancements
[bval] branch master updated: fixed some TCK tests
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git The following commit(s) were added to refs/heads/master by this push: new 8e1e72f fixed some TCK tests 8e1e72f is described below commit 8e1e72fb1991442933d9c2f17cf87c62c9fa60bd Author: Thomas Andraschko AuthorDate: Thu Feb 9 10:27:00 2023 +0100 fixed some TCK tests --- .../src/main/java/org/apache/bval/jsr/metadata/XmlBuilder.java | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bval-jsr/src/main/java/org/apache/bval/jsr/metadata/XmlBuilder.java b/bval-jsr/src/main/java/org/apache/bval/jsr/metadata/XmlBuilder.java index 98a2044..ba2f4f3 100644 --- a/bval-jsr/src/main/java/org/apache/bval/jsr/metadata/XmlBuilder.java +++ b/bval-jsr/src/main/java/org/apache/bval/jsr/metadata/XmlBuilder.java @@ -520,15 +520,18 @@ public class XmlBuilder { } @SuppressWarnings("unchecked") -private Class loadClass(final String fqn) { +private Class loadClass(String fqn) { ClassLoader loader = Reflection.loaderFromThreadOrClass(XmlBuilder.class); if (loader == null) { loader = getClass().getClassLoader(); } try { +if (fqn != null) { +fqn = fqn.replace("\n", "").replace("\r", "").replaceAll("\\s", "").trim(); +} return (Class) Class.forName(fqn, true, loader); } catch (ClassNotFoundException ex) { -throw Exceptions.create(ValidationException::new, ex, "Unable to load class: %d", fqn); +throw Exceptions.create(ValidationException::new, ex, "Unable to load class: %s", fqn); } }
[bval] branch master updated: fixed some TCK tests
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git The following commit(s) were added to refs/heads/master by this push: new 78abcdd fixed some TCK tests 78abcdd is described below commit 78abcdd7aff8234ef4d806ecdc7ce129990bfe67 Author: Thomas Andraschko AuthorDate: Thu Feb 9 10:07:42 2023 +0100 fixed some TCK tests --- .../java/org/apache/bval/jsr/xml/ValidationParser.java | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/bval-jsr/src/main/java/org/apache/bval/jsr/xml/ValidationParser.java b/bval-jsr/src/main/java/org/apache/bval/jsr/xml/ValidationParser.java index 43ae9a9..d85ac10 100644 --- a/bval-jsr/src/main/java/org/apache/bval/jsr/xml/ValidationParser.java +++ b/bval-jsr/src/main/java/org/apache/bval/jsr/xml/ValidationParser.java @@ -113,13 +113,21 @@ public class ValidationParser { Set constraintMappings = xmlConfig.getConstraintMapping().stream() .map(s -> s.trim()) .collect(Collectors.toSet()); +Set valueExtractor = xmlConfig.getValueExtractor().stream() +.map(s -> s.trim()) +.collect(Collectors.toSet()); String clockProvider = xmlConfig.getClockProvider() == null ? null : xmlConfig.getClockProvider().trim(); - -return new BootstrapConfigurationImpl(xmlConfig.getDefaultProvider(), xmlConfig.getConstraintValidatorFactory(), -xmlConfig.getMessageInterpolator(), xmlConfig.getTraversableResolver(), -xmlConfig.getParameterNameProvider(), constraintMappings, +String messageInterpolator = xmlConfig.getMessageInterpolator() == null ? null : xmlConfig.getMessageInterpolator().trim(); +String parameterNameProvider = xmlConfig.getParameterNameProvider() == null ? null : xmlConfig.getParameterNameProvider().trim(); +String traversableResolver = xmlConfig.getTraversableResolver() == null ? null : xmlConfig.getTraversableResolver().trim(); +String constraintValidatorFactory = xmlConfig.getConstraintValidatorFactory() == null ? null : xmlConfig.getConstraintValidatorFactory().trim(); +String defaultProvider = xmlConfig.getDefaultProvider() == null ? null : xmlConfig.getDefaultProvider().trim(); + +return new BootstrapConfigurationImpl(defaultProvider, constraintValidatorFactory, +messageInterpolator, traversableResolver, +parameterNameProvider, constraintMappings, executableValidationEnabled, defaultValidatedExecutableTypes, toMap(xmlConfig.getProperty()), -clockProvider, new HashSet<>(xmlConfig.getValueExtractor())); +clockProvider, valueExtractor); } public InputStream open(String mappingFileName) {
[bval] branch master updated: fixed some TCK tests
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git The following commit(s) were added to refs/heads/master by this push: new c13f0c5 fixed some TCK tests c13f0c5 is described below commit c13f0c5c56d62faaa2ab7bd5aefd21ab8071 Author: Thomas Andraschko AuthorDate: Thu Feb 9 10:03:50 2023 +0100 fixed some TCK tests --- .../main/java/org/apache/bval/jsr/xml/ValidationParser.java | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bval-jsr/src/main/java/org/apache/bval/jsr/xml/ValidationParser.java b/bval-jsr/src/main/java/org/apache/bval/jsr/xml/ValidationParser.java index 20306fb..43ae9a9 100644 --- a/bval-jsr/src/main/java/org/apache/bval/jsr/xml/ValidationParser.java +++ b/bval-jsr/src/main/java/org/apache/bval/jsr/xml/ValidationParser.java @@ -109,11 +109,17 @@ public class ValidationParser { .map(DefaultValidatedExecutableTypesType::getExecutableType).map(EnumSet::copyOf) .orElse(EnumSet.noneOf(ExecutableType.class)); } + +Set constraintMappings = xmlConfig.getConstraintMapping().stream() +.map(s -> s.trim()) +.collect(Collectors.toSet()); +String clockProvider = xmlConfig.getClockProvider() == null ? null : xmlConfig.getClockProvider().trim(); + return new BootstrapConfigurationImpl(xmlConfig.getDefaultProvider(), xmlConfig.getConstraintValidatorFactory(), xmlConfig.getMessageInterpolator(), xmlConfig.getTraversableResolver(), -xmlConfig.getParameterNameProvider(), new HashSet<>(xmlConfig.getConstraintMapping()), +xmlConfig.getParameterNameProvider(), constraintMappings, executableValidationEnabled, defaultValidatedExecutableTypes, toMap(xmlConfig.getProperty()), -xmlConfig.getClockProvider(), new HashSet<>(xmlConfig.getValueExtractor())); +clockProvider, new HashSet<>(xmlConfig.getValueExtractor())); } public InputStream open(String mappingFileName) { @@ -121,7 +127,6 @@ public class ValidationParser { // Classloader needs a path without a starting / mappingFileName = mappingFileName.substring(1); } -mappingFileName = mappingFileName.trim(); try { final InputStream in = getInputStream(mappingFileName); Exceptions.raiseIf(in == null, ValidationException::new,
[bval] branch master updated: fixed some TCK tests
This is an automated email from the ASF dual-hosted git repository. tandraschko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bval.git The following commit(s) were added to refs/heads/master by this push: new 31a5100 fixed some TCK tests 31a5100 is described below commit 31a510066a54aa0e4101cee195451c4a6bf132bc Author: Thomas Andraschko AuthorDate: Thu Feb 9 09:44:56 2023 +0100 fixed some TCK tests --- bval-jsr/src/main/java/org/apache/bval/jsr/xml/ValidationParser.java | 1 + bval-tck/pom.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bval-jsr/src/main/java/org/apache/bval/jsr/xml/ValidationParser.java b/bval-jsr/src/main/java/org/apache/bval/jsr/xml/ValidationParser.java index e4702e0..20306fb 100644 --- a/bval-jsr/src/main/java/org/apache/bval/jsr/xml/ValidationParser.java +++ b/bval-jsr/src/main/java/org/apache/bval/jsr/xml/ValidationParser.java @@ -121,6 +121,7 @@ public class ValidationParser { // Classloader needs a path without a starting / mappingFileName = mappingFileName.substring(1); } +mappingFileName = mappingFileName.trim(); try { final InputStream in = getInputStream(mappingFileName); Exceptions.raiseIf(in == null, ValidationException::new, diff --git a/bval-tck/pom.xml b/bval-tck/pom.xml index efef7d2..34cdadc 100644 --- a/bval-tck/pom.xml +++ b/bval-tck/pom.xml @@ -31,7 +31,7 @@ under the License. Aggregates dependencies and runs the JSR-380 TCK -3.0.0 +3.0.1 4.0.0-SNAPSHOT 1.7.0.Alpha14 org.apache.bval.jsr.ApacheValidationProvider