various cosmetic code improvements

This commit is contained in:
Nathan Xu 2020-03-01 11:07:21 -05:00 committed by Steve Ebersole
parent b3254a2fa6
commit adc87b7908
103 changed files with 143 additions and 162 deletions

View File

@ -27,8 +27,7 @@ public enum ConnectionAcquisitionMode {
AS_NEEDED; AS_NEEDED;
public static ConnectionAcquisitionMode interpret(String value) { public static ConnectionAcquisitionMode interpret(String value) {
if ( value != null if ( "immediate".equalsIgnoreCase( value ) || "immediately".equalsIgnoreCase( value ) ) {
&& ( "immediate".equalsIgnoreCase( value ) || "immediately".equalsIgnoreCase( value ) ) ) {
return IMMEDIATELY; return IMMEDIATELY;
} }

View File

@ -69,14 +69,6 @@ public class DelayedPostInsertIdentifier implements Serializable, Comparable<Del
@Override @Override
public int compareTo(DelayedPostInsertIdentifier that) { public int compareTo(DelayedPostInsertIdentifier that) {
if ( this.identifier < that.identifier ) { return Long.compare( this.identifier, that.identifier );
return -1;
}
else if ( this.identifier > that.identifier ) {
return 1;
}
else {
return 0;
}
} }
} }

View File

@ -161,7 +161,7 @@ public class UnresolvedEntityInsertActions {
for ( Object transientEntity : dependencies.getNonNullableTransientEntities() ) { for ( Object transientEntity : dependencies.getNonNullableTransientEntities() ) {
Set<AbstractEntityInsertAction> dependentActions = dependentActionsByTransientEntity.get( transientEntity ); Set<AbstractEntityInsertAction> dependentActions = dependentActionsByTransientEntity.get( transientEntity );
if ( dependentActions == null ) { if ( dependentActions == null ) {
dependentActions = new IdentitySet(); dependentActions = new IdentitySet<>();
dependentActionsByTransientEntity.put( transientEntity, dependentActions ); dependentActionsByTransientEntity.put( transientEntity, dependentActions );
} }
dependentActions.add( insert ); dependentActions.add( insert );
@ -199,7 +199,7 @@ public class UnresolvedEntityInsertActions {
// NOTE EARLY EXIT! // NOTE EARLY EXIT!
return Collections.emptySet(); return Collections.emptySet();
} }
final Set<AbstractEntityInsertAction> resolvedActions = new IdentitySet( ); final Set<AbstractEntityInsertAction> resolvedActions = new IdentitySet<>( );
if ( traceEnabled ) { if ( traceEnabled ) {
LOG.tracev( LOG.tracev(
"Unresolved inserts before resolving [{0}]: [{1}]", "Unresolved inserts before resolving [{0}]: [{1}]",

View File

@ -25,9 +25,9 @@ import org.hibernate.boot.archive.scan.spi.Scanner;
*/ */
public class DisabledScanner implements Scanner { public class DisabledScanner implements Scanner {
private static final ScanResult emptyScanResult = new ScanResultImpl( private static final ScanResult emptyScanResult = new ScanResultImpl(
Collections.<PackageDescriptor>emptySet(), Collections.emptySet(),
Collections.<ClassDescriptor>emptySet(), Collections.emptySet(),
Collections.<MappingFileDescriptor>emptySet() Collections.emptySet()
); );
@Override @Override

View File

@ -68,15 +68,15 @@ public class LoadedConfig {
} }
public List<CacheRegionDefinition> getCacheRegionDefinitions() { public List<CacheRegionDefinition> getCacheRegionDefinitions() {
return cacheRegionDefinitions == null ? Collections.<CacheRegionDefinition>emptyList() : cacheRegionDefinitions; return cacheRegionDefinitions == null ? Collections.emptyList() : cacheRegionDefinitions;
} }
public List<MappingReference> getMappingReferences() { public List<MappingReference> getMappingReferences() {
return mappingReferences == null ? Collections.<MappingReference>emptyList() : mappingReferences; return mappingReferences == null ? Collections.emptyList() : mappingReferences;
} }
public Map<EventType, Set<String>> getEventListenerMap() { public Map<EventType, Set<String>> getEventListenerMap() {
return eventListenerMap == null ? Collections.<EventType, Set<String>>emptyMap() : eventListenerMap; return eventListenerMap == null ? Collections.emptyMap() : eventListenerMap;
} }
/** /**

View File

@ -688,7 +688,7 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector
@Override @Override
public void addDefaultResultSetMapping(NamedResultSetMappingDefinition definition) { public void addDefaultResultSetMapping(NamedResultSetMappingDefinition definition) {
final String name = definition.getRegistrationName(); final String name = definition.getRegistrationName();
if ( !defaultSqlResultSetMappingNames.contains( name ) && sqlResultSetMappingMap.containsKey( name ) ) { if ( !defaultSqlResultSetMappingNames.contains( name ) ) {
sqlResultSetMappingMap.remove( name ); sqlResultSetMappingMap.remove( name );
} }
applyResultSetMapping( definition ); applyResultSetMapping( definition );

View File

@ -153,7 +153,7 @@ public class Identifier implements Comparable<Identifier> {
*/ */
public String render(Dialect dialect) { public String render(Dialect dialect) {
return isQuoted return isQuoted
? String.valueOf( dialect.openQuote() ) + getText() + dialect.closeQuote() ? dialect.openQuote() + getText() + dialect.closeQuote()
: getText(); : getText();
} }

View File

@ -59,7 +59,7 @@ public abstract class AbstractAuxiliaryDatabaseObject
dialectScopes.add( dialectName ); dialectScopes.add( dialectName );
} }
public Set getDialectScopes() { public Set<String> getDialectScopes() {
return dialectScopes; return dialectScopes;
} }

View File

@ -149,13 +149,13 @@ public class Database {
public Collection<AuxiliaryDatabaseObject> getAuxiliaryDatabaseObjects() { public Collection<AuxiliaryDatabaseObject> getAuxiliaryDatabaseObjects() {
return auxiliaryDatabaseObjects == null return auxiliaryDatabaseObjects == null
? Collections.<AuxiliaryDatabaseObject>emptyList() ? Collections.emptyList()
: auxiliaryDatabaseObjects.values(); : auxiliaryDatabaseObjects.values();
} }
public Collection<InitCommand> getInitCommands() { public Collection<InitCommand> getInitCommands() {
return initCommands == null return initCommands == null
? Collections.<InitCommand>emptyList() ? Collections.emptyList()
: initCommands; : initCommands;
} }

View File

@ -180,7 +180,7 @@ public class AnnotationMetadataSourceProcessorImpl implements MetadataSourceProc
@Override @Override
public boolean shouldImplicitlyQuoteIdentifiers() { public boolean shouldImplicitlyQuoteIdentifiers() {
final Object isDelimited = persistenceUnitDefaults.get( "delimited-identifier" ); final Object isDelimited = persistenceUnitDefaults.get( "delimited-identifier" );
return isDelimited != null && isDelimited == Boolean.TRUE; return isDelimited == Boolean.TRUE;
} }
} }
); );

View File

@ -38,7 +38,7 @@ public class HibernateTypeSourceImpl implements HibernateTypeSource, JavaTypeDes
} }
public HibernateTypeSourceImpl(String name) { public HibernateTypeSourceImpl(String name) {
this( name, Collections.<String, String>emptyMap() ); this( name, Collections.emptyMap() );
} }
public HibernateTypeSourceImpl(String name, Map<String, String> parameters) { public HibernateTypeSourceImpl(String name, Map<String, String> parameters) {

View File

@ -41,7 +41,7 @@ public class PluralAttributeSequentialIndexSourceImpl
null, null,
new RelationalValueSourceHelper.AbstractColumnsAndFormulasSource() { new RelationalValueSourceHelper.AbstractColumnsAndFormulasSource() {
final List<JaxbHbmColumnType> columnElements = jaxbListIndex.getColumn() == null final List<JaxbHbmColumnType> columnElements = jaxbListIndex.getColumn() == null
? Collections.<JaxbHbmColumnType>emptyList() ? Collections.emptyList()
: Collections.singletonList( jaxbListIndex.getColumn() ); : Collections.singletonList( jaxbListIndex.getColumn() );
@Override @Override

View File

@ -70,7 +70,7 @@ class SingularAttributeSourceOneToOneImpl
if ( StringHelper.isNotEmpty( oneToOneElement.getFormulaAttribute() ) ) { if ( StringHelper.isNotEmpty( oneToOneElement.getFormulaAttribute() ) ) {
formulaSources = Collections.singletonList( formulaSources = Collections.singletonList(
(DerivedValueSource) new FormulaImpl( mappingDocument, logicalTableName, oneToOneElement.getFormulaAttribute() ) new FormulaImpl( mappingDocument, logicalTableName, oneToOneElement.getFormulaAttribute() )
); );
} }
else if ( !oneToOneElement.getFormula().isEmpty() ) { else if ( !oneToOneElement.getFormula().isEmpty() ) {

View File

@ -16,5 +16,5 @@ public enum InheritanceType {
NO_INHERITANCE, NO_INHERITANCE,
DISCRIMINATED, DISCRIMINATED,
JOINED, JOINED,
UNION; UNION
} }

View File

@ -204,8 +204,7 @@ public class EnhancementHelper {
throwLazyInitializationException( Cause.NO_SF_UUID, entityName, attributeName ); throwLazyInitializationException( Cause.NO_SF_UUID, entityName, attributeName );
} }
final SessionFactoryImplementor sf = (SessionFactoryImplementor) final SessionFactoryImplementor sf = SessionFactoryRegistry.INSTANCE.getSessionFactory( interceptor.getSessionFactoryUuid() );
SessionFactoryRegistry.INSTANCE.getSessionFactory( interceptor.getSessionFactoryUuid() );
final SharedSessionContractImplementor session = (SharedSessionContractImplementor) sf.openSession(); final SharedSessionContractImplementor session = (SharedSessionContractImplementor) sf.openSession();
session.getPersistenceContextInternal().setDefaultReadOnly( true ); session.getPersistenceContextInternal().setDefaultReadOnly( true );
session.setHibernateFlushMode( FlushMode.MANUAL ); session.setHibernateFlushMode( FlushMode.MANUAL );

View File

@ -73,7 +73,7 @@ public class BasicProxyFactoryImpl implements BasicProxyFactory {
key.add( superClass ); key.add( superClass );
} }
if ( interfaces != null ) { if ( interfaces != null ) {
key.addAll( Arrays.<Class<?>>asList( interfaces ) ); key.addAll( Arrays.asList( interfaces ) );
} }
return new TypeCache.SimpleKey( key ); return new TypeCache.SimpleKey( key );

View File

@ -69,7 +69,7 @@ public class NaturalIdCacheKey implements Serializable {
// (re-attaching a mutable natural id uses a database snapshot and hydration does not resolve associations). // (re-attaching a mutable natural id uses a database snapshot and hydration does not resolve associations).
// TODO: The snapshot should probably be revisited at some point. Consider semi-resolving, hydrating, etc. // TODO: The snapshot should probably be revisited at some point. Consider semi-resolving, hydrating, etc.
if (type instanceof EntityType && type.getSemiResolvedType( factory ).getReturnedClass().isInstance( value )) { if (type instanceof EntityType && type.getSemiResolvedType( factory ).getReturnedClass().isInstance( value )) {
this.naturalIdValues[i] = (Serializable) value; this.naturalIdValues[i] = value;
} }
else { else {
this.naturalIdValues[i] = type.disassemble( value, session, null ); this.naturalIdValues[i] = type.disassemble( value, session, null );

View File

@ -71,7 +71,7 @@ public class RegionFactoryInitiator implements StandardServiceInitiator<RegionFa
// We should immediately return NoCachingRegionFactory if either: // We should immediately return NoCachingRegionFactory if either:
// 1) both are explicitly FALSE // 1) both are explicitly FALSE
// 2) USE_SECOND_LEVEL_CACHE is FALSE and USE_QUERY_CACHE is null // 2) USE_SECOND_LEVEL_CACHE is FALSE and USE_QUERY_CACHE is null
if ( useSecondLevelCache != null && useSecondLevelCache == FALSE ) { if ( useSecondLevelCache == FALSE ) {
if ( useQueryCache == null || useQueryCache == FALSE ) { if ( useQueryCache == null || useQueryCache == FALSE ) {
return NoCachingRegionFactory.INSTANCE; return NoCachingRegionFactory.INSTANCE;
} }
@ -84,8 +84,7 @@ public class RegionFactoryInitiator implements StandardServiceInitiator<RegionFa
if ( setting == null && implementors.size() != 1 ) { if ( setting == null && implementors.size() != 1 ) {
// if either are explicitly defined as TRUE we need a RegionFactory // if either are explicitly defined as TRUE we need a RegionFactory
if ( ( useSecondLevelCache != null && useSecondLevelCache == TRUE ) if ( useSecondLevelCache == TRUE || useQueryCache == TRUE ) {
|| ( useQueryCache != null && useQueryCache == TRUE ) ) {
throw new CacheException( "Caching was explicitly requested, but no RegionFactory was defined and there is not a single registered RegionFactory" ); throw new CacheException( "Caching was explicitly requested, but no RegionFactory was defined and there is not a single registered RegionFactory" );
} }
} }

View File

@ -134,7 +134,13 @@ public abstract class AbstractPropertyHolder implements PropertyHolder {
@Override @Override
public boolean isInIdClass() { public boolean isInIdClass() {
return isInIdClass != null ? isInIdClass : parent != null ? parent.isInIdClass() : false; if ( isInIdClass != null ) {
return isInIdClass;
}
if ( parent != null ) {
return parent.isInIdClass();
}
return false;
} }
@Override @Override

View File

@ -843,7 +843,7 @@ public class Configuration {
public java.util.Collection<NamedEntityGraphDefinition> getNamedEntityGraphs() { public java.util.Collection<NamedEntityGraphDefinition> getNamedEntityGraphs() {
return namedEntityGraphMap == null return namedEntityGraphMap == null
? Collections.<NamedEntityGraphDefinition>emptyList() ? Collections.emptyList()
: namedEntityGraphMap.values(); : namedEntityGraphMap.values();
} }

View File

@ -107,7 +107,7 @@ public class JPAMetadataProvider implements MetadataProvider {
@Override @Override
public Map<Object, Object> getDefaults() { public Map<Object, Object> getDefaults() {
if ( xmlMappingEnabled == false ) { if ( !xmlMappingEnabled ) {
return Collections.emptyMap(); return Collections.emptyMap();
} }
else { else {

View File

@ -607,7 +607,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
properties.add( Introspector.decapitalize( name.substring( "is".length() ) ) ); properties.add( Introspector.decapitalize( name.substring( "is".length() ) ) );
} }
} }
for ( Element subelement : (List<Element>) element.elements() ) { for ( Element subelement : element.elements() ) {
String propertyName = subelement.attributeValue( "name" ); String propertyName = subelement.attributeValue( "name" );
if ( !properties.contains( propertyName ) ) { if ( !properties.contains( propertyName ) ) {
LOG.propertyNotFound( StringHelper.qualify( className, propertyName ) ); LOG.propertyNotFound( StringHelper.qualify( className, propertyName ) );
@ -724,7 +724,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
Element element = tree != null ? tree.element( "entity-listeners" ) : null; Element element = tree != null ? tree.element( "entity-listeners" ) : null;
if ( element != null ) { if ( element != null ) {
List<Class> entityListenerClasses = new ArrayList<>(); List<Class> entityListenerClasses = new ArrayList<>();
for ( Element subelement : (List<Element>) element.elements( "entity-listener" ) ) { for ( Element subelement : element.elements( "entity-listener" ) ) {
String className = subelement.attributeValue( "class" ); String className = subelement.attributeValue( "class" );
try { try {
entityListenerClasses.add( entityListenerClasses.add(
@ -1516,7 +1516,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
Element element = tree != null ? tree.element( "attributes" ) : null; Element element = tree != null ? tree.element( "attributes" ) : null;
//put entity.attributes elements //put entity.attributes elements
if ( element != null ) { if ( element != null ) {
for ( Element subelement : (List<Element>) element.elements() ) { for ( Element subelement : element.elements() ) {
if ( propertyName.equals( subelement.attributeValue( "name" ) ) ) { if ( propertyName.equals( subelement.attributeValue( "name" ) ) ) {
elementsForProperty.add( subelement ); elementsForProperty.add( subelement );
} }
@ -1524,7 +1524,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
} }
//add pre-* etc from entity and pure entity listener classes //add pre-* etc from entity and pure entity listener classes
if ( tree != null ) { if ( tree != null ) {
for ( Element subelement : (List<Element>) tree.elements() ) { for ( Element subelement : tree.elements() ) {
if ( propertyName.equals( subelement.attributeValue( "method-name" ) ) ) { if ( propertyName.equals( subelement.attributeValue( "method-name" ) ) ) {
elementsForProperty.add( subelement ); elementsForProperty.add( subelement );
} }
@ -2203,7 +2203,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
// process the <field-result/> sub-elements // process the <field-result/> sub-elements
List<FieldResult> fieldResultAnnotations = new ArrayList<>(); List<FieldResult> fieldResultAnnotations = new ArrayList<>();
for ( Element fieldResult : (List<Element>) entityResultElement.elements( "field-result" ) ) { for ( Element fieldResult : entityResultElement.elements( "field-result" ) ) {
AnnotationDescriptor fieldResultDescriptor = new AnnotationDescriptor( FieldResult.class ); AnnotationDescriptor fieldResultDescriptor = new AnnotationDescriptor( FieldResult.class );
copyStringAttribute( fieldResultDescriptor, fieldResult, "name", true ); copyStringAttribute( fieldResultDescriptor, fieldResult, "name", true );
copyStringAttribute( fieldResultDescriptor, fieldResult, "column", true ); copyStringAttribute( fieldResultDescriptor, fieldResult, "column", true );
@ -2259,7 +2259,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
constructorResultDescriptor.setValue( "targetClass", entityClass ); constructorResultDescriptor.setValue( "targetClass", entityClass );
List<ColumnResult> columnResultAnnotations = new ArrayList<>(); List<ColumnResult> columnResultAnnotations = new ArrayList<>();
for ( Element columnResultElement : (List<Element>) constructorResultElement.elements( "column" ) ) { for ( Element columnResultElement : constructorResultElement.elements( "column" ) ) {
columnResultAnnotations.add( buildColumnResult( columnResultElement, defaults, classLoaderAccess ) ); columnResultAnnotations.add( buildColumnResult( columnResultElement, defaults, classLoaderAccess ) );
} }
constructorResultDescriptor.setValue( constructorResultDescriptor.setValue(
@ -2849,7 +2849,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
private SecondaryTables getSecondaryTables(Element tree, XMLContext.Default defaults) { private SecondaryTables getSecondaryTables(Element tree, XMLContext.Default defaults) {
List<Element> elements = tree == null ? List<Element> elements = tree == null ?
new ArrayList<>() : new ArrayList<>() :
(List<Element>) tree.elements( "secondary-table" ); tree.elements( "secondary-table" );
List<SecondaryTable> secondaryTables = new ArrayList<>( 3 ); List<SecondaryTable> secondaryTables = new ArrayList<>( 3 );
for ( Element element : elements ) { for ( Element element : elements ) {
AnnotationDescriptor annotation = new AnnotationDescriptor( SecondaryTable.class ); AnnotationDescriptor annotation = new AnnotationDescriptor( SecondaryTable.class );

View File

@ -196,7 +196,7 @@ public class XMLContext implements Serializable {
for ( Element converterElement : converterElements ) { for ( Element converterElement : converterElements ) {
final String className = converterElement.attributeValue( "class" ); final String className = converterElement.attributeValue( "class" );
final String autoApplyAttribute = converterElement.attributeValue( "auto-apply" ); final String autoApplyAttribute = converterElement.attributeValue( "auto-apply" );
final boolean autoApply = autoApplyAttribute != null && Boolean.parseBoolean( autoApplyAttribute ); final boolean autoApply = Boolean.parseBoolean( autoApplyAttribute );
try { try {
final Class<? extends AttributeConverter> attributeConverterClass = classLoaderAccess.classForName( final Class<? extends AttributeConverter> attributeConverterClass = classLoaderAccess.classForName(

View File

@ -253,7 +253,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
// be created even if a current session and transaction are // be created even if a current session and transaction are
// open (ex: session.clear() was used). We must prevent // open (ex: session.clear() was used). We must prevent
// multiple transactions. // multiple transactions.
( (Session) session ).beginTransaction(); session.beginTransaction();
} }
session.getPersistenceContextInternal().addUninitializedDetachedCollection( session.getPersistenceContextInternal().addUninitializedDetachedCollection(
@ -273,9 +273,9 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
try { try {
if ( !isJTA ) { if ( !isJTA ) {
( (Session) tempSession ).getTransaction().commit(); tempSession.getTransaction().commit();
} }
( (Session) tempSession ).close(); tempSession.close();
} }
catch (Exception e) { catch (Exception e) {
LOG.warn( "Unable to close temporary session used to load lazy collection associated to no session" ); LOG.warn( "Unable to close temporary session used to load lazy collection associated to no session" );
@ -289,8 +289,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
throwLazyInitializationException( "SessionFactory UUID not known to create temporary Session for loading" ); throwLazyInitializationException( "SessionFactory UUID not known to create temporary Session for loading" );
} }
final SessionFactoryImplementor sf = (SessionFactoryImplementor) final SessionFactoryImplementor sf = SessionFactoryRegistry.INSTANCE.getSessionFactory( sessionFactoryUuid );
SessionFactoryRegistry.INSTANCE.getSessionFactory( sessionFactoryUuid );
final SharedSessionContractImplementor session = (SharedSessionContractImplementor) sf.openSession(); final SharedSessionContractImplementor session = (SharedSessionContractImplementor) sf.openSession();
session.getPersistenceContextInternal().setDefaultReadOnly( true ); session.getPersistenceContextInternal().setDefaultReadOnly( true );
session.setFlushMode( FlushMode.MANUAL ); session.setFlushMode( FlushMode.MANUAL );

View File

@ -36,7 +36,7 @@ public class StandardOrderedSetSemantics extends AbstractSetSemantics<LinkedHash
public LinkedHashSet<?> instantiateRaw( public LinkedHashSet<?> instantiateRaw(
int anticipatedSize, int anticipatedSize,
CollectionPersister collectionDescriptor) { CollectionPersister collectionDescriptor) {
return anticipatedSize < 1 ? new LinkedHashSet() : new LinkedHashSet<>( anticipatedSize ); return anticipatedSize < 1 ? new LinkedHashSet<>() : new LinkedHashSet<>( anticipatedSize );
} }
@Override @Override

View File

@ -111,7 +111,7 @@ public class ThreadLocalSessionContext extends AbstractCurrentSessionContext {
// try to make sure we don't wrap and already wrapped session // try to make sure we don't wrap and already wrapped session
if ( Proxy.isProxyClass( session.getClass() ) ) { if ( Proxy.isProxyClass( session.getClass() ) ) {
final InvocationHandler invocationHandler = Proxy.getInvocationHandler( session ); final InvocationHandler invocationHandler = Proxy.getInvocationHandler( session );
if ( invocationHandler != null && TransactionProtectionWrapper.class.isInstance( invocationHandler ) ) { if ( TransactionProtectionWrapper.class.isInstance( invocationHandler ) ) {
return false; return false;
} }
} }
@ -352,7 +352,7 @@ public class ThreadLocalSessionContext extends AbstractCurrentSessionContext {
} }
catch ( InvocationTargetException e ) { catch ( InvocationTargetException e ) {
if (e.getTargetException() instanceof RuntimeException) { if (e.getTargetException() instanceof RuntimeException) {
throw (RuntimeException)e.getTargetException(); throw e.getTargetException();
} }
throw e; throw e;
} }

View File

@ -502,7 +502,7 @@ public class DB2Dialect extends Dialect {
} }
@Override @Override
public boolean supportsLobValueChangePropogation() { public boolean supportsLobValueChangePropagation() {
return false; return false;
} }

View File

@ -452,7 +452,7 @@ public class DerbyDialect extends Dialect {
// Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@Override @Override
public boolean supportsLobValueChangePropogation() { public boolean supportsLobValueChangePropagation() {
return false; return false;
} }

View File

@ -2705,7 +2705,7 @@ public abstract class Dialect implements ConversionContext {
* database; false otherwise. * database; false otherwise.
* @since 3.2 * @since 3.2
*/ */
public boolean supportsLobValueChangePropogation() { public boolean supportsLobValueChangePropagation() {
// todo : pretty sure this is the same as the java.sql.DatabaseMetaData.locatorsUpdateCopy method added in JDBC 4, see HHH-6046 // todo : pretty sure this is the same as the java.sql.DatabaseMetaData.locatorsUpdateCopy method added in JDBC 4, see HHH-6046
return true; return true;
} }

View File

@ -341,7 +341,7 @@ public class FirebirdDialect extends Dialect {
} }
@Override @Override
public boolean supportsLobValueChangePropogation() { public boolean supportsLobValueChangePropagation() {
// May need changes in Jaybird for this to work // May need changes in Jaybird for this to work
return false; return false;
} }

View File

@ -325,7 +325,7 @@ public class H2Dialect extends Dialect {
// Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@Override @Override
public boolean supportsLobValueChangePropogation() { public boolean supportsLobValueChangePropagation() {
return false; return false;
} }

View File

@ -585,7 +585,7 @@ public class HSQLDialect extends Dialect {
} }
@Override @Override
public boolean supportsLobValueChangePropogation() { public boolean supportsLobValueChangePropagation() {
return false; return false;
} }

View File

@ -638,7 +638,7 @@ public class MySQLDialect extends Dialect {
} }
@Override @Override
public boolean supportsLobValueChangePropogation() { public boolean supportsLobValueChangePropagation() {
// note: at least my local MySQL 5.1 install shows this not working... // note: at least my local MySQL 5.1 install shows this not working...
return false; return false;
} }

View File

@ -881,7 +881,7 @@ public class OracleDialect extends Dialect {
if ( pos > -1 ) { if ( pos > -1 ) {
final StringBuilder buffer = new StringBuilder( sql.length() + hints.length() + 8 ); final StringBuilder buffer = new StringBuilder( sql.length() + hints.length() + 8 );
if ( pos > 0 ) { if ( pos > 0 ) {
buffer.append( sql.substring( 0, pos ) ); buffer.append( sql, 0, pos );
} }
buffer buffer
.append( statementType ) .append( statementType )

View File

@ -591,7 +591,7 @@ public class PostgreSQLDialect extends Dialect {
} }
@Override @Override
public boolean supportsLobValueChangePropogation() { public boolean supportsLobValueChangePropagation() {
return false; return false;
} }

View File

@ -18,7 +18,7 @@ public class Replacer {
private String delimiter; private String delimiter;
private List<Replacement> replacements = new ArrayList<>(); private List<Replacement> replacements = new ArrayList<>();
class Replacement { static class Replacement {
String placeholder; String placeholder;
String replacement; String replacement;

View File

@ -309,7 +309,7 @@ public class SQLServerDialect extends AbstractTransactSQLDialect {
} }
@Override @Override
public boolean supportsLobValueChangePropogation() { public boolean supportsLobValueChangePropagation() {
// note: at least my local SQL Server 2005 Express shows this not working... // note: at least my local SQL Server 2005 Express shows this not working...
return false; return false;
} }
@ -378,7 +378,7 @@ public class SQLServerDialect extends AbstractTransactSQLDialect {
); );
final int pos = sql.indexOf( ";" ); final int pos = sql.indexOf( ";" );
if ( pos > -1 ) { if ( pos > -1 ) {
buffer.append( sql.substring( 0, pos ) ); buffer.append( sql, 0, pos );
} }
else { else {
buffer.append( sql ); buffer.append( sql );

View File

@ -114,7 +114,6 @@ class SpannerDialectTableExporter implements Exporter<Table> {
ArrayList<String> dropStrings = new ArrayList<>(); ArrayList<String> dropStrings = new ArrayList<>();
;
for (Iterator<Index> index = table.getIndexIterator(); index.hasNext();) { for (Iterator<Index> index = table.getIndexIterator(); index.hasNext();) {
dropStrings.add( "drop index " + index.next().getName() ); dropStrings.add( "drop index " + index.next().getName() );
} }

View File

@ -395,7 +395,7 @@ public class SybaseASEDialect extends SybaseDialect {
} }
@Override @Override
public boolean supportsLobValueChangePropogation() { public boolean supportsLobValueChangePropagation() {
return false; return false;
} }

View File

@ -366,7 +366,7 @@ public class TeradataDialect extends Dialect {
} }
@Override @Override
public boolean supportsLobValueChangePropogation() { public boolean supportsLobValueChangePropagation() {
return false; return false;
} }

View File

@ -90,8 +90,7 @@ public class TimestampaddFunction
SqlAstNode... sqlAstArguments) { SqlAstNode... sqlAstArguments) {
Expression to = (Expression) sqlAstArguments[2]; Expression to = (Expression) sqlAstArguments[2];
return new SelfRenderingFunctionSqlAstExpression( return new SelfRenderingFunctionSqlAstExpression(
(sqlAppender, sqlAstArguments1, walker) this::render,
-> render(sqlAppender, sqlAstArguments1, walker),
asList( sqlAstArguments ), asList( sqlAstArguments ),
impliedResultType, impliedResultType,
to.getExpressionType() to.getExpressionType()

View File

@ -95,8 +95,7 @@ public class TimestampdiffFunction
SqlAstNode... sqlAstArguments) { SqlAstNode... sqlAstArguments) {
DurationUnit field = (DurationUnit) sqlAstArguments[0]; DurationUnit field = (DurationUnit) sqlAstArguments[0];
return new SelfRenderingFunctionSqlAstExpression( return new SelfRenderingFunctionSqlAstExpression(
(sqlAppender, sqlAstArguments1, walker) this::render,
-> render(sqlAppender, sqlAstArguments1, walker),
asList( sqlAstArguments ), asList( sqlAstArguments ),
impliedResultType, impliedResultType,
field.getExpressionType() field.getExpressionType()

View File

@ -249,7 +249,7 @@ public class EntityEntryContext {
if ( ImmutableManagedEntityHolder.class.isInstance( managedEntity ) ) { if ( ImmutableManagedEntityHolder.class.isInstance( managedEntity ) ) {
assert entity == ( (ImmutableManagedEntityHolder) managedEntity ).managedEntity; assert entity == ( (ImmutableManagedEntityHolder) managedEntity ).managedEntity;
immutableManagedEntityXref.remove( (ManagedEntity) entity ); immutableManagedEntityXref.remove( entity );
} }
else if ( !ManagedEntity.class.isInstance( entity ) ) { else if ( !ManagedEntity.class.isInstance( entity ) ) {

View File

@ -409,7 +409,7 @@ public class StatefulPersistenceContext implements PersistenceContext {
@Override @Override
public boolean containsEntity(EntityKey key) { public boolean containsEntity(EntityKey key) {
return entitiesByKey == null ? false : entitiesByKey.containsKey( key ); return entitiesByKey != null && entitiesByKey.containsKey( key );
} }
@Override @Override

View File

@ -52,7 +52,7 @@ public class MultiTenantConnectionProviderInitiator implements StandardServiceIn
// if they also specified the data source *name*, then lets assume they want // if they also specified the data source *name*, then lets assume they want
// DataSourceBasedMultiTenantConnectionProviderImpl // DataSourceBasedMultiTenantConnectionProviderImpl
final Object dataSourceConfigValue = configurationValues.get( AvailableSettings.DATASOURCE ); final Object dataSourceConfigValue = configurationValues.get( AvailableSettings.DATASOURCE );
if ( dataSourceConfigValue != null && String.class.isInstance( dataSourceConfigValue ) ) { if ( String.class.isInstance( dataSourceConfigValue ) ) {
return new DataSourceBasedMultiTenantConnectionProviderImpl(); return new DataSourceBasedMultiTenantConnectionProviderImpl();
} }

View File

@ -76,7 +76,7 @@ public class DataSourceBasedMultiTenantConnectionProviderImpl
final Object dataSourceConfigValue = serviceRegistry.getService( ConfigurationService.class ) final Object dataSourceConfigValue = serviceRegistry.getService( ConfigurationService.class )
.getSettings() .getSettings()
.get( AvailableSettings.DATASOURCE ); .get( AvailableSettings.DATASOURCE );
if ( dataSourceConfigValue == null || ! String.class.isInstance( dataSourceConfigValue ) ) { if ( !String.class.isInstance( dataSourceConfigValue ) ) {
throw new HibernateException( "Improper set up of DataSourceBasedMultiTenantConnectionProviderImpl" ); throw new HibernateException( "Improper set up of DataSourceBasedMultiTenantConnectionProviderImpl" );
} }
final String jndiName = (String) dataSourceConfigValue; final String jndiName = (String) dataSourceConfigValue;

View File

@ -71,7 +71,7 @@ public class ExtractedDatabaseMetaDataImpl implements ExtractedDatabaseMetaData
this.extraKeywords = extraKeywords != null this.extraKeywords = extraKeywords != null
? extraKeywords ? extraKeywords
: Collections.<String>emptySet(); : Collections.emptySet();
this.typeInfoSet = typeInfoSet != null this.typeInfoSet = typeInfoSet != null
? typeInfoSet ? typeInfoSet
: new LinkedHashSet<>(); : new LinkedHashSet<>();

View File

@ -131,7 +131,7 @@ public final class CollectionKey implements Serializable {
SessionImplementor session) throws IOException, ClassNotFoundException { SessionImplementor session) throws IOException, ClassNotFoundException {
return new CollectionKey( return new CollectionKey(
(String) ois.readObject(), (String) ois.readObject(),
(Serializable) ois.readObject(), ois.readObject(),
(Type) ois.readObject(), (Type) ois.readObject(),
(session == null ? null : session.getFactory()) (session == null ? null : session.getFactory())
); );

View File

@ -142,7 +142,7 @@ public abstract class AbstractFlushingEventListener implements JpaBootstrapSensi
//safe from concurrent modification because of how concurrentEntries() is implemented on IdentityMap //safe from concurrent modification because of how concurrentEntries() is implemented on IdentityMap
for ( Map.Entry<Object,EntityEntry> me : persistenceContext.reentrantSafeEntityEntries() ) { for ( Map.Entry<Object,EntityEntry> me : persistenceContext.reentrantSafeEntityEntries() ) {
// for ( Map.Entry me : IdentityMap.concurrentEntries( persistenceContext.getEntityEntries() ) ) { // for ( Map.Entry me : IdentityMap.concurrentEntries( persistenceContext.getEntityEntries() ) ) {
EntityEntry entry = (EntityEntry) me.getValue(); EntityEntry entry = me.getValue();
Status status = entry.getStatus(); Status status = entry.getStatus();
if ( status == Status.MANAGED || status == Status.SAVING || status == Status.READ_ONLY ) { if ( status == Status.MANAGED || status == Status.SAVING || status == Status.READ_ONLY ) {
cascadeOnFlush( session, entry.getPersister(), me.getKey(), anything ); cascadeOnFlush( session, entry.getPersister(), me.getKey(), anything );

View File

@ -118,7 +118,7 @@ public class DefaultMergeEventListener extends AbstractSaveEventListener impleme
if ( interceptor instanceof EnhancementAsProxyLazinessInterceptor ) { if ( interceptor instanceof EnhancementAsProxyLazinessInterceptor ) {
final EnhancementAsProxyLazinessInterceptor proxyInterceptor = (EnhancementAsProxyLazinessInterceptor) interceptor; final EnhancementAsProxyLazinessInterceptor proxyInterceptor = (EnhancementAsProxyLazinessInterceptor) interceptor;
LOG.trace( "Ignoring uninitialized enhanced-proxy" ); LOG.trace( "Ignoring uninitialized enhanced-proxy" );
event.setResult( source.load( proxyInterceptor.getEntityName(), (Serializable) proxyInterceptor.getIdentifier() ) ); event.setResult( source.load( proxyInterceptor.getEntityName(), proxyInterceptor.getIdentifier() ) );
//EARLY EXIT! //EARLY EXIT!
return; return;
} }

View File

@ -30,7 +30,7 @@ public final class EntityCopyAllowedLoggedObserver implements EntityCopyObserver
private static final CoreMessageLogger LOG = CoreLogging.messageLogger( EntityCopyAllowedLoggedObserver.class ); private static final CoreMessageLogger LOG = CoreLogging.messageLogger( EntityCopyAllowedLoggedObserver.class );
public static final EntityCopyObserverFactory FACTORY_OF_SELF = () -> new EntityCopyAllowedLoggedObserver(); public static final EntityCopyObserverFactory FACTORY_OF_SELF = EntityCopyAllowedLoggedObserver::new;
public static final String SHORT_NAME = "log"; public static final String SHORT_NAME = "log";

View File

@ -45,9 +45,9 @@ public class OnReplicateVisitor extends ReattachVisitor {
if ( isUpdate ) { if ( isUpdate ) {
removeCollection( persister, extractCollectionKeyFromOwner( persister ), session ); removeCollection( persister, extractCollectionKeyFromOwner( persister ), session );
} }
if ( collection != null && collection instanceof PersistentCollection ) { if ( collection instanceof PersistentCollection ) {
final PersistentCollection wrapper = (PersistentCollection) collection; final PersistentCollection wrapper = (PersistentCollection) collection;
wrapper.setCurrentSession( (SessionImplementor) session ); wrapper.setCurrentSession( session );
if ( wrapper.wasInitialized() ) { if ( wrapper.wasInitialized() ) {
session.getPersistenceContextInternal().addNewCollection( persister, wrapper ); session.getPersistenceContextInternal().addNewCollection( persister, wrapper );
} }

View File

@ -76,7 +76,7 @@ public class AttributeNodeImpl<J>
return Collections.emptyMap(); return Collections.emptyMap();
} }
else { else {
return (Map) subGraphMap; return subGraphMap;
} }
} }

View File

@ -218,11 +218,11 @@ final class FastSessionServices {
HashMap<String,Object> p = new HashMap<>(); HashMap<String,Object> p = new HashMap<>();
//Static defaults: //Static defaults:
p.putIfAbsent( AvailableSettings.FLUSH_MODE, FlushMode.AUTO.name() ); p.put( AvailableSettings.FLUSH_MODE, FlushMode.AUTO.name() );
p.putIfAbsent( JPA_LOCK_SCOPE, PessimisticLockScope.EXTENDED.name() ); p.put( JPA_LOCK_SCOPE, PessimisticLockScope.EXTENDED.name() );
p.putIfAbsent( JPA_LOCK_TIMEOUT, LockOptions.WAIT_FOREVER ); p.put( JPA_LOCK_TIMEOUT, LockOptions.WAIT_FOREVER );
p.putIfAbsent( JPA_SHARED_CACHE_RETRIEVE_MODE, CacheModeHelper.DEFAULT_RETRIEVE_MODE ); p.put( JPA_SHARED_CACHE_RETRIEVE_MODE, CacheModeHelper.DEFAULT_RETRIEVE_MODE );
p.putIfAbsent( JPA_SHARED_CACHE_STORE_MODE, CacheModeHelper.DEFAULT_STORE_MODE ); p.put( JPA_SHARED_CACHE_STORE_MODE, CacheModeHelper.DEFAULT_STORE_MODE );
//Defaults defined by SessionFactory configuration: //Defaults defined by SessionFactory configuration:
final String[] ENTITY_MANAGER_SPECIFIC_PROPERTIES = { final String[] ENTITY_MANAGER_SPECIFIC_PROPERTIES = {

View File

@ -139,7 +139,7 @@ public class FetchingScrollableResultsImpl<R> extends AbstractScrollableResults<
} }
else if ( positions < 0 ) { else if ( positions < 0 ) {
// scroll backward // scroll backward
for ( int i = 0; i < ( 0 - positions ); i++ ) { for ( int i = 0; i < -positions; i++ ) {
more = previous(); more = previous();
if ( !more ) { if ( !more ) {
break; break;

View File

@ -2753,7 +2753,7 @@ public class SessionImpl
setFetchGraphLoadContext( getLoadQueryInfluencers().getEffectiveEntityGraph().getGraph() ); setFetchGraphLoadContext( getLoadQueryInfluencers().getEffectiveEntityGraph().getGraph() );
} }
return loadAccess.load( (Serializable) primaryKey ); return loadAccess.load( primaryKey );
} }
catch ( EntityNotFoundException ignored ) { catch ( EntityNotFoundException ignored ) {
// DefaultLoadEventListener.returnNarrowedProxy may throw ENFE (see HHH-7861 for details), // DefaultLoadEventListener.returnNarrowedProxy may throw ENFE (see HHH-7861 for details),
@ -2836,7 +2836,7 @@ public class SessionImpl
checkOpen(); checkOpen();
try { try {
return byId( entityClass ).getReference( (Serializable) primaryKey ); return byId( entityClass ).getReference( primaryKey );
} }
catch ( MappingException | TypeMismatchException | ClassCastException e ) { catch ( MappingException | TypeMismatchException | ClassCastException e ) {
throw getExceptionConverter().convert( new IllegalArgumentException( e.getMessage(), e ) ); throw getExceptionConverter().convert( new IllegalArgumentException( e.getMessage(), e ) );

View File

@ -444,7 +444,7 @@ public final class StringHelper {
public static String unroot(String qualifiedName) { public static String unroot(String qualifiedName) {
int loc = qualifiedName.indexOf( '.' ); int loc = qualifiedName.indexOf( '.' );
return ( loc < 0 ) ? qualifiedName : qualifiedName.substring( loc + 1, qualifiedName.length() ); return ( loc < 0 ) ? qualifiedName : qualifiedName.substring( loc + 1 );
} }
public static String toString(Object[] array) { public static String toString(Object[] array) {

View File

@ -14,7 +14,7 @@ import java.util.Comparator;
* @author Andrea Boriero * @author Andrea Boriero
*/ */
public class ZonedDateTimeComparator implements Comparator<ZonedDateTime>, Serializable { public class ZonedDateTimeComparator implements Comparator<ZonedDateTime>, Serializable {
public static final Comparator INSTANCE = new ZonedDateTimeComparator(); public static final Comparator<ZonedDateTime> INSTANCE = new ZonedDateTimeComparator();
public int compare(ZonedDateTime one, ZonedDateTime another) { public int compare(ZonedDateTime one, ZonedDateTime another) {
return one.toInstant().compareTo( another.toInstant() ); return one.toInstant().compareTo( another.toInstant() );

View File

@ -21,6 +21,7 @@ import java.io.Serializable;
import java.util.AbstractCollection; import java.util.AbstractCollection;
import java.util.AbstractMap; import java.util.AbstractMap;
import java.util.AbstractSet; import java.util.AbstractSet;
import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Enumeration; import java.util.Enumeration;
@ -1224,7 +1225,7 @@ public class BoundedConcurrentHashMap<K, V> extends AbstractMap<K, V>
this.evictCap = evictCap; this.evictCap = evictCap;
eviction = es.make( this, evictCap, lf ); eviction = es.make( this, evictCap, lf );
evictionListener = listener; evictionListener = listener;
setTable( HashEntry.<K, V>newArray( cap ) ); setTable( HashEntry.newArray( cap ) );
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@ -1561,9 +1562,7 @@ public class BoundedConcurrentHashMap<K, V> extends AbstractMap<K, V>
lock(); lock();
try { try {
HashEntry<K, V>[] tab = table; HashEntry<K, V>[] tab = table;
for ( int i = 0; i < tab.length; i++ ) { Arrays.fill( tab, null );
tab[i] = null;
}
++modCount; ++modCount;
eviction.clear(); eviction.clear();
count = 0; // write-volatile count = 0; // write-volatile

View File

@ -22,6 +22,7 @@ import java.lang.ref.WeakReference;
import java.util.AbstractCollection; import java.util.AbstractCollection;
import java.util.AbstractMap; import java.util.AbstractMap;
import java.util.AbstractSet; import java.util.AbstractSet;
import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.Enumeration; import java.util.Enumeration;
@ -157,8 +158,6 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V>
SOFT SOFT
} }
;
public static enum Option { public static enum Option {
/** /**
@ -168,8 +167,6 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V>
IDENTITY_COMPARISONS IDENTITY_COMPARISONS
} }
;
/* ---------------- Constants -------------- */ /* ---------------- Constants -------------- */
static final ReferenceType DEFAULT_KEY_TYPE = ReferenceType.WEAK; static final ReferenceType DEFAULT_KEY_TYPE = ReferenceType.WEAK;
@ -559,7 +556,7 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V>
this.keyType = keyType; this.keyType = keyType;
this.valueType = valueType; this.valueType = valueType;
this.identityComparisons = identityComparisons; this.identityComparisons = identityComparisons;
setTable( HashEntry.<K, V>newArray( initialCapacity ) ); setTable( HashEntry.newArray( initialCapacity ) );
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@ -885,9 +882,7 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V>
lock(); lock();
try { try {
HashEntry<K, V>[] tab = table; HashEntry<K, V>[] tab = table;
for ( int i = 0; i < tab.length; i++ ) { Arrays.fill( tab, null );
tab[i] = null;
}
++modCount; ++modCount;
// replace the reference queue to avoid unnecessary stale cleanups // replace the reference queue to avoid unnecessary stale cleanups
refQueue = new ReferenceQueue<>(); refQueue = new ReferenceQueue<>();

View File

@ -431,7 +431,7 @@ public final class ConfigurationHelper {
while ( itr.hasNext() ) { while ( itr.hasNext() ) {
final Map.Entry entry = ( Map.Entry ) itr.next(); final Map.Entry entry = ( Map.Entry ) itr.next();
final Object value = entry.getValue(); final Object value = entry.getValue();
if ( value != null && String.class.isInstance( value ) ) { if ( String.class.isInstance( value ) ) {
final String resolved = resolvePlaceHolder( ( String ) value ); final String resolved = resolvePlaceHolder( ( String ) value );
if ( !value.equals( resolved ) ) { if ( !value.equals( resolved ) ) {
if ( resolved == null ) { if ( resolved == null ) {

View File

@ -90,10 +90,10 @@ public class CharSequenceReader extends Reader {
return -1L; return -1L;
} }
else { else {
int dest = (int)Math.min((long)this.charSequence.length(), (long)this.position + n); int dest = (int)Math.min(this.charSequence.length(), (long)this.position + n);
int count = dest - this.position; int count = dest - this.position;
this.position = dest; this.position = dest;
return (long)count; return count;
} }
} }

View File

@ -991,7 +991,7 @@ public class EntityManagerFactoryBuilderImpl implements EntityManagerFactoryBuil
final int roleStart = JACC_PREFIX.length() + 1; final int roleStart = JACC_PREFIX.length() + 1;
final String role = keyString.substring( roleStart, keyString.indexOf( '.', roleStart ) ); final String role = keyString.substring( roleStart, keyString.indexOf( '.', roleStart ) );
final int classStart = roleStart + role.length() + 1; final int classStart = roleStart + role.length() + 1;
final String clazz = keyString.substring( classStart, keyString.length() ); final String clazz = keyString.substring( classStart );
return new GrantedPermission( role, clazz, valueString ); return new GrantedPermission( role, clazz, valueString );
} }
catch ( IndexOutOfBoundsException e ) { catch ( IndexOutOfBoundsException e ) {

View File

@ -398,7 +398,7 @@ public class PersistenceXmlParser {
} }
NodeList children = element.getChildNodes(); NodeList children = element.getChildNodes();
StringBuilder result = new StringBuilder(""); StringBuilder result = new StringBuilder();
for ( int i = 0; i < children.getLength() ; i++ ) { for ( int i = 0; i < children.getLength() ; i++ ) {
if ( children.item( i ).getNodeType() == Node.TEXT_NODE || if ( children.item( i ).getNodeType() == Node.TEXT_NODE ||
children.item( i ).getNodeType() == Node.CDATA_SECTION_NODE ) { children.item( i ).getNodeType() == Node.CDATA_SECTION_NODE ) {

View File

@ -29,10 +29,10 @@ public class StandardJpaScanEnvironmentImpl implements ScanEnvironment {
this.persistenceUnitDescriptor = persistenceUnitDescriptor; this.persistenceUnitDescriptor = persistenceUnitDescriptor;
this.explicitlyListedClassNames = persistenceUnitDescriptor.getManagedClassNames() == null this.explicitlyListedClassNames = persistenceUnitDescriptor.getManagedClassNames() == null
? Collections.<String>emptyList() ? Collections.emptyList()
: persistenceUnitDescriptor.getManagedClassNames(); : persistenceUnitDescriptor.getManagedClassNames();
this.explicitlyListedMappingFiles = persistenceUnitDescriptor.getMappingFileNames() == null this.explicitlyListedMappingFiles = persistenceUnitDescriptor.getMappingFileNames() == null
? Collections.<String>emptyList() ? Collections.emptyList()
: persistenceUnitDescriptor.getMappingFileNames(); : persistenceUnitDescriptor.getMappingFileNames();
} }

View File

@ -62,7 +62,6 @@ public final class Bootstrap {
String persistenceUnitName, String persistenceUnitName,
PersistenceUnitTransactionType transactionType, PersistenceUnitTransactionType transactionType,
Map integration) { Map integration) {
;
return new EntityManagerFactoryBuilderImpl( return new EntityManagerFactoryBuilderImpl(
PersistenceXmlParser.parse( persistenceXmlUrl, transactionType, integration ).get( persistenceUnitName ), PersistenceXmlParser.parse( persistenceXmlUrl, transactionType, integration ).get( persistenceUnitName ),
integration integration

View File

@ -142,7 +142,7 @@ public final class XmlHelper {
} }
final NodeList children = element.getChildNodes(); final NodeList children = element.getChildNodes();
final StringBuilder result = new StringBuilder(""); final StringBuilder result = new StringBuilder();
for ( int i = 0; i < children.getLength() ; i++ ) { for ( int i = 0; i < children.getLength() ; i++ ) {
if ( children.item( i ).getNodeType() == Node.TEXT_NODE if ( children.item( i ).getNodeType() == Node.TEXT_NODE
|| children.item( i ).getNodeType() == Node.CDATA_SECTION_NODE ) { || children.item( i ).getNodeType() == Node.CDATA_SECTION_NODE ) {

View File

@ -533,7 +533,7 @@ public class Table implements RelationalModel, Serializable, Exportable {
// Try to find out the name of the primary key to create it as identity if the IdentityGenerator is used // Try to find out the name of the primary key to create it as identity if the IdentityGenerator is used
String pkname = null; String pkname = null;
if ( hasPrimaryKey() && identityColumn ) { if ( hasPrimaryKey() && identityColumn ) {
pkname = ( (Column) getPrimaryKey().getColumnIterator().next() ).getQuotedName( dialect ); pkname = getPrimaryKey().getColumnIterator().next().getQuotedName( dialect );
} }
Iterator iter = getColumnIterator(); Iterator iter = getColumnIterator();

View File

@ -77,7 +77,7 @@ public abstract class AbstractManagedType<J>
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void visitAttributes(Consumer<PersistentAttribute<J, ?>> action) { public void visitAttributes(Consumer<PersistentAttribute<J, ?>> action) {
visitDeclaredAttributes( (Consumer) action ); visitDeclaredAttributes( action );
if ( getSuperType() != null ) { if ( getSuperType() != null ) {
getSuperType().visitAttributes( (Consumer) action ); getSuperType().visitAttributes( (Consumer) action );
} }

View File

@ -687,7 +687,7 @@ public abstract class AbstractEntityPersister
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
this.representationStrategy = creationContext.getBootstrapContext().getRepresentationStrategySelector() this.representationStrategy = creationContext.getBootstrapContext().getRepresentationStrategySelector()
.resolveStrategy( bootDescriptor, this, (RuntimeModelCreationContext) creationContext ); .resolveStrategy( bootDescriptor, this, creationContext );
this.javaTypeDescriptor = representationStrategy.getLoadJavaTypeDescriptor(); this.javaTypeDescriptor = representationStrategy.getLoadJavaTypeDescriptor();
assert javaTypeDescriptor != null; assert javaTypeDescriptor != null;

View File

@ -1252,7 +1252,7 @@ public class JoinedSubclassEntityPersister extends AbstractEntityPersister {
} }
} }
private class CaseSearchedExpressionInfo{ private static class CaseSearchedExpressionInfo{
CaseSearchedExpression caseSearchedExpression; CaseSearchedExpression caseSearchedExpression;
List<ColumnReference> columnReferences = new ArrayList<>( ); List<ColumnReference> columnReferences = new ArrayList<>( );
} }

View File

@ -300,7 +300,7 @@ public class SingleTableEntityPersister extends AbstractEntityPersister {
throw new MappingException( "discriminator mapping required for single table polymorphic persistence" ); throw new MappingException( "discriminator mapping required for single table polymorphic persistence" );
} }
forceDiscriminator = persistentClass.isForceDiscriminator(); forceDiscriminator = persistentClass.isForceDiscriminator();
Selectable selectable = (Selectable) discrimValue.getColumnIterator().next(); Selectable selectable = discrimValue.getColumnIterator().next();
if ( discrimValue.hasFormula() ) { if ( discrimValue.hasFormula() ) {
Formula formula = (Formula) selectable; Formula formula = (Formula) selectable;
discriminatorFormula = formula.getFormula(); discriminatorFormula = formula.getFormula();

View File

@ -46,7 +46,7 @@ public class EnhancedSetterImpl extends SetterFieldImpl {
// This marks the attribute as initialized, so it doesn't get lazy loaded afterwards // This marks the attribute as initialized, so it doesn't get lazy loaded afterwards
if ( target instanceof PersistentAttributeInterceptable ) { if ( target instanceof PersistentAttributeInterceptable ) {
PersistentAttributeInterceptor interceptor = ( (PersistentAttributeInterceptable) target ).$$_hibernate_getInterceptor(); PersistentAttributeInterceptor interceptor = ( (PersistentAttributeInterceptable) target ).$$_hibernate_getInterceptor();
if ( interceptor != null && interceptor instanceof LazyAttributeLoadingInterceptor ) { if ( interceptor instanceof LazyAttributeLoadingInterceptor ) {
interceptor.attributeInitialized( propertyName ); interceptor.attributeInitialized( propertyName );
} }
} }

View File

@ -190,8 +190,7 @@ public abstract class AbstractLazyInitializer implements LazyInitializer {
throw new LazyInitializationException( "could not initialize proxy [" + entityName + "#" + id + "] - no Session" ); throw new LazyInitializationException( "could not initialize proxy [" + entityName + "#" + id + "] - no Session" );
} }
try { try {
SessionFactoryImplementor sf = (SessionFactoryImplementor) SessionFactoryImplementor sf = SessionFactoryRegistry.INSTANCE.getSessionFactory( sessionFactoryUuid );
SessionFactoryRegistry.INSTANCE.getSessionFactory( sessionFactoryUuid );
SharedSessionContractImplementor session = (SharedSessionContractImplementor) sf.openSession(); SharedSessionContractImplementor session = (SharedSessionContractImplementor) sf.openSession();
session.getPersistenceContext().setDefaultReadOnly( true ); session.getPersistenceContext().setDefaultReadOnly( true );
session.setFlushMode( FlushMode.MANUAL ); session.setFlushMode( FlushMode.MANUAL );

View File

@ -55,7 +55,7 @@ public class ByteBuddyProxyHelper implements Serializable {
.ignore( byteBuddyState.getProxyDefinitionHelpers().getGroovyGetMetaClassFilter() ) .ignore( byteBuddyState.getProxyDefinitionHelpers().getGroovyGetMetaClassFilter() )
.with( new NamingStrategy.SuffixingRandom( PROXY_NAMING_SUFFIX, new NamingStrategy.SuffixingRandom.BaseNameResolver.ForFixedValue( persistentClass.getName() ) ) ) .with( new NamingStrategy.SuffixingRandom( PROXY_NAMING_SUFFIX, new NamingStrategy.SuffixingRandom.BaseNameResolver.ForFixedValue( persistentClass.getName() ) ) )
.subclass( interfaces.length == 1 ? persistentClass : Object.class, ConstructorStrategy.Default.IMITATE_SUPER_CLASS_OPENING ) .subclass( interfaces.length == 1 ? persistentClass : Object.class, ConstructorStrategy.Default.IMITATE_SUPER_CLASS_OPENING )
.implement( (Type[]) interfaces ) .implement( interfaces )
.method( byteBuddyState.getProxyDefinitionHelpers().getVirtualNotFinalizerFilter() ) .method( byteBuddyState.getProxyDefinitionHelpers().getVirtualNotFinalizerFilter() )
.intercept( byteBuddyState.getProxyDefinitionHelpers().getDelegateToInterceptorDispatcherMethodDelegation() ) .intercept( byteBuddyState.getProxyDefinitionHelpers().getDelegateToInterceptorDispatcherMethodDelegation() )
.method( byteBuddyState.getProxyDefinitionHelpers().getHibernateGeneratedMethodFilter() ) .method( byteBuddyState.getProxyDefinitionHelpers().getHibernateGeneratedMethodFilter() )

View File

@ -653,7 +653,7 @@ public class NativeQueryImpl<R>
if ( querySpaces == null ) { if ( querySpaces == null ) {
querySpaces = new HashSet<>(); querySpaces = new HashSet<>();
} }
querySpaces.addAll( Arrays.asList( (String[]) spaces ) ); querySpaces.addAll( Arrays.asList( spaces ) );
} }
} }

View File

@ -36,8 +36,7 @@ public abstract class AbstractSqmSelfRenderingFunctionDescriptor
TypeConfiguration typeConfiguration) { TypeConfiguration typeConfiguration) {
return new SelfRenderingSqmFunction<>( return new SelfRenderingSqmFunction<>(
this, this,
(sqlAppender, sqlAstArguments, walker) this::render,
-> render(sqlAppender, sqlAstArguments, walker),
arguments, arguments,
impliedResultType, impliedResultType,
getReturnTypeResolver(), getReturnTypeResolver(),

View File

@ -1250,7 +1250,7 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext {
public <Y> JpaCoalesce<Y> coalesce(Expression<? extends Y> x, Expression<? extends Y> y) { public <Y> JpaCoalesce<Y> coalesce(Expression<? extends Y> x, Expression<? extends Y> y) {
//noinspection unchecked //noinspection unchecked
return new SqmCoalesce<>( return new SqmCoalesce<>(
(AllowableFunctionReturnType) highestPrecedenceType( highestPrecedenceType(
((SqmExpression) x).getNodeType(), ((SqmExpression) x).getNodeType(),
((SqmExpression) y).getNodeType() ((SqmExpression) y).getNodeType()
), ),

View File

@ -238,7 +238,7 @@ public final class ExecuteWithIdTableHelper {
); );
if ( ddlTransactionHandling == TempTableDdlTransactionHandling.NONE ) { if ( ddlTransactionHandling == TempTableDdlTransactionHandling.NONE ) {
( (SessionImplementor) executionContext.getSession() ).doWork( idTableCreationWork ); executionContext.getSession().doWork( idTableCreationWork );
} }
else { else {
final IsolationDelegate isolationDelegate = executionContext.getSession() final IsolationDelegate isolationDelegate = executionContext.getSession()
@ -274,7 +274,7 @@ public final class ExecuteWithIdTableHelper {
); );
if ( ddlTransactionHandling == TempTableDdlTransactionHandling.NONE ) { if ( ddlTransactionHandling == TempTableDdlTransactionHandling.NONE ) {
( (SessionImplementor) executionContext.getSession() ).doWork( idTableDropWork ); executionContext.getSession().doWork( idTableDropWork );
} }
else { else {
final IsolationDelegate isolationDelegate = executionContext.getSession() final IsolationDelegate isolationDelegate = executionContext.getSession()

View File

@ -55,7 +55,7 @@ public class SqmBagJoin<O, E> extends AbstractSqmPluralJoin<O,Collection<E>, E>
@Override @Override
public BagPersistentAttribute<O,E> getModel() { public BagPersistentAttribute<O,E> getModel() {
return (BagPersistentAttribute<O, E>) getReferencedPathSource(); return getReferencedPathSource();
} }
@Override @Override

View File

@ -32,7 +32,7 @@ public class SqmMaxIndexPath<T> extends AbstractSqmSpecificPluralPartPath<T> {
if ( getPluralAttribute() instanceof ListPersistentAttribute ) { if ( getPluralAttribute() instanceof ListPersistentAttribute ) {
//noinspection unchecked //noinspection unchecked
this.indexPathSource = ( (ListPersistentAttribute) getPluralAttribute() ).getIndexPathSource(); this.indexPathSource = getPluralAttribute().getIndexPathSource();
} }
else if ( getPluralAttribute() instanceof MapPersistentAttribute ) { else if ( getPluralAttribute() instanceof MapPersistentAttribute ) {
//noinspection unchecked //noinspection unchecked

View File

@ -32,7 +32,7 @@ public class SqmMinIndexPath<T> extends AbstractSqmSpecificPluralPartPath<T> {
if ( getPluralAttribute() instanceof ListPersistentAttribute ) { if ( getPluralAttribute() instanceof ListPersistentAttribute ) {
//noinspection unchecked //noinspection unchecked
this.indexPathSource = ( (ListPersistentAttribute) getPluralAttribute() ).getIndexPathSource(); this.indexPathSource = getPluralAttribute().getIndexPathSource();
} }
else if ( getPluralAttribute() instanceof MapPersistentAttribute ) { else if ( getPluralAttribute() instanceof MapPersistentAttribute ) {
//noinspection unchecked //noinspection unchecked

View File

@ -6,6 +6,7 @@
*/ */
package org.hibernate.sql; package org.hibernate.sql;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
@ -51,9 +52,7 @@ public class InsertSelect {
} }
public InsertSelect addColumns(String[] columnNames) { public InsertSelect addColumns(String[] columnNames) {
for ( String columnName : columnNames ) { Collections.addAll( this.columnNames, columnNames );
this.columnNames.add( columnName );
}
return this; return this;
} }

View File

@ -502,7 +502,7 @@ public abstract class AbstractSqlAstWalker
castTarget.getPrecision(), castTarget.getPrecision(),
castTarget.getScale() castTarget.getScale()
) )
);; );
} }
@Override @Override

View File

@ -690,7 +690,7 @@ public class StatisticsImpl implements StatisticsImplementor, Service, Manageabl
public QueryStatisticsImpl getQueryStatistics(String queryString) { public QueryStatisticsImpl getQueryStatistics(String queryString) {
return queryStatsMap.getOrCompute( return queryStatsMap.getOrCompute(
queryString, queryString,
s -> new QueryStatisticsImpl( s ) QueryStatisticsImpl::new
); );
} }

View File

@ -26,5 +26,5 @@ public enum TargetType {
/** /**
* Write to {@link System#out} * Write to {@link System#out}
*/ */
STDOUT; STDOUT
} }

View File

@ -49,7 +49,7 @@ public class SequenceInformationExtractorMariaDBDatabaseImpl extends SequenceInf
try ( try (
final Statement statement = extractionContext.getJdbcConnection().createStatement(); final Statement statement = extractionContext.getJdbcConnection().createStatement();
final ResultSet resultSet = statement.executeQuery( lookupSql ); final ResultSet resultSet = statement.executeQuery( lookupSql )
) { ) {
while ( resultSet.next() ) { while ( resultSet.next() ) {
sequenceNames.add( resultSetSequenceName( resultSet ) ); sequenceNames.add( resultSetSequenceName( resultSet ) );
@ -70,7 +70,7 @@ public class SequenceInformationExtractorMariaDBDatabaseImpl extends SequenceInf
try ( try (
final Statement statement = extractionContext.getJdbcConnection().createStatement(); final Statement statement = extractionContext.getJdbcConnection().createStatement();
final ResultSet resultSet = statement.executeQuery( sequenceInfoQueryBuilder.toString() ); final ResultSet resultSet = statement.executeQuery( sequenceInfoQueryBuilder.toString() )
) { ) {
while ( resultSet.next() ) { while ( resultSet.next() ) {

View File

@ -92,7 +92,7 @@ public class SchemaCreatorImpl implements SchemaCreator {
public SchemaCreatorImpl(ServiceRegistry serviceRegistry, SchemaFilter schemaFilter) { public SchemaCreatorImpl(ServiceRegistry serviceRegistry, SchemaFilter schemaFilter) {
SchemaManagementTool smt = serviceRegistry.getService( SchemaManagementTool.class ); SchemaManagementTool smt = serviceRegistry.getService( SchemaManagementTool.class );
if ( smt == null || !HibernateSchemaManagementTool.class.isInstance( smt ) ) { if ( !HibernateSchemaManagementTool.class.isInstance( smt ) ) {
smt = new HibernateSchemaManagementTool(); smt = new HibernateSchemaManagementTool();
( (HibernateSchemaManagementTool) smt ).injectServices( (ServiceRegistryImplementor) serviceRegistry ); ( (HibernateSchemaManagementTool) smt ).injectServices( (ServiceRegistryImplementor) serviceRegistry );
} }

View File

@ -87,7 +87,7 @@ public class SchemaDropperImpl implements SchemaDropper {
public SchemaDropperImpl(ServiceRegistry serviceRegistry, SchemaFilter schemaFilter) { public SchemaDropperImpl(ServiceRegistry serviceRegistry, SchemaFilter schemaFilter) {
SchemaManagementTool smt = serviceRegistry.getService( SchemaManagementTool.class ); SchemaManagementTool smt = serviceRegistry.getService( SchemaManagementTool.class );
if ( smt == null || !HibernateSchemaManagementTool.class.isInstance( smt ) ) { if ( !HibernateSchemaManagementTool.class.isInstance( smt ) ) {
smt = new HibernateSchemaManagementTool(); smt = new HibernateSchemaManagementTool();
( (HibernateSchemaManagementTool) smt ).injectServices( (ServiceRegistryImplementor) serviceRegistry ); ( (HibernateSchemaManagementTool) smt ).injectServices( (ServiceRegistryImplementor) serviceRegistry );
} }

View File

@ -66,7 +66,7 @@ public class StandardTableExporter implements Exporter<Table> {
// Try to find out the name of the primary key in case the dialect needs it to create an identity // Try to find out the name of the primary key in case the dialect needs it to create an identity
String pkColName = null; String pkColName = null;
if ( table.hasPrimaryKey() ) { if ( table.hasPrimaryKey() ) {
Column pkColumn = (Column) table.getPrimaryKey().getColumns().iterator().next(); Column pkColumn = table.getPrimaryKey().getColumns().iterator().next();
pkColName = pkColumn.getQuotedName( dialect ); pkColName = pkColumn.getQuotedName( dialect );
} }

View File

@ -240,7 +240,7 @@ public class AnyType extends AbstractType implements CompositeType, AssociationT
throws HibernateException, SQLException { throws HibernateException, SQLException {
return resolveAny( return resolveAny(
(String) discriminatorType.nullSafeGet( rs, names[0], session, owner ), (String) discriminatorType.nullSafeGet( rs, names[0], session, owner ),
(Serializable) identifierType.nullSafeGet( rs, names[1], session, owner ), identifierType.nullSafeGet( rs, names[1], session, owner ),
session session
); );
} }

View File

@ -36,6 +36,6 @@ public class ClobType extends AbstractSingleColumnStandardBasicType<Clob> {
@Override @Override
protected Clob getReplacement(Clob original, Clob target, SharedSessionContractImplementor session) { protected Clob getReplacement(Clob original, Clob target, SharedSessionContractImplementor session) {
return session.getJdbcServices().getJdbcEnvironment().getDialect().getLobMergeStrategy().mergeClob( (Clob) original, (Clob) target, session ); return session.getJdbcServices().getJdbcEnvironment().getDialect().getLobMergeStrategy().mergeClob( original, target, session );
} }
} }

View File

@ -438,7 +438,7 @@ public abstract class CollectionType extends AbstractType implements Association
); );
} }
return (Serializable) id; return id;
} }
} }

View File

@ -38,6 +38,6 @@ public class CurrencyType
} }
public String objectToSQLString(Currency value, Dialect dialect) throws Exception { public String objectToSQLString(Currency value, Dialect dialect) throws Exception {
return "\'" + toString( value ) + "\'"; return "'" + toString( value ) + "'";
} }
} }

View File

@ -374,7 +374,7 @@ public abstract class EntityType extends AbstractType implements AssociationType
} }
else { else {
//JPA 2 case where @IdClass contains the id and not the associated entity //JPA 2 case where @IdClass contains the id and not the associated entity
xid = (Serializable) x; xid = x;
} }
} }
@ -388,7 +388,7 @@ public abstract class EntityType extends AbstractType implements AssociationType
} }
else { else {
//JPA 2 case where @IdClass contains the id and not the associated entity //JPA 2 case where @IdClass contains the id and not the associated entity
yid = (Serializable) y; yid = y;
} }
} }

View File

@ -47,7 +47,7 @@ public class EnumJavaTypeDescriptor<T extends Enum<T>> extends AbstractTypeDescr
@Override @Override
public T fromString(String string) { public T fromString(String string) {
return string == null ? null : (T) Enum.valueOf( getJavaType(), string ); return string == null ? null : Enum.valueOf( getJavaType(), string );
} }
@Override @Override

View File

@ -370,7 +370,7 @@ public class TypeConfiguration implements SessionFactoryObserver, Serializable {
if ( sessionFactoryName == null && sessionFactoryUuid == null ) { if ( sessionFactoryName == null && sessionFactoryUuid == null ) {
throw new HibernateException( "TypeConfiguration was not yet scoped to SessionFactory" ); throw new HibernateException( "TypeConfiguration was not yet scoped to SessionFactory" );
} }
sessionFactory = (SessionFactoryImplementor) SessionFactoryRegistry.INSTANCE.findSessionFactory( sessionFactory = SessionFactoryRegistry.INSTANCE.findSessionFactory(
sessionFactoryUuid, sessionFactoryUuid,
sessionFactoryName sessionFactoryName
); );
@ -420,7 +420,7 @@ public class TypeConfiguration implements SessionFactoryObserver, Serializable {
private Object readResolve() throws InvalidObjectException { private Object readResolve() throws InvalidObjectException {
if ( sessionFactory == null ) { if ( sessionFactory == null ) {
if ( sessionFactoryName != null || sessionFactoryUuid != null ) { if ( sessionFactoryName != null || sessionFactoryUuid != null ) {
sessionFactory = (SessionFactoryImplementor) SessionFactoryRegistry.INSTANCE.findSessionFactory( sessionFactory = SessionFactoryRegistry.INSTANCE.findSessionFactory(
sessionFactoryUuid, sessionFactoryUuid,
sessionFactoryName sessionFactoryName
); );

View File

@ -67,7 +67,7 @@ public class BlobLocatorTest extends BaseCoreFunctionalTestCase {
s.close(); s.close();
// test mutation via setting the new clob data... // test mutation via setting the new clob data...
if ( getDialect().supportsLobValueChangePropogation() ) { if ( getDialect().supportsLobValueChangePropagation() ) {
s = openSession(); s = openSession();
s.beginTransaction(); s.beginTransaction();
entity = ( LobHolder ) s.byId( LobHolder.class ).with( LockOptions.UPGRADE ).load( entity.getId() ); entity = ( LobHolder ) s.byId( LobHolder.class ).with( LockOptions.UPGRADE ).load( entity.getId() );

View File

@ -69,7 +69,7 @@ public class ClobLocatorTest extends BaseCoreFunctionalTestCase {
s.close(); s.close();
// test mutation via setting the new clob data... // test mutation via setting the new clob data...
if ( getDialect().supportsLobValueChangePropogation() ) { if ( getDialect().supportsLobValueChangePropagation() ) {
s = openSession(); s = openSession();
s.beginTransaction(); s.beginTransaction();
entity = ( LobHolder ) s.byId( LobHolder.class ).with( LockOptions.UPGRADE ).load( entity.getId() ); entity = ( LobHolder ) s.byId( LobHolder.class ).with( LockOptions.UPGRADE ).load( entity.getId() );

View File

@ -23,7 +23,7 @@ import static org.junit.Assert.assertTrue;
* @author Steve Ebersole * @author Steve Ebersole
*/ */
@TestForIssue( jiraKey = "HHH-2680" ) @TestForIssue( jiraKey = "HHH-2680" )
@RequiresDialectFeature( {DialectChecks.SupportsExpectedLobUsagePattern.class, DialectChecks.SupportsLobValueChangePropogation.class} ) // Skip for Sybase. HHH-6807 @RequiresDialectFeature( {DialectChecks.SupportsExpectedLobUsagePattern.class, DialectChecks.SupportsLobValueChangePropagation.class} ) // Skip for Sybase. HHH-6807
public class LobMergeTest extends BaseCoreFunctionalTestCase { public class LobMergeTest extends BaseCoreFunctionalTestCase {
private static final int LOB_SIZE = 10000; private static final int LOB_SIZE = 10000;

Some files were not shown because too many files have changed in this diff Show More