File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
hibernate-core/src/main/java/org/hibernate Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 8
8
import org .hibernate .internal .build .AllowSysOut ;
9
9
10
10
import java .lang .invoke .MethodHandles ;
11
+ import java .lang .module .ModuleDescriptor ;
11
12
12
13
import static org .jboss .logging .Logger .getMessageLogger ;
13
14
@@ -21,8 +22,8 @@ public final class Version {
21
22
private static final String VERSION = initVersion ();
22
23
23
24
private static String initVersion () {
24
- final String version = Version .class .getPackage ().getImplementationVersion () ;
25
- return version != null ? version : "[WORKING]" ;
25
+ ModuleDescriptor moduleDescriptor = Version .class .getModule ().getDescriptor () ;
26
+ return moduleDescriptor != null ? ( moduleDescriptor . version (). isPresent () ? moduleDescriptor . version (). toString () : "[WORKING]" ) : "[WORKING]" ;
26
27
}
27
28
28
29
private Version () {
You can’t perform that action at this time.
0 commit comments