HHH-8741 - More checkstyle cleanups
This commit is contained in:
parent
cd590470c0
commit
7b69aaacb3
|
@ -374,8 +374,7 @@ public final class HqlParser extends HqlBaseParser {
|
|||
if ( LA( 1 ) == DOT && LA( 2 ) != IDENT ) {
|
||||
// See if the second lookahead token can be an identifier.
|
||||
HqlToken t = (HqlToken) LT( 2 );
|
||||
if ( t.isPossibleID() )
|
||||
{
|
||||
if ( t.isPossibleID() ) {
|
||||
// Set it!
|
||||
LT( 2 ).setType( IDENT );
|
||||
if ( LOG.isDebugEnabled() ) {
|
||||
|
|
|
@ -728,8 +728,8 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V>
|
|||
int c = count;
|
||||
if ( c++ > threshold ) {// ensure capacity
|
||||
int reduced = rehash();
|
||||
if ( reduced > 0 ) // adjust from possible weak cleanups
|
||||
{
|
||||
if ( reduced > 0 ) {
|
||||
// adjust from possible weak cleanups
|
||||
count = ( c -= reduced ) - 1; // write-volatile
|
||||
}
|
||||
}
|
||||
|
@ -1842,8 +1842,8 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V>
|
|||
for ( int i = 0; i < tab.length; ++i ) {
|
||||
for ( HashEntry<K, V> e = tab[i]; e != null; e = e.next ) {
|
||||
K key = e.key();
|
||||
if ( key == null ) // Skip GC'd keys
|
||||
{
|
||||
if ( key == null ) {
|
||||
// Skip GC'd keys
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -176,9 +176,8 @@ public class CriteriaQueryTranslator implements CriteriaQuery {
|
|||
// TODO : not so sure this is needed...
|
||||
throw new QueryException( "duplicate association path: " + wholeAssociationPath );
|
||||
}
|
||||
if ( crit.getWithClause() != null )
|
||||
{
|
||||
this.withClauseMap.put(wholeAssociationPath, crit.getWithClause());
|
||||
if ( crit.getWithClause() != null ) {
|
||||
this.withClauseMap.put( wholeAssociationPath, crit.getWithClause() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -320,8 +319,7 @@ public class CriteriaQueryTranslator implements CriteriaQuery {
|
|||
if ( lm != null ) {
|
||||
lockOptions.setAliasSpecificLockMode( getSQLAlias( subcriteria ), lm );
|
||||
}
|
||||
if ( subcriteria.getWithClause() != null )
|
||||
{
|
||||
if ( subcriteria.getWithClause() != null ) {
|
||||
TypedValue[] tv = subcriteria.getWithClause().getTypedValues( subcriteria, this );
|
||||
for ( TypedValue aTv : tv ) {
|
||||
values.add( aTv.getValue() );
|
||||
|
@ -657,17 +655,14 @@ public class CriteriaQueryTranslator implements CriteriaQuery {
|
|||
return propertyName;
|
||||
}
|
||||
|
||||
public String getWithClause(String path)
|
||||
{
|
||||
public String getWithClause(String path) {
|
||||
final Criterion crit = withClauseMap.get(path);
|
||||
return crit == null ? null : crit.toSqlString(getCriteria(path), this);
|
||||
}
|
||||
|
||||
public boolean hasRestriction(String path)
|
||||
{
|
||||
public boolean hasRestriction(String path) {
|
||||
final CriteriaImpl.Subcriteria crit = ( CriteriaImpl.Subcriteria ) getCriteria( path );
|
||||
return crit != null && crit.hasRestriction();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -50,4 +50,7 @@ public class StandardSessionFactoryServiceInitiators {
|
|||
|
||||
return Collections.unmodifiableList( serviceInitiators );
|
||||
}
|
||||
|
||||
private StandardSessionFactoryServiceInitiators() {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
package org.hibernate.cache.ehcache.management.impl;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Color;
|
||||
|
||||
/**
|
||||
* CacheRegionUtils
|
||||
|
|
|
@ -20,14 +20,14 @@ versionInjection {
|
|||
into( 'org.hibernate.jpamodelgen.Version', 'getVersionString' )
|
||||
}
|
||||
|
||||
sourceSets.main {
|
||||
ext.jaxbTargetDir = file( "${buildDir}/generated-sources" )
|
||||
java.srcDir jaxbTargetDir
|
||||
ext {
|
||||
jaxbTargetDir = file( "${buildDir}/generated-sources/jaxb/main" )
|
||||
xsdDir = file( "${projectDir}/src/main/xsd" )
|
||||
}
|
||||
|
||||
sourceSets.main {
|
||||
ext.xsdDir = file( "${projectDir}/src/main/xsd" )
|
||||
resources.srcDir xsdDir
|
||||
java.srcDir jaxbTargetDir
|
||||
resources.srcDir xsdDir
|
||||
}
|
||||
|
||||
compileTestJava {
|
||||
|
@ -44,15 +44,8 @@ jar {
|
|||
}
|
||||
|
||||
task jaxb {
|
||||
// output directory
|
||||
ext.jaxbTargetDir = file( "${buildDir}/generated-sources" )
|
||||
|
||||
// input schema
|
||||
ext.ormXsd = file( 'src/main/xsd/orm_2_0.xsd')
|
||||
ext.persistenceXsd = file( 'src/main/xsd/persistence_2_0.xsd')
|
||||
|
||||
// configure Gradle up-to-date checking
|
||||
inputs.files( [ormXsd, persistenceXsd] )
|
||||
inputs.dir( xsdDir )
|
||||
outputs.dir( jaxbTargetDir )
|
||||
|
||||
// perform actions
|
||||
|
@ -67,7 +60,7 @@ task jaxb {
|
|||
package: 'org.hibernate.jpamodelgen.xml.jaxb',
|
||||
extension: 'true'
|
||||
) {
|
||||
schema (dir:"src/main/xsd", includes:"*.xsd")
|
||||
schema ( dir: xsdDir.path, includes: "*.xsd" )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue