@ SuppressWarnings ( "unchecked" ) public Iterable < ConstraintViolation < ? > > convert ( final ValidationResultInterface psource , final E pbean ) { if ( psource == null ) { return null ; } return psource . getValidationErrorSet ( ) . stream ( ) . map ( violation -> ConstraintViolationImpl . forBeanValidation ( // null , // Collections . emptyMap ( ) , // Collections . emptyMap ( ) , // violation . getMessage ( ) , // ( Class < E > ) ( pbean == null ? null : pbean . getClass ( ) ) , // pbean , // null , // null , // PathImpl . createPathFromString ( violation . getPropertyPath ( ) ) , // null , // null , // null ) ) . collect ( Collectors . toList ( ) ) ; }
convert ValidationResultData from server to a ArrayList&lt ; ConstraintViolation&lt ; ?&gt ; &gt ; which can be handled by gwt .