File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
hibernate-core/src/main/java/org/hibernate/id/enhanced Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -282,9 +282,9 @@ public boolean applyIncrementSizeToSourceValues() {
282
282
* <p/>
283
283
* The general algorithms used to determine the bucket are:<ol>
284
284
* <li>{@code upperLimit = (databaseValue * incrementSize) + 1}</li>
285
- * <li>{@code lowerLimit = upperLimit - 1 }</li>
285
+ * <li>{@code lowerLimit = upperLimit - incrementSize }</li>
286
286
* </ol>
287
- * As an example, consider a case with incrementSize of 10 . Initially the
287
+ * As an example, consider a case with incrementSize of 20 . Initially the
288
288
* database holds 1:<ol>
289
289
* <li>{@code upperLimit = (1 * 20) + 1 = 21}</li>
290
290
* <li>{@code lowerLimit = 21 - 20 = 1}</li>
@@ -457,7 +457,9 @@ public synchronized Serializable generate(AccessCallback callback) {
457
457
// we are using a sequence...
458
458
if (value .lt (1 )) LOG .pooledOptimizerReportedInitialValue (value );
459
459
// the call to obtain next-value just gave us the initialValue
460
- if ((initialValue == -1 && value .lt (incrementSize )) || value .eq (initialValue )) hiValue = callback .getNextValue ();
460
+ if ( ( initialValue == -1 && value .lt ( incrementSize ) ) || value .eq ( initialValue ) ) {
461
+ hiValue = callback .getNextValue ();
462
+ }
461
463
else {
462
464
hiValue = value ;
463
465
value = hiValue .copy ().subtract ( incrementSize );
You can’t perform that action at this time.
0 commit comments