Skip to content
Permalink
Browse files
fix XML mappings descriptor and XML group conversion parsing
  • Loading branch information
mbenson committed Oct 16, 2018
1 parent 395f6df commit 3b30b86c3966d646082d714f972a37c17a96de1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
@@ -45,6 +45,7 @@
import javax.validation.ConstraintTarget;
import javax.validation.Payload;
import javax.validation.ValidationException;
import javax.validation.groups.Default;
import javax.xml.bind.JAXBElement;

import org.apache.bval.jsr.ConstraintAnnotationAttributes;
@@ -294,7 +295,8 @@ SELF withGetGroupConversions(Function<D, List<GroupConversionType>> getGroupConv

this.getGroupConversions = new Lazy<>(() -> {
return getGroupConversions.apply(descriptor).stream().map(gc -> {
final Class<?> source = resolveClass(gc.getFrom());
final String from = gc.getFrom();
final Class<?> source = from == null ? Default.class : resolveClass(from);
final Class<?> target = resolveClass(gc.getTo());
return GroupConversion.from(source).to(target);
}).collect(ToUnmodifiable.set());
@@ -41,7 +41,7 @@
</xs:sequence>
</xs:complexType>
<xs:complexType name="groupConversionType">
<xs:attribute type="xs:string" name="from" use="required" />
<xs:attribute type="xs:string" name="from" use="optional" />
<xs:attribute type="xs:string" name="to" use="required" />
</xs:complexType>
<xs:complexType name="constraint-mappingsType">

0 comments on commit 3b30b86

Please sign in to comment.