/** * Return <code>fetchSize</code> if it is not <code>0</code>, or the specified * {@link Settings#getFetchSize()}. */ public static final int getFetchSize(int fetchSize, Settings settings) { return fetchSize != 0 ? fetchSize : settings.getFetchSize() != null ? settings.getFetchSize() : 0; }