Skip to content

Commit d5951c6

Browse files
committed
HHH-9803 - Checkstyle fix ups
1 parent cf1971b commit d5951c6

File tree

8 files changed

+54
-110
lines changed

8 files changed

+54
-110
lines changed

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ subprojects { subProject ->
238238
sourceSets = [ subProject.sourceSets.main ]
239239
configFile = rootProject.file( 'shared/config/checkstyle/checkstyle.xml' )
240240
showViolations = false
241-
ignoreFailures = true
242241
}
243242
// exclude generated java sources - by explicitly setting the base source dir
244243
checkstyleMain.source = 'src/main/java'

hibernate-core/src/main/java/org/hibernate/hql/internal/ast/package.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
<p>
2929
Classes in this package extend the ANTLR-generated parser classes.
3030
</p>
31-
</body></html>
31+
</body></html>

hibernate-core/src/main/java/org/hibernate/stat/internal/ConcurrentStatisticsImpl.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ public void naturalIdQueryExecuted(String regionName, long time) {
395395
boolean isLongestQuery;
396396
//noinspection StatementWithEmptyBody
397397
for ( long old = naturalIdQueryExecutionMaxTime.get();
398-
( isLongestQuery = time > old ) && ( !naturalIdQueryExecutionMaxTime.compareAndSet( old, time ) );
399-
old = naturalIdQueryExecutionMaxTime.get() ) {
398+
( isLongestQuery = time > old ) && ( !naturalIdQueryExecutionMaxTime.compareAndSet( old, time ) );
399+
old = naturalIdQueryExecutionMaxTime.get() ) {
400400
// nothing to do here given the odd loop structure...
401401
}
402402
if ( isLongestQuery && regionName != null ) {
@@ -409,13 +409,13 @@ public void naturalIdQueryExecuted(String regionName, long time) {
409409

410410
@Override
411411
public void queryExecuted(String hql, int rows, long time) {
412-
LOG.hql(hql, time, (long) rows );
412+
LOG.hql(hql, time, (long) rows );
413413
queryExecutionCount.getAndIncrement();
414414
boolean isLongestQuery;
415415
//noinspection StatementWithEmptyBody
416416
for ( long old = queryExecutionMaxTime.get();
417-
( isLongestQuery = time > old ) && ( !queryExecutionMaxTime.compareAndSet( old, time ) );
418-
old = queryExecutionMaxTime.get() ) {
417+
( isLongestQuery = time > old ) && ( !queryExecutionMaxTime.compareAndSet( old, time ) );
418+
old = queryExecutionMaxTime.get() ) {
419419
// nothing to do here given the odd loop structure...
420420
}
421421
if ( isLongestQuery ) {
@@ -860,7 +860,7 @@ public long getOptimisticFailureCount() {
860860
}
861861

862862
@Override
863-
public String toString() {
863+
public String toString() {
864864
return new StringBuilder()
865865
.append( "Statistics[" )
866866
.append( "start time=" ).append( startTime )

hibernate-core/src/main/java/org/hibernate/tuple/entity/EntityMetamodel.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,15 @@
6363
import org.hibernate.type.EntityType;
6464
import org.hibernate.type.Type;
6565

66-
import org.jboss.logging.Logger;
66+
import static org.hibernate.internal.CoreLogging.messageLogger;
6767

6868
/**
6969
* Centralizes metamodel information about an entity.
7070
*
7171
* @author Steve Ebersole
7272
*/
7373
public class EntityMetamodel implements Serializable {
74-
75-
private static final CoreMessageLogger LOG = Logger.getMessageLogger(CoreMessageLogger.class, EntityMetamodel.class.getName());
74+
private static final CoreMessageLogger LOG = messageLogger( EntityMetamodel.class );
7675

7776
private static final int NO_VERSION_INDX = -66;
7877

@@ -331,7 +330,7 @@ else if ( timing == GenerationTiming.ALWAYS ) {
331330
hasNonIdentifierPropertyNamedId = foundNonIdentifierPropertyNamedId;
332331
versionPropertyIndex = tempVersionProperty;
333332
hasLazyProperties = hasLazy;
334-
if (hasLazyProperties) {
333+
if (hasLazyProperties) {
335334
LOG.lazyPropertyFetchingAvailable(name);
336335
}
337336

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Hibernate, Relational Persistence for Idiomatic Java
3+
*
4+
* Copyright (c) $year, Red Hat Inc. or third-party contributors as
5+
* indicated by the @author tags or express copyright attribution
6+
* statements applied by the authors. All third-party contributions are
7+
* distributed under license by Red Hat Inc.
8+
*
9+
* This copyrighted material is made available to anyone wishing to use, modify,
10+
* copy, or redistribute it subject to the terms and conditions of the GNU
11+
* Lesser General Public License, as published by the Free Software Foundation.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15+
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
16+
* for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public License
19+
* along with this distribution; if not, write to:
20+
* Free Software Foundation, Inc.
21+
* 51 Franklin Street, Fifth Floor
22+
* Boston, MA 02110-1301 USA
23+
*/
24+
25+
/**
26+
* Defines handling of the standard JDBC-defined types.
27+
*
28+
* We omit certain JDBC types here solely because Hibernate does not use them itself, not due to any
29+
* inability to provide proper descriptors for them. Known omissions include:<ul>
30+
* <li>{@link java.sql.Types#ARRAY ARRAY}</li>
31+
* <li>{@link java.sql.Types#DATALINK DATALINK}</li>
32+
* <li>{@link java.sql.Types#DISTINCT DISTINCT}</li>
33+
* <li>{@link java.sql.Types#STRUCT STRUCT}</li>
34+
* <li>{@link java.sql.Types#REF REF}</li>
35+
* <li>{@link java.sql.Types#JAVA_OBJECT JAVA_OBJECT}</li>
36+
* </ul>
37+
* <p/>
38+
* See <a href="http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/mapping.html#996857">http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/mapping.html#996857</a>
39+
* for more information.
40+
*
41+
* @see java.sql.Types
42+
*/
43+
package org.hibernate.type.descriptor.sql;

hibernate-core/src/main/java/org/hibernate/type/descriptor/sql/package.html

Lines changed: 0 additions & 49 deletions
This file was deleted.

hibernate-ehcache/src/main/java/org/hibernate/cache/ehcache/management/impl/CacheRegionUtils.java

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -23,61 +23,13 @@
2323
*/
2424
package org.hibernate.cache.ehcache.management.impl;
2525

26-
import java.awt.Color;
27-
2826
/**
2927
* CacheRegionUtils
3028
*
3129
* @author gkeim
3230
*/
3331
@SuppressWarnings("UnusedDeclaration")
3432
public abstract class CacheRegionUtils {
35-
/**
36-
* HIT_COLOR
37-
*/
38-
public static final Color HIT_COLOR = Color.green;
39-
40-
/**
41-
* MISS_COLOR
42-
*/
43-
public static final Color MISS_COLOR = Color.red;
44-
45-
/**
46-
* PUT_COLOR
47-
*/
48-
public static final Color PUT_COLOR = Color.blue;
49-
50-
/**
51-
* HIT_FILL_COLOR
52-
*/
53-
public static final Color HIT_FILL_COLOR = CacheRegionUtils.HIT_COLOR.brighter().brighter().brighter();
54-
55-
/**
56-
* MISS_FILL_COLOR
57-
*/
58-
public static final Color MISS_FILL_COLOR = CacheRegionUtils.MISS_COLOR.brighter().brighter().brighter();
59-
60-
/**
61-
* PUT_FILL_COLOR
62-
*/
63-
public static final Color PUT_FILL_COLOR = CacheRegionUtils.PUT_COLOR.brighter().brighter().brighter();
64-
65-
/**
66-
* HIT_DRAW_COLOR
67-
*/
68-
public static final Color HIT_DRAW_COLOR = CacheRegionUtils.HIT_COLOR.darker();
69-
70-
/**
71-
* MISS_DRAW_COLOR
72-
*/
73-
public static final Color MISS_DRAW_COLOR = CacheRegionUtils.MISS_COLOR.darker();
74-
75-
/**
76-
* PUT_DRAW_COLOR
77-
*/
78-
public static final Color PUT_DRAW_COLOR = CacheRegionUtils.PUT_COLOR.darker();
79-
80-
8133
/**
8234
* Determine a short name from the full name
8335
*

hibernate-entitymanager/src/main/java/org/hibernate/jpa/boot/internal/PersistenceXmlParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
* @author Steve Ebersole
7070
*/
7171
public class PersistenceXmlParser {
72-
private static final EntityManagerMessageLogger LOG = messageLogger( PersistenceXmlParser.class );
72+
private static final EntityManagerMessageLogger LOG = messageLogger( PersistenceXmlParser.class );
7373

7474
private final ClassLoaderService classLoaderService;
7575
private final PersistenceUnitTransactionType defaultTransactionType;

0 commit comments

Comments
 (0)