[hibernate-dev] [ORM] RowSelection#definesLimit() looking weird

Guillaume Smet guillaume.smet at gmail.com
Fri Oct 26 05:50:46 EDT 2018


Hi,

RowSelection#definesLimit() [1] is defined as:
    public boolean definesLimits() {
        return maxRows != null || (firstRow != null && firstRow <= 0);
    }

The firstRow <= 0 condition looks exactly like the opposite condition I
would have used intuitively.

Tests pass with either conditions.

Could someone confirm that either it needs fixing or I missed something?

Thanks!

[1]
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/engine/spi/RowSelection.java#L71


More information about the hibernate-dev mailing list