/** * returns long version of the build string */ @Override public String toString() { String versionString = String.format("%s version %s was built on %s, at revision %s, with jdk %s", getName(), getVersion(), getBuildTime(), getBuildRevision(), getBuildJdk()); if (!UNKNOWN.equals(getPatchLevel())) { versionString = versionString + ". Patch level " + getPatchLevel(); } return versionString; } }
/** * Assert that the current product is compatible with the version of ehcache available on the classpath */ public void assertRequiredCoreVersionPresent() { boolean ignoreVersionCheck = Boolean.getBoolean("terracotta.ehcache.versioncheck.skip"); String requiredCoreVersion = getRequiredCoreVersion(); if (ignoreVersionCheck || requiredCoreVersion == null) { // no requirement return; } ProductInfo coreProductInfo = new ProductInfo(); String coreVersion = coreProductInfo.getVersion(); if (!coreVersion.equals(requiredCoreVersion)) { String msg = getName() + " version [" + getVersion() + "] only works with ehcache-core version [" + requiredCoreVersion + "] (found version [" + coreVersion + "] on the classpath). " + " Please make sure both versions are compatible!"; throw new CacheException(msg); } }
public class Inventory { private ArrayList<ProductInfo> pis = new ArrayList<productInfo>(); public ProductInfo find (int id, String name) { for(ProductInfo pi : pis) { if(pi.getId() == id && Objects.Equals(pi.getName(),name)) { return pi; } } } }
String productName = productInfo.getName().toLowerCase(); StringBuilder sb = new StringBuilder(); sb.append("kitID="); sb.append(productInfo.getVersion()); sb.append("&tc-product="); sb.append(urlEncode(productInfo.getName() + " " + productInfo.getVersion())); sb.append("&source="); sb.append(urlEncode(productInfo.getName())); sb.append("&uptime-secs="); sb.append(getUptimeInSeconds());
/** * returns long version of the build string */ @Override public String toString() { String versionString = String.format("%s version %s was built on %s, at revision %s, with jdk %s", getName(), getVersion(), getBuildTime(), getBuildRevision(), getBuildJdk()); if (!UNKNOWN.equals(getPatchLevel())) { versionString = versionString + ". Patch level " + getPatchLevel(); } return versionString; } }
/** * returns long version of the build string */ @Override public String toString() { String versionString = String.format("%s version %s was built on %s, at revision %s, with jdk %s", getName(), getVersion(), getBuildTime(), getBuildRevision(), getBuildJdk()); if (!UNKNOWN.equals(getPatchLevel())) { versionString = versionString + ". Patch level " + getPatchLevel(); } return versionString; } }
/** * Assert that the current product is compatible with the version of ehcache available on the classpath */ public void assertRequiredCoreVersionPresent() { boolean ignoreVersionCheck = Boolean.getBoolean("terracotta.ehcache.versioncheck.skip"); String requiredCoreVersion = getRequiredCoreVersion(); if (ignoreVersionCheck || requiredCoreVersion == null) { // no requirement return; } ProductInfo coreProductInfo = new ProductInfo(); String coreVersion = coreProductInfo.getVersion(); if (!coreVersion.equals(requiredCoreVersion)) { String msg = getName() + " version [" + getVersion() + "] only works with ehcache-core version [" + requiredCoreVersion + "] (found version [" + coreVersion + "] on the classpath). " + " Please make sure both versions are compatible!"; throw new CacheException(msg); } }
/** * Assert that the current product is compatible with the version of ehcache available on the classpath */ public void assertRequiredCoreVersionPresent() { boolean ignoreVersionCheck = Boolean.getBoolean("terracotta.ehcache.versioncheck.skip"); String requiredCoreVersion = getRequiredCoreVersion(); if (ignoreVersionCheck || requiredCoreVersion == null) { // no requirement return; } ProductInfo coreProductInfo = new ProductInfo(); String coreVersion = coreProductInfo.getVersion(); if (!coreVersion.equals(requiredCoreVersion)) { String msg = getName() + " version [" + getVersion() + "] only works with ehcache-core version [" + requiredCoreVersion + "] (found version [" + coreVersion + "] on the classpath). " + " Please make sure both versions are compatible!"; throw new CacheException(msg); } }
/** * Assert that the current product is compatible with the version of ehcache available on the classpath */ public void assertRequiredCoreVersionPresent() { boolean ignoreVersionCheck = Boolean.getBoolean("terracotta.ehcache.versioncheck.skip"); String requiredCoreVersion = getRequiredCoreVersion(); if (ignoreVersionCheck || requiredCoreVersion == null) { // no requirement return; } ProductInfo coreProductInfo = new ProductInfo(); String coreVersion = coreProductInfo.getVersion(); if (!coreVersion.equals(requiredCoreVersion)) { String msg = getName() + " version [" + getVersion() + "] only works with ehcache-core version [" + requiredCoreVersion + "] (found version [" + coreVersion + "] on the classpath). " + " Please make sure both versions are compatible!"; throw new CacheException(msg); } }
/** * returns long version of the build string */ @Override public String toString() { String versionString = String.format("%s version %s was built on %s, at revision %s, with jdk %s by %s@%s", getName(), getVersion(), getBuildTime(), getBuildRevision(), getBuildJdk(), getBuiltBy(), getBuildHostname()); if (!UNKNOWN.equals(getPatchLevel())) { versionString = versionString + ". Patch level " + getPatchLevel(); } return versionString; } }
private void prepareParams() { ProductInfo productInfo = new ProductInfo(); String productName = productInfo.getName().toLowerCase(); String kitId = "ehcache.default"; if (productName.contains("ehcache")) { kitId = "ehcache.default"; } else if (productName.contains("bigmemory")) { kitId = "bigmemory.default"; } else { throw new AssertionError("Unknown product name: " + productName); } putUrlSafe("kitID", kitId); putUrlSafe("id", Integer.toString(getClientId())); putUrlSafe("os-name", getProperty("os.name")); putUrlSafe("jvm-name", getProperty("java.vm.name")); putUrlSafe("jvm-version", getProperty("java.version")); putUrlSafe("platform", getProperty("os.arch")); putUrlSafe("tc-version", productInfo.getVersion()); putUrlSafe("tc-product", productInfo.getName() + " " + productInfo.getVersion()); putUrlSafe("source", productInfo.getName()); putUrlSafe("uptime-secs", Long.toString(getUptimeInSeconds())); putUrlSafe("patch", productInfo.getPatchLevel()); }