-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
Undefined
I have a field annotated like this:
@NotEmpty
public String[] specializations;
When I do a POST request to:
@POST
public Response post(@Valid Doctor body) {...}
with an empty array I get this:
}}{{java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
The cause is this line of code:
It assumes that the array is never empty.