From 66172dd30e615b926d0bc0d2b9cd996da1809131 Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Wed, 15 Jun 2016 23:21:32 -0500 Subject: [PATCH] Checkstyle fixups. --- .../main/java/org/hibernate/dialect/Dialect.java | 13 +++++++------ .../hibernate/loader/criteria/CriteriaLoader.java | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java index fbac5d1cff..6500b85c28 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java @@ -698,7 +698,7 @@ public abstract class Dialect implements ConversionContext { * @param name The Hibernate {@link org.hibernate.type.Type} name */ protected void registerHibernateType(int code, long capacity, String name) { - hibernateTypeNames.put( code, capacity, name); + hibernateTypeNames.put( code, capacity, name ); } /** @@ -709,7 +709,7 @@ public abstract class Dialect implements ConversionContext { * @param name The Hibernate {@link org.hibernate.type.Type} name */ protected void registerHibernateType(int code, String name) { - hibernateTypeNames.put( code, name); + hibernateTypeNames.put( code, name ); } @@ -1240,7 +1240,7 @@ public abstract class Dialect implements ConversionContext { public String getWriteLockString(String aliases, int timeout) { // by default we simply return the getWriteLockString(timeout) result since // the default is to say no support for "FOR UPDATE OF ..." - return getWriteLockString(timeout); + return getWriteLockString( timeout ); } /** @@ -1268,7 +1268,7 @@ public abstract class Dialect implements ConversionContext { public String getReadLockString(String aliases, int timeout) { // by default we simply return the getReadLockString(timeout) result since // the default is to say no support for "FOR UPDATE OF ..." - return getReadLockString(timeout); + return getReadLockString( timeout ); } /** @@ -1796,7 +1796,7 @@ public abstract class Dialect implements ConversionContext { protected void registerKeyword(String word) { // When tokens are checked for keywords, they are always compared against the lower-case version of the token. // For instance, Template#renderWhereStringTemplate transforms all tokens to lower-case too. - sqlKeywords.add(word.toLowerCase(Locale.ROOT)); + sqlKeywords.add( word.toLowerCase( Locale.ROOT ) ); } /** @@ -2407,7 +2407,7 @@ public abstract class Dialect implements ConversionContext { orderByElement.append( " " ).append( order ); } if ( nulls != NullPrecedence.NONE ) { - orderByElement.append( " nulls " ).append( nulls.name().toLowerCase(Locale.ROOT) ); + orderByElement.append( " nulls " ).append( nulls.name().toLowerCase( Locale.ROOT ) ); } return orderByElement.toString(); } @@ -2650,6 +2650,7 @@ public abstract class Dialect implements ConversionContext { * * @return {@code true} indicates that the dialect requests that locking be applied by subsequent select; * {@code false} (the default) indicates that locking should be applied to the main SQL statement.. + * @deprecated Use {@link #useFollowOnLocking(QueryParameters)} instead. */ @Deprecated public boolean useFollowOnLocking() { diff --git a/hibernate-core/src/main/java/org/hibernate/loader/criteria/CriteriaLoader.java b/hibernate-core/src/main/java/org/hibernate/loader/criteria/CriteriaLoader.java index 9924898a85..7400b392e7 100644 --- a/hibernate-core/src/main/java/org/hibernate/loader/criteria/CriteriaLoader.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/criteria/CriteriaLoader.java @@ -207,8 +207,8 @@ public class CriteriaLoader extends OuterJoinLoader { if ( ( parameters.getLockOptions().getFollowOnLocking() == null && dialect.useFollowOnLocking( parameters ) ) || ( parameters.getLockOptions().getFollowOnLocking() != null && parameters.getLockOptions().getFollowOnLocking() ) ) { - final LockMode lockMode = determineFollowOnLockMode( lockOptions ); - if( lockMode != LockMode.UPGRADE_SKIPLOCKED ) { + final LockMode lockMode = determineFollowOnLockMode( lockOptions ); + if ( lockMode != LockMode.UPGRADE_SKIPLOCKED ) { // Dialect prefers to perform locking in a separate step LOG.usingFollowOnLocking();