Skip to content

Commit

Permalink
HHH-9803 - Checkstyle fix ups
Browse files Browse the repository at this point in the history
  • Loading branch information
sebersole committed May 18, 2015
1 parent bb3998b commit 611f8a0
Show file tree
Hide file tree
Showing 176 changed files with 3,929 additions and 3,206 deletions.
Expand Up @@ -29,5 +29,5 @@
* @author Steve Ebersole * @author Steve Ebersole
*/ */
public interface SubEntityInfo extends EntityInfo { public interface SubEntityInfo extends EntityInfo {
String getExtends(); String getExtends();
} }
Expand Up @@ -50,8 +50,8 @@
import org.hibernate.exception.spi.TemplatedViolatedConstraintNameExtracter; import org.hibernate.exception.spi.TemplatedViolatedConstraintNameExtracter;
import org.hibernate.exception.spi.ViolatedConstraintNameExtracter; import org.hibernate.exception.spi.ViolatedConstraintNameExtracter;
import org.hibernate.hql.spi.id.IdTableSupportStandardImpl; import org.hibernate.hql.spi.id.IdTableSupportStandardImpl;
import org.hibernate.hql.spi.id.global.GlobalTemporaryTableBulkIdStrategy;
import org.hibernate.hql.spi.id.MultiTableBulkIdStrategy; import org.hibernate.hql.spi.id.MultiTableBulkIdStrategy;
import org.hibernate.hql.spi.id.global.GlobalTemporaryTableBulkIdStrategy;
import org.hibernate.hql.spi.id.local.AfterUseAction; import org.hibernate.hql.spi.id.local.AfterUseAction;
import org.hibernate.internal.util.JdbcExceptionHelper; import org.hibernate.internal.util.JdbcExceptionHelper;
import org.hibernate.procedure.internal.StandardCallableStatementSupport; import org.hibernate.procedure.internal.StandardCallableStatementSupport;
Expand All @@ -78,8 +78,7 @@ public String processSql(String sql, RowSelection selection) {
final boolean hasOffset = LimitHelper.hasFirstRow( selection ); final boolean hasOffset = LimitHelper.hasFirstRow( selection );
sql = sql.trim(); sql = sql.trim();
boolean isForUpdate = false; boolean isForUpdate = false;
if (sql.toLowerCase(Locale.ROOT if (sql.toLowerCase(Locale.ROOT).endsWith( " for update" )) {
).endsWith( " for update" )) {
sql = sql.substring( 0, sql.length() - 11 ); sql = sql.substring( 0, sql.length() - 11 );
isForUpdate = true; isForUpdate = true;
} }
Expand Down
Expand Up @@ -35,7 +35,6 @@
import org.hibernate.persister.collection.QueryableCollection; import org.hibernate.persister.collection.QueryableCollection;
import org.hibernate.persister.entity.EntityPersister; import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.persister.entity.Queryable; import org.hibernate.persister.entity.Queryable;
import org.hibernate.sql.JoinFragment;
import org.hibernate.sql.JoinType; import org.hibernate.sql.JoinType;
import org.hibernate.type.CollectionType; import org.hibernate.type.CollectionType;
import org.hibernate.type.EntityType; import org.hibernate.type.EntityType;
Expand All @@ -61,8 +60,8 @@ public class DotNode extends FromReferenceNode implements DisplayableNode, Selec
public static boolean useThetaStyleImplicitJoins; public static boolean useThetaStyleImplicitJoins;
public static boolean regressionStyleJoinSuppression; public static boolean regressionStyleJoinSuppression;


public static interface IllegalCollectionDereferenceExceptionBuilder { public interface IllegalCollectionDereferenceExceptionBuilder {
public QueryException buildIllegalCollectionDereferenceException( QueryException buildIllegalCollectionDereferenceException(
String collectionPropertyName, String collectionPropertyName,
FromReferenceNode lhs); FromReferenceNode lhs);
} }
Expand Down Expand Up @@ -126,7 +125,7 @@ public static enum DereferenceType {
* *
* @param joinType The type of join to use. * @param joinType The type of join to use.
* *
* @see JoinFragment * @see org.hibernate.sql.JoinFragment
*/ */
public void setJoinType(JoinType joinType) { public void setJoinType(JoinType joinType) {
this.joinType = joinType; this.joinType = joinType;
Expand Down
Expand Up @@ -90,7 +90,9 @@ public void token(String token, QueryTranslatorImpl q) throws QueryException {
} }


//ignore whitespace //ignore whitespace
if ( ParserHelper.isWhitespace( token ) ) return; if ( ParserHelper.isWhitespace( token ) ) {
return;
}


//do replacements //do replacements
String substoken = ( String ) replacements.get( token ); String substoken = ( String ) replacements.get( token );
Expand Down
Expand Up @@ -25,7 +25,6 @@


import java.io.Serializable; import java.io.Serializable;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
Expand Down
Expand Up @@ -68,7 +68,6 @@
import org.hibernate.SQLQuery; import org.hibernate.SQLQuery;
import org.hibernate.ScrollMode; import org.hibernate.ScrollMode;
import org.hibernate.ScrollableResults; import org.hibernate.ScrollableResults;
import org.hibernate.Session;
import org.hibernate.SessionBuilder; import org.hibernate.SessionBuilder;
import org.hibernate.SessionEventListener; import org.hibernate.SessionEventListener;
import org.hibernate.SessionException; import org.hibernate.SessionException;
Expand Down Expand Up @@ -169,7 +168,7 @@
* Concrete implementation of a Session. * Concrete implementation of a Session.
* <p/> * <p/>
* Exposes two interfaces:<ul> * Exposes two interfaces:<ul>
* <li>{@link Session} to the application</li> * <li>{@link org.hibernate.Session} to the application</li>
* <li>{@link org.hibernate.engine.spi.SessionImplementor} to other Hibernate components (SPI)</li> * <li>{@link org.hibernate.engine.spi.SessionImplementor} to other Hibernate components (SPI)</li>
* </ul> * </ul>
* <p/> * <p/>
Expand Down
Expand Up @@ -1504,9 +1504,7 @@ void rehash() {
// Reuse trailing consecutive sequence at same slot // Reuse trailing consecutive sequence at same slot
HashEntry<K, V> lastRun = e; HashEntry<K, V> lastRun = e;
int lastIdx = idx; int lastIdx = idx;
for ( HashEntry<K, V> last = next; for ( HashEntry<K, V> last = next; last != null; last = last.next ) {
last != null;
last = last.next ) {
int k = last.hash & sizeMask; int k = last.hash & sizeMask;
if ( k != lastIdx ) { if ( k != lastIdx ) {
lastIdx = k; lastIdx = k;
Expand Down
Expand Up @@ -42,7 +42,6 @@
import java.util.Collection; import java.util.Collection;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.IdentityHashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
Expand Down Expand Up @@ -181,7 +180,7 @@ public static enum ReferenceType {
public static enum Option { public static enum Option {
/** /**
* Indicates that referential-equality (== instead of .equals()) should * Indicates that referential-equality (== instead of .equals()) should
* be used when locating keys. This offers similar behavior to {@link IdentityHashMap} * be used when locating keys. This offers similar behavior to {@link java.util.IdentityHashMap}
*/ */
IDENTITY_COMPARISONS IDENTITY_COMPARISONS
} }
Expand Down Expand Up @@ -814,9 +813,7 @@ int rehash() {
// Reuse trailing consecutive sequence at same slot // Reuse trailing consecutive sequence at same slot
HashEntry<K, V> lastRun = e; HashEntry<K, V> lastRun = e;
int lastIdx = idx; int lastIdx = idx;
for ( HashEntry<K, V> last = next; for ( HashEntry<K, V> last = next; last != null; last = last.next ) {
last != null;
last = last.next ) {
int k = last.hash & sizeMask; int k = last.hash & sizeMask;
if ( k != lastIdx ) { if ( k != lastIdx ) {
lastIdx = k; lastIdx = k;
Expand Down Expand Up @@ -1674,8 +1671,7 @@ public V nextElement() {
/* /*
* This class is needed for JDK5 compatibility. * This class is needed for JDK5 compatibility.
*/ */
static class SimpleEntry<K, V> implements Entry<K, V>, static class SimpleEntry<K, V> implements Entry<K, V>, java.io.Serializable {
java.io.Serializable {
private static final long serialVersionUID = -8499721149061103585L; private static final long serialVersionUID = -8499721149061103585L;


private final K key; private final K key;
Expand Down
Expand Up @@ -29,16 +29,15 @@
/** /**
* @author Gavin King * @author Gavin King
*/ */
public final class SingletonIterator implements Iterator { public final class SingletonIterator<T> implements Iterator<T> {

private T value;
private Object value;
private boolean hasNext = true; private boolean hasNext = true;


public boolean hasNext() { public boolean hasNext() {
return hasNext; return hasNext;
} }


public Object next() { public T next() {
if (hasNext) { if (hasNext) {
hasNext = false; hasNext = false;
return value; return value;
Expand All @@ -52,7 +51,7 @@ public void remove() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }


public SingletonIterator(Object value) { public SingletonIterator(T value) {
this.value = value; this.value = value;
} }


Expand Down

0 comments on commit 611f8a0

Please sign in to comment.