9696/**
9797 * Represents the process of transforming a {@link MetadataSources}
9898 * reference into a {@link org.hibernate.boot.Metadata} reference. Allows for 2 different process paradigms:<ul>
99- * <li>
100- * Single step : as defined by the {@link #build} method; internally leverages the 2-step paradigm
101- * </li>
102- * <li>
103- * Two step : a first step coordinates resource scanning and some other preparation work; a second step
104- * builds the {@link org.hibernate.boot.Metadata}. A hugely important distinction in the need for the
105- * steps is that the first phase should strive to not load user entity/component classes so that we can still
106- * perform enhancement on them later. This approach caters to the 2-phase bootstrap we use in regards
107- * to WildFly Hibernate-JPA integration. The first step is defined by {@link #prepare} which returns
108- * a {@link ManagedResources} instance. The second step is defined by calling
109- * {@link #complete}
110- * </li>
99+ * <li>
100+ * Single step : as defined by the {@link #build} method; internally leverages the 2-step paradigm
101+ * </li>
102+ * <li>
103+ * Two step : a first step coordinates resource scanning and some other preparation work; a second step
104+ * builds the {@link org.hibernate.boot.Metadata}. A hugely important distinction in the need for the
105+ * steps is that the first phase should strive to not load user entity/component classes so that we can still
106+ * perform enhancement on them later. This approach caters to the 2-phase bootstrap we use in regards
107+ * to WildFly Hibernate-JPA integration. The first step is defined by {@link #prepare} which returns
108+ * a {@link ManagedResources} instance. The second step is defined by calling
109+ * {@link #complete}
110+ * </li>
111111 * </ul>
112112 *
113113 * @author Steve Ebersole
@@ -200,7 +200,7 @@ public static MetadataImplementor complete(
200200
201201 final MetadataSourceProcessor processor = new MetadataSourceProcessor () {
202202 private final MetadataSourceProcessor hbmProcessor =
203- options .isXmlMappingEnabled ()
203+ options .isXmlMappingEnabled ()
204204 ? new HbmMetadataSourceProcessorImpl ( managedResources , rootMetadataBuildingContext )
205205 : new NoOpMetadataSourceProcessorImpl ();
206206
@@ -339,19 +339,8 @@ public void finishUp() {
339339
340340 processor .finishUp ();
341341
342- processAdditionalMappingContributions (
343- metadataCollector ,
344- options ,
345- classLoaderService ,
346- rootMetadataBuildingContext
347- );
348- processAdditionalJaxbMappingProducer (
349- metadataCollector ,
350- options ,
351- jandexView ,
352- classLoaderService ,
353- rootMetadataBuildingContext
354- );
342+ processAdditionalMappingContributions ( metadataCollector , options , classLoaderService , rootMetadataBuildingContext );
343+ processAdditionalJaxbMappingProducer ( metadataCollector , options , jandexView , classLoaderService , rootMetadataBuildingContext );
355344
356345 applyExtraQueryImports ( managedResources , metadataCollector );
357346
@@ -391,8 +380,7 @@ public boolean transformHbmMappings() {
391380 rootMetadataBuildingContext
392381 );
393382
394- final Collection <AdditionalMappingContributor > additionalMappingContributors = classLoaderService .loadJavaServices (
395- AdditionalMappingContributor .class );
383+ final Collection <AdditionalMappingContributor > additionalMappingContributors = classLoaderService .loadJavaServices ( AdditionalMappingContributor .class );
396384 additionalMappingContributors .forEach ( (contributor ) -> {
397385 contributions .setCurrentContributor ( contributor .getContributorName () );
398386 try {
@@ -463,7 +451,7 @@ public void contributeBinding(InputStream xmlStream) {
463451
464452 @ Override
465453 public void contributeBinding (JaxbEntityMappings mappingJaxbBinding ) {
466- if ( !options .isXmlMappingEnabled () ) {
454+ if ( ! options .isXmlMappingEnabled () ) {
467455 return ;
468456 }
469457
@@ -475,7 +463,7 @@ public void contributeBinding(JaxbEntityMappings mappingJaxbBinding) {
475463
476464 @ Override
477465 public void contributeBinding (JaxbHbmHibernateMapping hbmJaxbBinding ) {
478- if ( !options .isXmlMappingEnabled () ) {
466+ if ( ! options .isXmlMappingEnabled () ) {
479467 return ;
480468 }
481469
@@ -540,8 +528,7 @@ private static void processAdditionalJaxbMappingProducer(
540528 ClassLoaderService classLoaderService ,
541529 MetadataBuildingContextRootImpl rootMetadataBuildingContext ) {
542530 if ( options .isXmlMappingEnabled () ) {
543- final Iterable <AdditionalJaxbMappingProducer > producers = classLoaderService .loadJavaServices (
544- AdditionalJaxbMappingProducer .class );
531+ final Iterable <AdditionalJaxbMappingProducer > producers = classLoaderService .loadJavaServices ( AdditionalJaxbMappingProducer .class );
545532 if ( producers != null ) {
546533 final EntityHierarchyBuilder hierarchyBuilder = new EntityHierarchyBuilder ();
547534 final MappingBinder mappingBinder = new MappingBinder (
@@ -611,7 +598,7 @@ private static void handleTypes(
611598 MetadataBuildingOptions options ,
612599 InFlightMetadataCollector metadataCollector ) {
613600 final ClassLoaderService classLoaderService =
614- options .getServiceRegistry ().requireService ( ClassLoaderService .class );
601+ options .getServiceRegistry ().requireService (ClassLoaderService .class );
615602
616603 final TypeConfiguration typeConfiguration = bootstrapContext .getTypeConfiguration ();
617604 final StandardServiceRegistry serviceRegistry = bootstrapContext .getServiceRegistry ();
@@ -645,7 +632,7 @@ public void contributeType(CompositeUserType<?> type) {
645632 basicTypeRegistry .addTypeReferenceRegistrationKey (
646633 StandardBasicTypes .BINARY_WRAPPER .getName (),
647634 Byte [].class .getName (), "Byte[]"
648- );
635+ );
649636 }
650637
651638 // add Dialect contributed types
@@ -855,9 +842,7 @@ private static void adaptTimestampTypesToDefaultTimeZoneStorage(
855842 );
856843 }
857844
858- private static JdbcType getTimeWithTimeZoneOverride (
859- MetadataBuildingOptions options ,
860- JdbcTypeRegistry jdbcTypeRegistry ) {
845+ private static JdbcType getTimeWithTimeZoneOverride (MetadataBuildingOptions options , JdbcTypeRegistry jdbcTypeRegistry ) {
861846 switch ( options .getDefaultTimeZoneStorage () ) {
862847 case NORMALIZE :
863848 // For NORMALIZE, we replace the standard types that use TIME_WITH_TIMEZONE to use TIME
@@ -870,9 +855,7 @@ private static JdbcType getTimeWithTimeZoneOverride(
870855 }
871856 }
872857
873- private static JdbcType getTimestampWithTimeZoneOverride (
874- MetadataBuildingOptions options ,
875- JdbcTypeRegistry jdbcTypeRegistry ) {
858+ private static JdbcType getTimestampWithTimeZoneOverride (MetadataBuildingOptions options , JdbcTypeRegistry jdbcTypeRegistry ) {
876859 switch ( options .getDefaultTimeZoneStorage () ) {
877860 case NORMALIZE :
878861 // For NORMALIZE, we replace the standard types that use TIMESTAMP_WITH_TIMEZONE to use TIMESTAMP
0 commit comments