HCOLL-184 stateless client now returns the server and client versions

This commit is contained in:
Rob Austin
2014-12-23 12:07:51 +00:00
parent 9b7279daf0
commit e257fca466
7 changed files with 93 additions and 46 deletions
@@ -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;
}
/**