mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-184 stateless client now returns the server and client versions
This commit is contained in:
@@ -30,20 +30,28 @@ import java.io.Reader;
|
||||
*/
|
||||
class BuildVersion {
|
||||
|
||||
static String version = null;
|
||||
|
||||
/**
|
||||
* @return version of ChronicleMap being used, or NULL if its not known
|
||||
*/
|
||||
public static String readVersion() {
|
||||
public synchronized static String readVersion() {
|
||||
|
||||
if (version != null) {
|
||||
return version;
|
||||
}
|
||||
|
||||
// the best way to get the version is to read it from the manifest
|
||||
final String version = getVersionFromManifest();
|
||||
final String versionFromManifest = getVersionFromManifest();
|
||||
|
||||
if (version != null)
|
||||
if (versionFromManifest != null) {
|
||||
version = versionFromManifest;
|
||||
return version;
|
||||
}
|
||||
|
||||
// as a fall back for development, we will read the version from the pom file
|
||||
return getVersionFromPom();
|
||||
version = getVersionFromPom();
|
||||
return version;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user