Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
* @author Jürgen Kreitler
*/
public class H2LegacyDialect extends Dialect {
private static final CoreMessageLogger LOG = CoreLogging.messageLogger( H2LegacyDialect.class );
private static final CoreMessageLogger log = CoreLogging.messageLogger( H2LegacyDialect.class );

private final LimitHandler limitHandler;

Expand Down Expand Up @@ -161,7 +161,7 @@ public H2LegacyDialect(DatabaseVersion version) {
: LimitOffsetLimitHandler.OFFSET_ONLY_INSTANCE;

if ( version.isBefore( 1, 2, 139 ) ) {
LOG.unsupportedMultiTableBulkHqlJpaql( version.getMajor(), version.getMinor(), version.getMicro() );
log.unsupportedMultiTableBulkHqlJpaql( version.getMajor(), version.getMinor(), version.getMicro() );
}

// supportsTuplesInSubqueries = version.isSameOrAfter( 1, 4, 198 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
*/
public class HANALegacyServerConfiguration {

private static final CoreMessageLogger LOG = CoreLogging.messageLogger( HANALegacyServerConfiguration.class );
private static final CoreMessageLogger log = CoreLogging.messageLogger( HANALegacyServerConfiguration.class );

private static final Pattern CLOUD_VERSION_PATTERN = Pattern.compile( "\\(fa/CE(\\d+)\\.(\\d+)\\)" );
public static final int MAX_LOB_PREFETCH_SIZE_DEFAULT_VALUE = 1024;

Expand Down Expand Up @@ -62,7 +63,7 @@ public static HANALegacyServerConfiguration fromDialectResolutionInfo(DialectRes
}
catch (SQLException e) {
// Ignore
LOG.debug(
log.debug(
"An error occurred while trying to determine the database version.",
e );
}
Expand All @@ -79,7 +80,7 @@ public static HANALegacyServerConfiguration fromDialectResolutionInfo(DialectRes
}
catch (SQLException e) {
// Ignore
LOG.debug(
log.debug(
"An error occurred while trying to determine the value of the HANA parameter indexserver.ini / session / max_lob_prefetch_size.",
e );
}
Expand Down Expand Up @@ -117,7 +118,7 @@ public static DatabaseVersion determineDatabaseVersion(DialectResolutionInfo inf
}
catch (SQLException e) {
// Ignore
LOG.debug( "An error occurred while trying to determine the HANA Cloud version.", e );
log.debug( "An error occurred while trying to determine the HANA Cloud version.", e );
}
}
return databaseVersion == null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@
* @author Fred Toussi
*/
public class HSQLLegacyDialect extends Dialect {
private static final CoreMessageLogger LOG = Logger.getMessageLogger(

private static final CoreMessageLogger log = Logger.getMessageLogger(
MethodHandles.lookup(),
CoreMessageLogger.class,
org.hibernate.community.dialect.HSQLLegacyDialect.class.getName()
);

private final UniqueDelegate uniqueDelegate = new CreateTableUniqueDelegate( this );
private final HSQLIdentityColumnSupport identityColumnSupport;

Expand Down Expand Up @@ -760,7 +762,7 @@ private ReadUncommittedLockingStrategy(EntityPersister lockable, LockMode lockMo
public void lock(Object id, Object version, Object object, int timeout, SharedSessionContractImplementor session)
throws StaleObjectStateException, JDBCException {
if ( getLockMode().greaterThan( LockMode.READ ) ) {
LOG.hsqldbSupportsOnlyReadCommittedIsolation();
log.hsqldbSupportsOnlyReadCommittedIsolation();
}
super.lock( id, version, object, timeout, session );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.hibernate.dialect.sequence.SequenceSupport;
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.query.common.TemporalUnit;
import org.hibernate.query.sqm.IntervalType;
Expand All @@ -41,9 +40,7 @@
import org.hibernate.sql.exec.spi.JdbcOperation;
import org.hibernate.type.descriptor.jdbc.JdbcType;
import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry;
import org.jboss.logging.Logger;

import java.lang.invoke.MethodHandles;
import java.sql.Types;

import static org.hibernate.dialect.SimpleDatabaseVersion.ZERO_VERSION;
Expand Down Expand Up @@ -79,11 +76,6 @@
* @author Ploski and Hanson
*/
public class RDMSOS2200Dialect extends Dialect {
private static final CoreMessageLogger LOG = Logger.getMessageLogger(
MethodHandles.lookup(),
CoreMessageLogger.class,
RDMSOS2200Dialect.class.getName()
);

/**
* Constructs a RDMSOS2200Dialect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void render(
final JdbcMappingContainer needleTypeContainer = needleExpression.getExpressionType();
final JdbcMapping needleType = needleTypeContainer == null ? null : needleTypeContainer.getSingleJdbcMapping();
if ( needleType == null || needleType instanceof BasicPluralType<?, ?> ) {
LOG.deprecatedArrayContainsWithArray();
log.deprecatedArrayContainsWithArray();
if ( nullable ) {
super.render( sqlAppender, sqlAstArguments, returnType, walker );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
public class AssertionFailure extends RuntimeException {

private static final CoreMessageLogger LOG = CoreLogging.messageLogger( AssertionFailure.class );
private static final CoreMessageLogger log = CoreLogging.messageLogger( AssertionFailure.class );

/**
* Creates an instance of AssertionFailure using the given message.
Expand All @@ -23,7 +23,7 @@ public class AssertionFailure extends RuntimeException {
*/
public AssertionFailure(String message) {
super( message );
LOG.failed( this );
log.failed( this );
}

/**
Expand All @@ -34,6 +34,6 @@ public AssertionFailure(String message) {
*/
public AssertionFailure(String message, Throwable cause) {
super( message, cause );
LOG.failed( cause );
log.failed( cause );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
* @author Gail Badner
*/
public class UnresolvedEntityInsertActions {
private static final CoreMessageLogger LOG = CoreLogging.messageLogger( UnresolvedEntityInsertActions.class );

private static final CoreMessageLogger log = CoreLogging.messageLogger( UnresolvedEntityInsertActions.class );

private static final int INIT_SIZE = 5;

Expand All @@ -63,8 +64,8 @@ public void addUnresolvedEntityInsertAction(AbstractEntityInsertAction insert, N
"Attempt to add an unresolved insert action that has no non-nullable transient entities."
);
}
if ( LOG.isTraceEnabled() ) {
LOG.tracev(
if ( log.isTraceEnabled() ) {
log.tracev(
"Adding insert with non-nullable, transient entities; insert=[{0}], dependencies=[{1}]",
insert,
dependencies.toLoggableString( insert.getSession() )
Expand Down Expand Up @@ -96,7 +97,7 @@ public Iterable<AbstractEntityInsertAction> getDependentEntityInsertActions() {
*/
public void checkNoUnresolvedActionsAfterOperation() throws PropertyValueException {
if ( isEmpty() ) {
LOG.trace( "No entity insert actions have non-nullable, transient entity dependencies." );
log.trace( "No entity insert actions have non-nullable, transient entity dependencies." );
}
else {
final var firstDependentAction = dependenciesByAction.keySet().iterator().next();
Expand Down Expand Up @@ -142,7 +143,7 @@ private void logCannotResolveNonNullableTransientDependencies(SharedSessionContr
}
}

LOG.cannotResolveNonNullableTransientDependencies(
log.cannotResolveNonNullableTransientDependencies(
transientEntityString,
dependentEntityStrings,
nonNullableTransientPropertyPaths
Expand Down Expand Up @@ -186,13 +187,13 @@ public Set<AbstractEntityInsertAction> resolveDependentActions(Object managedEnt
throw new IllegalArgumentException( "EntityEntry did not have status MANAGED or READ_ONLY: " + entityEntry );
}

final boolean traceEnabled = LOG.isTraceEnabled();
final boolean traceEnabled = log.isTraceEnabled();
// Find out if there are any unresolved insertions that are waiting for the
// specified entity to be resolved.
final var dependentActions = dependentActionsByTransientEntity.remove( managedEntity );
if ( dependentActions == null ) {
if ( traceEnabled ) {
LOG.tracev(
log.tracev(
"No unresolved entity inserts that depended on [{0}]",
infoString( entityEntry.getEntityName(), entityEntry.getId() )
);
Expand All @@ -202,15 +203,15 @@ public Set<AbstractEntityInsertAction> resolveDependentActions(Object managedEnt
else {
final Set<AbstractEntityInsertAction> resolvedActions = new IdentitySet<>();
if ( traceEnabled ) {
LOG.tracev(
log.tracev(
"Unresolved inserts before resolving [{0}]: [{1}]",
infoString( entityEntry.getEntityName(), entityEntry.getId() ),
toString()
);
}
for ( var dependentAction : dependentActions ) {
if ( traceEnabled ) {
LOG.tracev(
log.tracev(
"Resolving insert [{0}] dependency on [{1}]",
infoString( dependentAction.getEntityName(), dependentAction.getId() ),
infoString( entityEntry.getEntityName(), entityEntry.getId() )
Expand All @@ -220,7 +221,7 @@ public Set<AbstractEntityInsertAction> resolveDependentActions(Object managedEnt
dependencies.resolveNonNullableTransientEntity( managedEntity );
if ( dependencies.isEmpty() ) {
if ( traceEnabled ) {
LOG.tracev(
log.tracev(
"Resolving insert [{0}] (only depended on [{1}])",
dependentAction,
infoString( entityEntry.getEntityName(), entityEntry.getId() )
Expand All @@ -232,7 +233,7 @@ public Set<AbstractEntityInsertAction> resolveDependentActions(Object managedEnt
}
}
if ( traceEnabled ) {
LOG.tracev(
log.tracev(
"Unresolved inserts after resolving [{0}]: [{1}]",
infoString( entityEntry.getEntityName(), entityEntry.getId() ),
toString()
Expand Down Expand Up @@ -273,7 +274,7 @@ public String toString() {
*/
public void serialize(ObjectOutputStream oos) throws IOException {
final int queueSize = dependenciesByAction.size();
LOG.tracev( "Starting serialization of [{0}] unresolved insert entries", queueSize );
log.tracev( "Starting serialization of [{0}] unresolved insert entries", queueSize );
oos.writeInt( queueSize );
for ( AbstractEntityInsertAction unresolvedAction : dependenciesByAction.keySet() ) {
oos.writeObject( unresolvedAction );
Expand All @@ -297,7 +298,7 @@ public static UnresolvedEntityInsertActions deserialize(
final var rtn = new UnresolvedEntityInsertActions();

final int queueSize = ois.readInt();
LOG.tracev( "Starting deserialization of [{0}] unresolved insert entries", queueSize );
log.tracev( "Starting deserialization of [{0}] unresolved insert entries", queueSize );
for ( int i = 0; i < queueSize; i++ ) {
final var unresolvedAction = (AbstractEntityInsertAction) ois.readObject();
unresolvedAction.afterDeserialize( session );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
* @since 5.0
*/
public class MetadataSources implements Serializable {
private static final CoreMessageLogger LOG = CoreLogging.messageLogger( MetadataSources.class );

private static final CoreMessageLogger log = CoreLogging.messageLogger( MetadataSources.class );

private final ServiceRegistry serviceRegistry;
private final ClassLoaderService classLoaderService;
Expand Down Expand Up @@ -106,8 +107,8 @@ public MetadataSources(ServiceRegistry serviceRegistry) {
public MetadataSources(ServiceRegistry serviceRegistry, XmlMappingBinderAccess xmlMappingBinderAccess) {
// service registry really should be either BootstrapServiceRegistry or StandardServiceRegistry type...
if ( !isExpectedServiceRegistryType( serviceRegistry ) ) {
if ( LOG.isDebugEnabled() ) {
LOG.debugf(
if ( log.isDebugEnabled() ) {
log.debugf(
"Unexpected ServiceRegistry type [%s] encountered during building of MetadataSources; may cause " +
"problems later attempting to construct MetadataBuilder",
serviceRegistry.getClass().getName()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
package org.hibernate.boot.beanvalidation;

import java.lang.invoke.MethodHandles;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
Expand All @@ -24,12 +23,11 @@
import org.hibernate.event.spi.PreUpdateEventListener;
import org.hibernate.event.spi.PreUpsertEvent;
import org.hibernate.event.spi.PreUpsertEventListener;
import org.hibernate.internal.CoreLogging;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.metamodel.RepresentationMode;
import org.hibernate.persister.entity.EntityPersister;

import org.jboss.logging.Logger;

import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
import jakarta.validation.Validator;
Expand All @@ -49,15 +47,11 @@ public class BeanValidationEventListener
implements PreInsertEventListener, PreUpdateEventListener, PreDeleteEventListener, PreUpsertEventListener, PreCollectionUpdateEventListener,
SessionFactoryObserver {

private static final CoreMessageLogger LOG = Logger.getMessageLogger(
MethodHandles.lookup(),
CoreMessageLogger.class,
BeanValidationEventListener.class.getName()
);
private static final CoreMessageLogger log = CoreLogging.messageLogger( BeanValidationEventListener.class );

private HibernateTraversableResolver traversableResolver;
private Validator validator;
private GroupsPerOperation groupsPerOperation;
private final HibernateTraversableResolver traversableResolver;
private final Validator validator;
private final GroupsPerOperation groupsPerOperation;

public BeanValidationEventListener(
ValidatorFactory factory, Map<String, Object> settings, ClassLoaderService classLoaderService) {
Expand Down Expand Up @@ -143,7 +137,7 @@ private <T> void validate(
final Set<ConstraintViolation<?>> propagatedViolations = setOfSize( constraintViolations.size() );
final Set<String> classNames = new HashSet<>();
for ( ConstraintViolation<?> violation : constraintViolations ) {
LOG.trace( violation );
log.trace( violation );
propagatedViolations.add( violation );
classNames.add( violation.getLeafBean().getClass().getName() );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
package org.hibernate.boot.beanvalidation;

import java.lang.invoke.MethodHandles;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Set;
Expand All @@ -16,23 +15,19 @@
import org.hibernate.engine.config.spi.ConfigurationService;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.integrator.spi.Integrator;
import org.hibernate.internal.CoreLogging;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.service.spi.ServiceRegistryImplementor;
import org.hibernate.service.spi.SessionFactoryServiceRegistry;

import org.jboss.logging.Logger;

/**
* In {@link Integrator} for Bean Validation.
*
* @author Steve Ebersole
*/
public class BeanValidationIntegrator implements Integrator {
private static final CoreMessageLogger LOG = Logger.getMessageLogger(
MethodHandles.lookup(),
CoreMessageLogger.class,
BeanValidationIntegrator.class.getName()
);

private static final CoreMessageLogger log = CoreLogging.messageLogger( BeanValidationIntegrator.class );

public static final String APPLY_CONSTRAINTS = "hibernate.validator.apply_to_ddl";

Expand Down Expand Up @@ -98,7 +93,7 @@ public void integrate(
}
final Set<ValidationMode> modes = ValidationMode.getModes( modeSetting );
if ( modes.size() > 1 ) {
LOG.multipleValidationModes( ValidationMode.loggable( modes ) );
log.multipleValidationModes( ValidationMode.loggable( modes ) );
}
if ( modes.size() == 1 && modes.contains( ValidationMode.NONE ) ) {
// we have nothing to do; just return
Expand Down
Loading
Loading