Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View gunnarmorling's full-sized avatar
🤓
Streaming data changes, one at a time.

Gunnar Morling gunnarmorling

🤓
Streaming data changes, one at a time.
View GitHub Profile
org.hibernate.validator@6.0.4.Final 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
<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">
public class FishTank {
public List<Map<String, Set<@NotNull String>>> getTagsOfFishesOfTheWeek() { ... }
}
// Should we reject it?
public class DoubleExtractor implements ValueExtractor<Multimap<@ExtractedValue ?, @ExtractedValue ?>> {
@Override
public void extractValues(Multimap<?, ?> originalValue, ValueExtractor.ValueReceiver receiver) {
...
}
}
@ValueMapping( source = "BAR", target = "FOO" )
@ValueMapping( source = "<ANY>", target = "DEFAULT" )
@ValueMapping( source = "<ANY_UNMAPPED>", target = "BLUB" )
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 = "";
interface SingleValueExtractor<I, O> {
O extractValue(I input);
// only invoked if invalid; Property name enough as input?
Path.Node getNode(String property);
}
class ValueAndPathNode<O> {
Node getPathNode();
O getValue();
}
interface SingleValueExtractor<I, 0> {
ValueAndPathNode<O> extractValue(I input);
}
interface MultiValueExtractor<I, 0> {
// Required to make HV work on JDK 9
https://hibernate.atlassian.net/browse/HV-1049 Don't access annotations from "jdk.internal" package
https://hibernate.atlassian.net/browse/HV-1048 Correctly interpret version string returned by JDK 9
// Other bug fixes we did since 5.2.2
https://hibernate.atlassian.net/browse/HV-1022 Validator.validateValue does not work for JDK-8 TYPE_USE annotations
https://hibernate.atlassian.net/browse/HV-1025 Configuration streams not reusable on IBM JVM
https://hibernate.atlassian.net/browse/HV-1025 Copying PathImpl results in hashCode==0
@Indexed
public class PointOfInterest {
@Id
@DocumentId
@Field(name = "myId")
@NumericField
private byte id;
...