@Test public void testDevEnv() { URL sp = getClass().getClassLoader().getResource("brooklyn/config/sample.properties"); if (sp == null) Assert.fail("Can't find test resources"); log.info("Test for dev env: " + "Dev env? " + BrooklynVersion.isDevelopmentEnvironment() + "; path " + sp); boolean testResourcePathInClasses = sp.getPath().endsWith("classes/brooklyn/config/sample.properties"); Assert.assertEquals(testResourcePathInClasses, BrooklynVersion.isDevelopmentEnvironment(), "Dev env? " + BrooklynVersion.isDevelopmentEnvironment() + "; but resource path: " + sp); }
public static boolean isDevelopmentEnvironment() { Boolean isDevEnv = IS_DEV_ENV.get(); if (isDevEnv != null) return isDevEnv; synchronized (IS_DEV_ENV) { isDevEnv = computeIsDevelopmentEnvironment(); IS_DEV_ENV.set(isDevEnv); return isDevEnv; } }
BrooklynVersion { public static boolean isDevelopmentEnvironment() { Boolean isDevEnv = IS_DEV_ENV.get(); if (isDevEnv != null) return isDevEnv; synchronized (IS_DEV_ENV) { isDevEnv = computeIsDevelopmentEnvironment(); IS_DEV_ENV.set(isDevEnv); return isDevEnv; } } }
BrooklynVersion { public static boolean isDevelopmentEnvironment() { Boolean isDevEnv = IS_DEV_ENV.get(); if (isDevEnv != null) return isDevEnv; synchronized (IS_DEV_ENV) { isDevEnv = computeIsDevelopmentEnvironment(); IS_DEV_ENV.set(isDevEnv); return isDevEnv; } } private  BrooklynVersion(); }
BrooklynVersion { public static boolean isDevelopmentEnvironment() { Boolean isDevEnv = IS_DEV_ENV.get(); if (isDevEnv != null) return isDevEnv; synchronized (IS_DEV_ENV) { isDevEnv = computeIsDevelopmentEnvironment(); IS_DEV_ENV.set(isDevEnv); return isDevEnv; } } private  BrooklynVersion(); void checkVersions(); @Deprecated String getVersionFromClasspath(); @Nullable String getVersionFromMavenProperties(); @Nullable String getVersionFromOsgiManifest(); @Nullable /** SHA1 of the last commit to brooklyn at the time this build was made. * For SNAPSHOT builds of course there may have been further non-committed changes. */ String getSha1FromOsgiManifest(); String getVersion(); boolean isSnapshot(); static boolean isDevelopmentEnvironment(); void logSummary(); @Deprecated static String getVersionFromStatic(); static String get(); static Iterable<BrooklynFeature> getFeatures(ManagementContext mgmt); }
BrooklynVersion { public static boolean isDevelopmentEnvironment() { Boolean isDevEnv = IS_DEV_ENV.get(); if (isDevEnv != null) return isDevEnv; synchronized (IS_DEV_ENV) { isDevEnv = computeIsDevelopmentEnvironment(); IS_DEV_ENV.set(isDevEnv); return isDevEnv; } } private  BrooklynVersion(); void checkVersions(); @Deprecated String getVersionFromClasspath(); @Nullable String getVersionFromMavenProperties(); @Nullable String getVersionFromOsgiManifest(); @Nullable /** SHA1 of the last commit to brooklyn at the time this build was made. * For SNAPSHOT builds of course there may have been further non-committed changes. */ String getSha1FromOsgiManifest(); String getVersion(); boolean isSnapshot(); static boolean isDevelopmentEnvironment(); void logSummary(); @Deprecated static String getVersionFromStatic(); static String get(); static Iterable<BrooklynFeature> getFeatures(ManagementContext mgmt); static final BrooklynVersion INSTANCE; }