Skip to content

Commit 6caeb20

Browse files
gavinkingsebersole
andcommitted
HHH-19515 incorporate feedback from @sebersole
Co-authored-by: Steve Ebersole <[email protected]>
1 parent 9a5798e commit 6caeb20

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/ScanningCoordinator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private static Scanner buildScanner(BootstrapContext bootstrapContext, ClassLoad
103103
return scanner;
104104
}
105105
else {
106-
log.debug("No ScannerFactory available; add 'hibernate-scan-jandex' dependency to enable scanning");
106+
log.debug("No ScannerFactory available; to enable scanning add 'hibernate-scan-jandex' dependency or supply a custom ScannerFactory");
107107
return new DisabledScanner();
108108
}
109109
}

hibernate-core/src/main/java/org/hibernate/jpa/HibernatePersistenceConfiguration.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@
7575
* one {@linkplain #jarFileUrls() JAR file URL} is supplied, and when
7676
* {@code hibernate-scan-jandex} or some other service implementing
7777
* {@link org.hibernate.boot.archive.scan.spi.ScannerFactory} is available,
78-
* the given URLs are scanned for entity classes, alleviating the program
79-
* of the need to call {@link #managedClass}.
78+
* the given URLs are scanned for entity classes, embeddable classes,
79+
* mapped superclasses, converters, and XML mappings, alleviating the
80+
* need to call {@link #managedClass} or {@link #mappingFile}.
8081
*
8182
* @apiNote The specification explicitly encourages implementors to extend
8283
* {@link PersistenceConfiguration} to accommodate vendor-specific
@@ -90,7 +91,7 @@
9091
*/
9192
public class HibernatePersistenceConfiguration extends PersistenceConfiguration {
9293

93-
private URL rootUrl;
94+
private final URL rootUrl;
9495
private final List<URL> jarFileUrls = new ArrayList<>();
9596

9697
/**
@@ -103,6 +104,7 @@ public class HibernatePersistenceConfiguration extends PersistenceConfiguration
103104
*/
104105
public HibernatePersistenceConfiguration(String name) {
105106
super( name );
107+
this.rootUrl = null;
106108
}
107109

108110
/**

0 commit comments

Comments
 (0)