Hibernate's implementation of javax.persistence.Query.setMaxResults(0) seems incorrect

Description

The javax.persistence.Query.setMaxResults(int) method's javadoc says

Set the maximum number of results to retrieve.

Parameters:
maxResult - maximum number of results to retrieve

Throws:
IllegalArgumentException - if the argument is negative

there seems nothing in the javadoc suggesting 0 is a special value, equivalent to "no limits". Yet, Hibernate (in org.hibernate.internal.AbstractQueryImpl.setMaxResults(int)) seems to disregard 0 value.

Environment

None

Assignee

Unassigned

Reporter

Piotr Findeisen

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure