From b8b6869945ef8d42b1547f2605477ba32c4f86d0 Mon Sep 17 00:00:00 2001 From: Manyanda Chitimbo Date: Sat, 21 Mar 2020 22:00:44 +0100 Subject: [PATCH] refactor: remove initialization of unused variable in `HibernateOrmIntegrations` I stumbled upon this class while trying to understand the cause of an "unrelated" issue in this comment https://github.com/quarkusio/quarkus/issues/7936#issuecomment-601217372. After running some tests in my dev machine, I think the line of code can be removed. --- .../orm/runtime/boot/LightPersistenceXmlDescriptor.java | 3 --- .../orm/runtime/integration/HibernateOrmIntegrations.java | 2 -- 2 files changed, 5 deletions(-) diff --git a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/boot/LightPersistenceXmlDescriptor.java b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/boot/LightPersistenceXmlDescriptor.java index d1e26398b6e14d..23850f7a0e7d71 100644 --- a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/boot/LightPersistenceXmlDescriptor.java +++ b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/boot/LightPersistenceXmlDescriptor.java @@ -11,12 +11,9 @@ import org.hibernate.bytecode.enhance.spi.EnhancementContext; import org.hibernate.jpa.boot.spi.PersistenceUnitDescriptor; -import org.jboss.logging.Logger; public final class LightPersistenceXmlDescriptor implements PersistenceUnitDescriptor { - private static final Logger log = Logger.getLogger(LightPersistenceXmlDescriptor.class); - private final String name; private final String providerClassName; private final boolean useQuotedIdentifiers; diff --git a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/integration/HibernateOrmIntegrations.java b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/integration/HibernateOrmIntegrations.java index ab17ce3801c5cc..f7b9c23e7af14d 100644 --- a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/integration/HibernateOrmIntegrations.java +++ b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/integration/HibernateOrmIntegrations.java @@ -5,7 +5,6 @@ import java.util.function.BiConsumer; import org.hibernate.boot.Metadata; -import org.hibernate.boot.registry.classloading.spi.ClassLoaderService; import org.hibernate.boot.spi.BootstrapContext; public class HibernateOrmIntegrations { @@ -25,7 +24,6 @@ public static void contributeBootProperties(BiConsumer propertyC public static void onMetadataInitialized(Metadata metadata, BootstrapContext bootstrapContext, BiConsumer propertyCollector) { for (HibernateOrmIntegrationListener listener : LISTENERS) { - ClassLoaderService cls = bootstrapContext.getServiceRegistry().getService(ClassLoaderService.class); listener.onMetadataInitialized(metadata, bootstrapContext, propertyCollector); } }