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 19, 2015
1 parent cf1971b commit d5951c6
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 110 deletions.
1 change: 0 additions & 1 deletion build.gradle
Expand Up @@ -238,7 +238,6 @@ subprojects { subProject ->
sourceSets = [ subProject.sourceSets.main ]
configFile = rootProject.file( 'shared/config/checkstyle/checkstyle.xml' )
showViolations = false
ignoreFailures = true
}
// exclude generated java sources - by explicitly setting the base source dir
checkstyleMain.source = 'src/main/java'
Expand Down
Expand Up @@ -28,4 +28,4 @@
<p>
Classes in this package extend the ANTLR-generated parser classes.
</p>
</body></html>
</body></html>
Expand Up @@ -395,8 +395,8 @@ public void naturalIdQueryExecuted(String regionName, long time) {
boolean isLongestQuery;
//noinspection StatementWithEmptyBody
for ( long old = naturalIdQueryExecutionMaxTime.get();
( isLongestQuery = time > old ) && ( !naturalIdQueryExecutionMaxTime.compareAndSet( old, time ) );
old = naturalIdQueryExecutionMaxTime.get() ) {
( isLongestQuery = time > old ) && ( !naturalIdQueryExecutionMaxTime.compareAndSet( old, time ) );
old = naturalIdQueryExecutionMaxTime.get() ) {
// nothing to do here given the odd loop structure...
}
if ( isLongestQuery && regionName != null ) {
Expand All @@ -409,13 +409,13 @@ public void naturalIdQueryExecuted(String regionName, long time) {

@Override
public void queryExecuted(String hql, int rows, long time) {
LOG.hql(hql, time, (long) rows );
LOG.hql(hql, time, (long) rows );
queryExecutionCount.getAndIncrement();
boolean isLongestQuery;
//noinspection StatementWithEmptyBody
for ( long old = queryExecutionMaxTime.get();
( isLongestQuery = time > old ) && ( !queryExecutionMaxTime.compareAndSet( old, time ) );
old = queryExecutionMaxTime.get() ) {
( isLongestQuery = time > old ) && ( !queryExecutionMaxTime.compareAndSet( old, time ) );
old = queryExecutionMaxTime.get() ) {
// nothing to do here given the odd loop structure...
}
if ( isLongestQuery ) {
Expand Down Expand Up @@ -860,7 +860,7 @@ public long getOptimisticFailureCount() {
}

@Override
public String toString() {
public String toString() {
return new StringBuilder()
.append( "Statistics[" )
.append( "start time=" ).append( startTime )
Expand Down
Expand Up @@ -63,16 +63,15 @@
import org.hibernate.type.EntityType;
import org.hibernate.type.Type;

import org.jboss.logging.Logger;
import static org.hibernate.internal.CoreLogging.messageLogger;

/**
* Centralizes metamodel information about an entity.
*
* @author Steve Ebersole
*/
public class EntityMetamodel implements Serializable {

private static final CoreMessageLogger LOG = Logger.getMessageLogger(CoreMessageLogger.class, EntityMetamodel.class.getName());
private static final CoreMessageLogger LOG = messageLogger( EntityMetamodel.class );

private static final int NO_VERSION_INDX = -66;

Expand Down Expand Up @@ -331,7 +330,7 @@ else if ( timing == GenerationTiming.ALWAYS ) {
hasNonIdentifierPropertyNamedId = foundNonIdentifierPropertyNamedId;
versionPropertyIndex = tempVersionProperty;
hasLazyProperties = hasLazy;
if (hasLazyProperties) {
if (hasLazyProperties) {
LOG.lazyPropertyFetchingAvailable(name);
}

Expand Down
@@ -0,0 +1,43 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) $year, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/

/**
* Defines handling of the standard JDBC-defined types.
*
* We omit certain JDBC types here solely because Hibernate does not use them itself, not due to any
* inability to provide proper descriptors for them. Known omissions include:<ul>
* <li>{@link java.sql.Types#ARRAY ARRAY}</li>
* <li>{@link java.sql.Types#DATALINK DATALINK}</li>
* <li>{@link java.sql.Types#DISTINCT DISTINCT}</li>
* <li>{@link java.sql.Types#STRUCT STRUCT}</li>
* <li>{@link java.sql.Types#REF REF}</li>
* <li>{@link java.sql.Types#JAVA_OBJECT JAVA_OBJECT}</li>
* </ul>
* <p/>
* 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>
* for more information.
*
* @see java.sql.Types
*/
package org.hibernate.type.descriptor.sql;

This file was deleted.

Expand Up @@ -23,61 +23,13 @@
*/
package org.hibernate.cache.ehcache.management.impl;

import java.awt.Color;

/**
* CacheRegionUtils
*
* @author gkeim
*/
@SuppressWarnings("UnusedDeclaration")
public abstract class CacheRegionUtils {
/**
* HIT_COLOR
*/
public static final Color HIT_COLOR = Color.green;

/**
* MISS_COLOR
*/
public static final Color MISS_COLOR = Color.red;

/**
* PUT_COLOR
*/
public static final Color PUT_COLOR = Color.blue;

/**
* HIT_FILL_COLOR
*/
public static final Color HIT_FILL_COLOR = CacheRegionUtils.HIT_COLOR.brighter().brighter().brighter();

/**
* MISS_FILL_COLOR
*/
public static final Color MISS_FILL_COLOR = CacheRegionUtils.MISS_COLOR.brighter().brighter().brighter();

/**
* PUT_FILL_COLOR
*/
public static final Color PUT_FILL_COLOR = CacheRegionUtils.PUT_COLOR.brighter().brighter().brighter();

/**
* HIT_DRAW_COLOR
*/
public static final Color HIT_DRAW_COLOR = CacheRegionUtils.HIT_COLOR.darker();

/**
* MISS_DRAW_COLOR
*/
public static final Color MISS_DRAW_COLOR = CacheRegionUtils.MISS_COLOR.darker();

/**
* PUT_DRAW_COLOR
*/
public static final Color PUT_DRAW_COLOR = CacheRegionUtils.PUT_COLOR.darker();


/**
* Determine a short name from the full name
*
Expand Down
Expand Up @@ -69,7 +69,7 @@
* @author Steve Ebersole
*/
public class PersistenceXmlParser {
private static final EntityManagerMessageLogger LOG = messageLogger( PersistenceXmlParser.class );
private static final EntityManagerMessageLogger LOG = messageLogger( PersistenceXmlParser.class );

private final ClassLoaderService classLoaderService;
private final PersistenceUnitTransactionType defaultTransactionType;
Expand Down

0 comments on commit d5951c6

Please sign in to comment.