Skip to content

Commit bd552fe

Browse files
committed
code format and correct javadoc
1 parent 81c505c commit bd552fe

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

hibernate-core/src/main/java/org/hibernate/id/enhanced/OptimizerFactory.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ public boolean applyIncrementSizeToSourceValues() {
282282
* <p/>
283283
* The general algorithms used to determine the bucket are:<ol>
284284
* <li>{@code upperLimit = (databaseValue * incrementSize) + 1}</li>
285-
* <li>{@code lowerLimit = upperLimit - 1}</li>
285+
* <li>{@code lowerLimit = upperLimit - incrementSize}</li>
286286
* </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
288288
* database holds 1:<ol>
289289
* <li>{@code upperLimit = (1 * 20) + 1 = 21}</li>
290290
* <li>{@code lowerLimit = 21 - 20 = 1}</li>
@@ -457,7 +457,9 @@ public synchronized Serializable generate(AccessCallback callback) {
457457
// we are using a sequence...
458458
if (value.lt(1)) LOG.pooledOptimizerReportedInitialValue(value);
459459
// 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+
}
461463
else {
462464
hiValue = value;
463465
value = hiValue.copy().subtract( incrementSize );

0 commit comments

Comments
 (0)