StephenOTT / STIX-Java

STIX 2.x Java Library
MIT License
27 stars 13 forks source link

Remove OptionalAnnotation #78

Closed StephenOTT closed 5 years ago

StephenOTT commented 5 years ago

@anlklsim FYI for you:

Fixed through: https://github.com/StephenOTT/STIX-Java/commit/60724a1b04ea0ecdf0997239d3f1a785798ea3e0

The OptionalAnnotation is not required as Java8 supports bean validation with Optionals. You just need to add the Annotation on the Type

   Optional<@Pattern(regexp = "^(application|audio|font|image|message|model|multipart|text|video)/[a-zA-Z0-9.+_-]+")
            String> getMimeType();