Skip to content

Commit 611f8a0

Browse files
committed
HHH-9803 - Checkstyle fix ups
1 parent bb3998b commit 611f8a0

File tree

176 files changed

+3929
-3206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+3929
-3206
lines changed

hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/spi/SubEntityInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
* @author Steve Ebersole
3030
*/
3131
public interface SubEntityInfo extends EntityInfo {
32-
String getExtends();
32+
String getExtends();
3333
}

hibernate-core/src/main/java/org/hibernate/dialect/Oracle8iDialect.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
import org.hibernate.exception.spi.TemplatedViolatedConstraintNameExtracter;
5151
import org.hibernate.exception.spi.ViolatedConstraintNameExtracter;
5252
import org.hibernate.hql.spi.id.IdTableSupportStandardImpl;
53-
import org.hibernate.hql.spi.id.global.GlobalTemporaryTableBulkIdStrategy;
5453
import org.hibernate.hql.spi.id.MultiTableBulkIdStrategy;
54+
import org.hibernate.hql.spi.id.global.GlobalTemporaryTableBulkIdStrategy;
5555
import org.hibernate.hql.spi.id.local.AfterUseAction;
5656
import org.hibernate.internal.util.JdbcExceptionHelper;
5757
import org.hibernate.procedure.internal.StandardCallableStatementSupport;
@@ -78,8 +78,7 @@ public String processSql(String sql, RowSelection selection) {
7878
final boolean hasOffset = LimitHelper.hasFirstRow( selection );
7979
sql = sql.trim();
8080
boolean isForUpdate = false;
81-
if (sql.toLowerCase(Locale.ROOT
82-
).endsWith( " for update" )) {
81+
if (sql.toLowerCase(Locale.ROOT).endsWith( " for update" )) {
8382
sql = sql.substring( 0, sql.length() - 11 );
8483
isForUpdate = true;
8584
}

hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/DotNode.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import org.hibernate.persister.collection.QueryableCollection;
3636
import org.hibernate.persister.entity.EntityPersister;
3737
import org.hibernate.persister.entity.Queryable;
38-
import org.hibernate.sql.JoinFragment;
3938
import org.hibernate.sql.JoinType;
4039
import org.hibernate.type.CollectionType;
4140
import org.hibernate.type.EntityType;
@@ -61,8 +60,8 @@ public class DotNode extends FromReferenceNode implements DisplayableNode, Selec
6160
public static boolean useThetaStyleImplicitJoins;
6261
public static boolean regressionStyleJoinSuppression;
6362

64-
public static interface IllegalCollectionDereferenceExceptionBuilder {
65-
public QueryException buildIllegalCollectionDereferenceException(
63+
public interface IllegalCollectionDereferenceExceptionBuilder {
64+
QueryException buildIllegalCollectionDereferenceException(
6665
String collectionPropertyName,
6766
FromReferenceNode lhs);
6867
}
@@ -126,7 +125,7 @@ public static enum DereferenceType {
126125
*
127126
* @param joinType The type of join to use.
128127
*
129-
* @see JoinFragment
128+
* @see org.hibernate.sql.JoinFragment
130129
*/
131130
public void setJoinType(JoinType joinType) {
132131
this.joinType = joinType;

hibernate-core/src/main/java/org/hibernate/hql/internal/classic/PreprocessingParser.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ public void token(String token, QueryTranslatorImpl q) throws QueryException {
9090
}
9191

9292
//ignore whitespace
93-
if ( ParserHelper.isWhitespace( token ) ) return;
93+
if ( ParserHelper.isWhitespace( token ) ) {
94+
return;
95+
}
9496

9597
//do replacements
9698
String substoken = ( String ) replacements.get( token );

hibernate-core/src/main/java/org/hibernate/internal/CacheImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
import java.io.Serializable;
2727
import java.util.HashMap;
28-
import java.util.Iterator;
2928
import java.util.Map;
3029
import java.util.concurrent.ConcurrentHashMap;
3130
import java.util.concurrent.ConcurrentMap;

hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
import org.hibernate.SQLQuery;
6969
import org.hibernate.ScrollMode;
7070
import org.hibernate.ScrollableResults;
71-
import org.hibernate.Session;
7271
import org.hibernate.SessionBuilder;
7372
import org.hibernate.SessionEventListener;
7473
import org.hibernate.SessionException;
@@ -169,7 +168,7 @@
169168
* Concrete implementation of a Session.
170169
* <p/>
171170
* Exposes two interfaces:<ul>
172-
* <li>{@link Session} to the application</li>
171+
* <li>{@link org.hibernate.Session} to the application</li>
173172
* <li>{@link org.hibernate.engine.spi.SessionImplementor} to other Hibernate components (SPI)</li>
174173
* </ul>
175174
* <p/>

hibernate-core/src/main/java/org/hibernate/internal/util/collections/BoundedConcurrentHashMap.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,9 +1504,7 @@ void rehash() {
15041504
// Reuse trailing consecutive sequence at same slot
15051505
HashEntry<K, V> lastRun = e;
15061506
int lastIdx = idx;
1507-
for ( HashEntry<K, V> last = next;
1508-
last != null;
1509-
last = last.next ) {
1507+
for ( HashEntry<K, V> last = next; last != null; last = last.next ) {
15101508
int k = last.hash & sizeMask;
15111509
if ( k != lastIdx ) {
15121510
lastIdx = k;

hibernate-core/src/main/java/org/hibernate/internal/util/collections/ConcurrentReferenceHashMap.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
import java.util.Collection;
4343
import java.util.EnumSet;
4444
import java.util.Enumeration;
45-
import java.util.IdentityHashMap;
4645
import java.util.Iterator;
4746
import java.util.Map;
4847
import java.util.NoSuchElementException;
@@ -181,7 +180,7 @@ public static enum ReferenceType {
181180
public static enum Option {
182181
/**
183182
* Indicates that referential-equality (== instead of .equals()) should
184-
* be used when locating keys. This offers similar behavior to {@link IdentityHashMap}
183+
* be used when locating keys. This offers similar behavior to {@link java.util.IdentityHashMap}
185184
*/
186185
IDENTITY_COMPARISONS
187186
}
@@ -814,9 +813,7 @@ int rehash() {
814813
// Reuse trailing consecutive sequence at same slot
815814
HashEntry<K, V> lastRun = e;
816815
int lastIdx = idx;
817-
for ( HashEntry<K, V> last = next;
818-
last != null;
819-
last = last.next ) {
816+
for ( HashEntry<K, V> last = next; last != null; last = last.next ) {
820817
int k = last.hash & sizeMask;
821818
if ( k != lastIdx ) {
822819
lastIdx = k;
@@ -1674,8 +1671,7 @@ public V nextElement() {
16741671
/*
16751672
* This class is needed for JDK5 compatibility.
16761673
*/
1677-
static class SimpleEntry<K, V> implements Entry<K, V>,
1678-
java.io.Serializable {
1674+
static class SimpleEntry<K, V> implements Entry<K, V>, java.io.Serializable {
16791675
private static final long serialVersionUID = -8499721149061103585L;
16801676

16811677
private final K key;

hibernate-core/src/main/java/org/hibernate/internal/util/collections/SingletonIterator.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,15 @@
2929
/**
3030
* @author Gavin King
3131
*/
32-
public final class SingletonIterator implements Iterator {
33-
34-
private Object value;
32+
public final class SingletonIterator<T> implements Iterator<T> {
33+
private T value;
3534
private boolean hasNext = true;
3635

3736
public boolean hasNext() {
3837
return hasNext;
3938
}
4039

41-
public Object next() {
40+
public T next() {
4241
if (hasNext) {
4342
hasNext = false;
4443
return value;
@@ -52,7 +51,7 @@ public void remove() {
5251
throw new UnsupportedOperationException();
5352
}
5453

55-
public SingletonIterator(Object value) {
54+
public SingletonIterator(T value) {
5655
this.value = value;
5756
}
5857

0 commit comments

Comments
 (0)