This issue can't be edited

Because it belongs to an archived project. Jira admins can restore projects from the archive.

Support JDK8's Optional class

Description

It would be nice to bring support of JDK8's Optional class.

Before JDK8, using Guava Optional class doesn't go very well with bean validation while I guess the user should be able to make the choice of using null values + @NotNull, or using Optional<Value>, but still be able to validate the non-null value

I guess it is a bit related to this:
https://hibernate.atlassian.net/browse/BVAL-202

Environment

None

Activity

Show:

Gunnar Morling February 2, 2017 at 8:54 AM
Edited

Support for this has been added in the course of BVAL-508. Remaining issues to be decided will be handled in follow-up issues.

Hardy Ferentschik October 1, 2013 at 3:01 PM

From a spec point of view this can only be addressed in an upcoming version of Bean Validation (1.2 or even 2). There is, however, already a related issue in Hibernate Validator (https://hibernate.atlassian.net/browse/HV-819#icft=HV-819) which will make this available as provider specific solution.

Needs a thought regarding backwards compatibility of course.

Fixed

Details

Assignee

Reporter

Participants

Gunnar Morling
Hardy Ferentschik
SébastienL

Components

Fix versions

Priority

Created October 1, 2013 at 2:45 PM
Updated February 3, 2017 at 9:25 AM
Resolved February 2, 2017 at 8:54 AM