Skip to content
Merged
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 @@ -28,6 +28,7 @@
public class HANALegacyServerConfiguration {

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
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(
MethodHandles.lookup(),
CoreMessageLogger.class,
org.hibernate.community.dialect.HSQLLegacyDialect.class.getName()
);

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

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 @@ -41,6 +41,7 @@
* @author Gail Badner
*/
public class UnresolvedEntityInsertActions {

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

private static final int INIT_SIZE = 5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
* @since 5.0
*/
public class MetadataSources implements Serializable {

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

private final ServiceRegistry serviceRegistry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @author Steve Ebersole
*/
public class ArchiveHelper {
private static final Logger log = Logger.getLogger( ArchiveHelper.class );
private static final Logger LOG = Logger.getLogger( ArchiveHelper.class );

/**
* Get the JAR URL of the JAR containing the given entry.
Expand Down Expand Up @@ -91,7 +91,7 @@ else if ( "zip".equals( protocol )
"Unable to determine JAR Url from " + url + ". Cause: " + e.getMessage()
);
}
log.tracef( "JAR URL from URL Entry: %s >> %s", url, jarUrl );
LOG.tracef( "JAR URL from URL Entry: %s >> %s", url, jarUrl );
return jarUrl;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @author Steve Ebersole
*/
public class StandardArchiveDescriptorFactory implements ArchiveDescriptorFactory, JarFileEntryUrlAdjuster {
private static final Logger log = Logger.getLogger( StandardArchiveDescriptorFactory.class );
private static final Logger LOG = Logger.getLogger( StandardArchiveDescriptorFactory.class );

/**
* Singleton access
Expand Down Expand Up @@ -129,8 +129,8 @@ public URL adjustJarFileEntryUrl(URL url, URL rootUrl) {
}
catch (MalformedURLException e) {
// allow to pass through to return the original URL
if ( log.isDebugEnabled() ) {
log.debugf(
if ( LOG.isDebugEnabled() ) {
LOG.debugf(
e,
"Unable to adjust relative <jar-file/> URL [%s] relative to root URL [%s]",
filePart,
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
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.invoke.MethodHandles;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
Expand Down Expand Up @@ -36,6 +35,7 @@
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.event.service.spi.EventListenerRegistry;
import org.hibernate.event.spi.EventType;
import org.hibernate.internal.CoreLogging;
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.mapping.CheckConstraint;
import org.hibernate.mapping.Column;
Expand All @@ -46,7 +46,6 @@
import org.hibernate.mapping.SingleTableSubclass;

import org.hibernate.service.spi.SessionFactoryServiceRegistry;
import org.jboss.logging.Logger;

import jakarta.validation.Validation;
import jakarta.validation.ValidatorFactory;
Expand All @@ -73,7 +72,7 @@
*/
class TypeSafeActivator {

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

/**
* Used to validate a supplied ValidatorFactory instance as being castable to ValidatorFactory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @author Steve Ebersole
*/
public class ConfigLoader {
private static final Logger log = Logger.getLogger( ConfigLoader.class );
private static final Logger LOG = Logger.getLogger( ConfigLoader.class );

private final BootstrapServiceRegistry bootstrapServiceRegistry;

Expand Down Expand Up @@ -64,7 +64,7 @@ public LoadedConfig loadConfigXmlResource(String cfgXmlResourceName) {
stream.close();
}
catch (IOException e) {
log.debug( "Unable to close cfg.xml resource stream", e );
LOG.debug( "Unable to close cfg.xml resource stream", e );
}
}
}
Expand Down Expand Up @@ -101,7 +101,7 @@ public LoadedConfig loadConfigXmlUrl(URL url) {
stream.close();
}
catch (IOException e) {
log.debug( "Unable to close cfg.xml URL stream", e );
LOG.debug( "Unable to close cfg.xml URL stream", e );
}
}
}
Expand Down Expand Up @@ -130,7 +130,7 @@ public Properties loadProperties(String resourceName) {
stream.close();
}
catch (IOException e) {
log.debug( "Unable to close properties file stream [" + resourceName + "]", e );
LOG.debug( "Unable to close properties file stream [" + resourceName + "]", e );
}
}
}
Expand All @@ -154,7 +154,7 @@ public Properties loadProperties(File file) {
stream.close();
}
catch (IOException e) {
log.debug( "Unable to close properties file stream [" + file.getAbsolutePath() + "]", e );
LOG.debug( "Unable to close properties file stream [" + file.getAbsolutePath() + "]", e );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* @author Steve Ebersole
*/
public class JaxbCfgProcessor {
private static final Logger log = Logger.getLogger( JaxbCfgProcessor.class );
private static final Logger LOG = Logger.getLogger( JaxbCfgProcessor.class );

public static final String HIBERNATE_CONFIGURATION_URI = "http://www.hibernate.org/xsd/orm/cfg";

Expand Down Expand Up @@ -110,7 +110,7 @@ private JaxbCfgHibernateConfiguration unmarshal(XMLEventReader staxEventReader,

if ( !isNamespaced( event.asStartElement() ) ) {
// if the elements are not namespaced, wrap the reader in a reader which will namespace them as pulled.
log.debug( "cfg.xml document did not define namespaces; wrapping in custom event reader to introduce namespace information" );
LOG.debug( "cfg.xml document did not define namespaces; wrapping in custom event reader to introduce namespace information" );
staxEventReader = new NamespaceAddingEventReader( staxEventReader, HIBERNATE_CONFIGURATION_URI );
}

Expand Down Expand Up @@ -169,7 +169,7 @@ private Schema resolveLocalSchema(String schemaName, String schemaLanguage) {
schemaStream.close();
}
catch ( IOException e ) {
log.debugf( "Problem closing schema stream [%s]", e.toString() );
LOG.debugf( "Problem closing schema stream [%s]", e.toString() );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* representation can be maintained through calls to {@link #merge}.
*/
public class LoadedConfig {
private static final Logger log = Logger.getLogger( LoadedConfig.class );
private static final Logger LOG = Logger.getLogger( LoadedConfig.class );

private String sessionFactoryName;

Expand Down Expand Up @@ -107,7 +107,7 @@ public static LoadedConfig consume(JaxbCfgHibernateConfiguration jaxbCfg) {

for ( JaxbCfgEventListenerType listener : listenerGroup.getListener() ) {
if ( listener.getType() != null ) {
log.debugf( "Listener [%s] defined as part of a group also defined event type", listener.getClazz() );
LOG.debugf( "Listener [%s] defined as part of a group also defined event type", listener.getClazz() );
}
cfg.addEventListener( eventType, listener.getClazz() );
}
Expand Down Expand Up @@ -194,7 +194,7 @@ public void addEventListener(EventType<?> eventType, String listenerClass) {
public void merge(LoadedConfig incoming) {
if ( sessionFactoryName != null ) {
if ( incoming.getSessionFactoryName() != null ) {
log.debugf(
LOG.debugf(
"More than one cfg.xml file attempted to supply SessionFactory name: [%s], [%s]. Keeping initially discovered one [%s]",
getSessionFactoryName(),
incoming.getSessionFactoryName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
* @author Andrea Boriero
*/
public class BootstrapContextImpl implements BootstrapContext {
private static final Logger log = Logger.getLogger( BootstrapContextImpl.class );
private static final Logger LOG = Logger.getLogger( BootstrapContextImpl.class );

private final StandardServiceRegistry serviceRegistry;
private final MetadataBuildingOptions metadataBuildingOptions;
Expand Down Expand Up @@ -308,40 +308,40 @@ public void addAttributeConverterDescriptor(ConverterDescriptor<?,?> descriptor)
}

void injectJpaTempClassLoader(ClassLoader classLoader) {
if ( log.isTraceEnabled() && classLoader != getJpaTempClassLoader() ) {
log.tracef( "Injecting JPA temp ClassLoader [%s] into BootstrapContext; was [%s]",
if ( LOG.isTraceEnabled() && classLoader != getJpaTempClassLoader() ) {
LOG.tracef( "Injecting JPA temp ClassLoader [%s] into BootstrapContext; was [%s]",
classLoader, getJpaTempClassLoader() );
}
this.classLoaderAccess.injectTempClassLoader( classLoader );
}

void injectScanOptions(ScanOptions scanOptions) {
if ( log.isTraceEnabled() && scanOptions != this.scanOptions ) {
log.tracef( "Injecting ScanOptions [%s] into BootstrapContext; was [%s]",
if ( LOG.isTraceEnabled() && scanOptions != this.scanOptions ) {
LOG.tracef( "Injecting ScanOptions [%s] into BootstrapContext; was [%s]",
scanOptions, this.scanOptions );
}
this.scanOptions = scanOptions;
}

void injectScanEnvironment(ScanEnvironment scanEnvironment) {
if ( log.isTraceEnabled() && scanEnvironment != this.scanEnvironment ) {
log.tracef( "Injecting ScanEnvironment [%s] into BootstrapContext; was [%s]",
if ( LOG.isTraceEnabled() && scanEnvironment != this.scanEnvironment ) {
LOG.tracef( "Injecting ScanEnvironment [%s] into BootstrapContext; was [%s]",
scanEnvironment, this.scanEnvironment );
}
this.scanEnvironment = scanEnvironment;
}

void injectScanner(Scanner scanner) {
if ( log.isTraceEnabled() && scanner != this.scannerSetting ) {
log.tracef( "Injecting Scanner [%s] into BootstrapContext; was [%s]",
if ( LOG.isTraceEnabled() && scanner != this.scannerSetting ) {
LOG.tracef( "Injecting Scanner [%s] into BootstrapContext; was [%s]",
scanner, scannerSetting );
}
this.scannerSetting = scanner;
}

void injectArchiveDescriptorFactory(ArchiveDescriptorFactory factory) {
if ( log.isTraceEnabled() && factory != archiveDescriptorFactory ) {
log.tracef( "Injecting ArchiveDescriptorFactory [%s] into BootstrapContext; was [%s]",
if ( LOG.isTraceEnabled() && factory != archiveDescriptorFactory ) {
LOG.tracef( "Injecting ArchiveDescriptorFactory [%s] into BootstrapContext; was [%s]",
factory, archiveDescriptorFactory );
}
this.archiveDescriptorFactory = factory;
Expand Down
Loading