HHH-13837 Initialize the Hibernate VERSION as a real constant
This commit is contained in:
parent
5f302c57a7
commit
cc7c7d7ee3
|
@ -16,27 +16,25 @@ import org.jboss.logging.Logger;
|
||||||
*
|
*
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public class Version {
|
public final class Version {
|
||||||
private static String version;
|
|
||||||
|
private static final String VERSION = initVersion();
|
||||||
|
|
||||||
|
private static String initVersion() {
|
||||||
|
final String version = Version.class.getPackage().getImplementationVersion();
|
||||||
|
return version != null ? version : "[WORKING]";
|
||||||
|
}
|
||||||
|
|
||||||
private Version() {
|
private Version() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Access to the Hibernate version.
|
* Access to the Hibernate ORM version.
|
||||||
*
|
|
||||||
* IMPL NOTE : Real value is injected by the build.
|
|
||||||
*
|
*
|
||||||
* @return The Hibernate version
|
* @return The Hibernate version
|
||||||
*/
|
*/
|
||||||
public static String getVersionString() {
|
public static String getVersionString() {
|
||||||
if ( version == null ) {
|
return VERSION;
|
||||||
version = Version.class.getPackage().getImplementationVersion();
|
|
||||||
if ( version == null ) {
|
|
||||||
version = "[WORKING]";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return version;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue