This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Hibernate Validator, declare and validate application constraints | |
* | |
* License: Apache License, Version 2.0 | |
* See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>. | |
*/ | |
package org.hibernate.validator.test.internal.engine.valueextraction; | |
import java.util.HashMap; | |
import java.util.Map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"packages": [ | |
{ | |
"name": "org.hibernate.validator", | |
"reads": [ | |
"org.hibernate.validator.cfg", | |
"org.hibernate.validator.internal.engine", | |
"org.hibernate.validator.metadata", | |
"org.hibernate.validator.spi.properties", | |
"org.hibernate.validator.spi.resourceloading", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to module javassist | |
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:337) | |
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:281) | |
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198) | |
at java.base/java.lang.reflect.Method.setAccessible(Method.java:192) | |
at [email protected]/javassist.util.proxy.SecurityActions.setAccessible(SecurityActions.java:103) | |
at [email protected]/javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:181) | |
at [email protected]/javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:164) | |
at [email protected]/javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[email protected] jar:file:hibernate-validator-6.0.4.Final.jar/!module-info.class | |
exports org.hibernate.validator | |
exports org.hibernate.validator.cfg | |
exports org.hibernate.validator.cfg.context | |
exports org.hibernate.validator.cfg.defs | |
exports org.hibernate.validator.cfg.defs.br | |
exports org.hibernate.validator.cfg.defs.pl | |
exports org.hibernate.validator.constraints | |
exports org.hibernate.validator.constraints.br | |
exports org.hibernate.validator.constraints.pl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean class="Customer" ignore-annotations="false"> | |
<field name="listOfmails"> | |
<!-- typeArgumentIndex optional if there is only one type argument or it's an array --> | |
<containerElementType typeArgumentIndex="0"> | |
<constraint annotation="javax.validation.constraints.Email"/> | |
</containerElementType> | |
</field> | |
<field name="mapOfListOfmails"> | |
<containerElementType typeArgumentIndex="1"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FishTank { | |
public List<Map<String, Set<@NotNull String>>> getTagsOfFishesOfTheWeek() { ... } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Should we reject it? | |
public class DoubleExtractor implements ValueExtractor<Multimap<@ExtractedValue ?, @ExtractedValue ?>> { | |
@Override | |
public void extractValues(Multimap<?, ?> originalValue, ValueExtractor.ValueReceiver receiver) { | |
... | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ValueMapping( source = "BAR", target = "FOO" ) | |
@ValueMapping( source = "<ANY>", target = "DEFAULT" ) | |
@ValueMapping( source = "<ANY_UNMAPPED>", target = "BLUB" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Try { | |
@NotNull(message = "field1", groups = BaseComponent.class) | |
public String field1; | |
@NotNull(message = "field2", groups = Component.class) | |
public String field2; | |
@NotNull(message = "field3", groups = OtherComponent.class) | |
public String field3 = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface SingleValueExtractor<I, O> { | |
O extractValue(I input); | |
// only invoked if invalid; Property name enough as input? | |
Path.Node getNode(String property); | |
} |