public static boolean isAndroidMockMakerRequired() { return Boolean.getBoolean("org.mockito.mock.android"); }
/** * Return true if extended ephemeral types are enabled * * @return true/false */ public static boolean extendedEphemeralTypesEnabled() { return Boolean.getBoolean(EXTENDED_TYPES_ENABLED_PROPERTY); }
/** * Gets whether or not to serialize Jib's execution. This is defined by the {@code jibSerialize} * system property. * * @return {@code true} if Jib's execution should be serialized, {@code false} if not */ public static boolean isSerializedExecutionEnabled() { return Boolean.getBoolean(SERIALIZE); }
/** * Gets whether or not to allow sending authentication information over insecure HTTP connections. * This is defined by the {@code sendCredentialsOverHttp} system property. * * @return {@code true} if authentication information is allowed to be sent over insecure * connections, {@code false} if not */ public static boolean isSendCredentialsOverHttpEnabled() { return Boolean.getBoolean(SEND_CREDENTIALS_OVER_HTTP); }
public static boolean loggingEnabled() { return Boolean.getBoolean(LOGGING_ENABLED); } }
/** * Return syncEnabled. * * @return */ public boolean getSyncEnabled() { if (System.getProperty(SYNC_ENABLED) != null) { LOG.info(SYNC_ENABLED + "=" + Boolean.getBoolean(SYNC_ENABLED)); return Boolean.getBoolean(SYNC_ENABLED); } else { return syncEnabled; } }
@Override public Boolean get() { if (System.getProperty(name) == null) { return fallback; } return Boolean.getBoolean(name); }
public Boolean convert(Object value) { if ( value == null ) { return null; } if ( Boolean.class.isInstance( value ) ) { return (Boolean) value; } if ( String.class.isInstance( value ) ) { return Boolean.getBoolean( (String) value ); } throw unknownConversion( value, Boolean.class ); } }
@Override boolean supportsSubRepositories() { String val = System.getenv(NOFOREST_PROPERTY_KEY); return !(val == null ? Boolean.getBoolean(NOFOREST_PROPERTY_KEY) : Boolean.parseBoolean(val)); }
/** * Check if an ipv6 address is reachable. * * @param address the given address * @return true if it is reachable */ static boolean isValidV6Address(Inet6Address address) { boolean preferIpv6 = Boolean.getBoolean("java.net.preferIPv6Addresses"); if (!preferIpv6) { return false; } try { return address.isReachable(100); } catch (IOException e) { // ignore } return false; }
/** * Check if an ipv6 address is reachable. * * @param address the given address * @return true if it is reachable */ static boolean isValidV6Address(Inet6Address address) { boolean preferIpv6 = Boolean.getBoolean("java.net.preferIPv6Addresses"); if (!preferIpv6) { return false; } try { return address.isReachable(100); } catch (IOException e) { // ignore } return false; }
private static boolean isLog4jJmxEnabled() { boolean enabled = false; try { Class.forName("org.apache.log4j.spi.LoggerRepository"); if (Boolean.getBoolean("zookeeper.jmx.log4j.disable")) { LOG.info("Log4j found but jmx support is disabled."); } else { enabled = true; LOG.info("Log4j found with jmx enabled."); } } catch (ClassNotFoundException e) { LOG.info("Log4j not found."); } return enabled; }
private static boolean isTooVerbose() { return Boolean.getBoolean(TestNG.SHOW_TESTNG_STACK_FRAMES) || TestRunner.getVerbose() >= 2; }
private static synchronized void updateCachedIsAccessibilityEnabled( AccessibilityManager manager) { cachedIsAccessibilityEnabled = Boolean.getBoolean("is_accessibility_enabled") || isRunningApplicableAccessibilityService(manager); isCachedIsAccessibilityEnabledSet = true; }
protected boolean skipSerializedCanonicalTests() { return Boolean.getBoolean("org.apache.commons.collections:with-clover"); }
/** * Set the System property; return the old value for caching. * * @param sysprop property * @param debug true or false * @return the previous value */ private boolean getAndSet(String sysprop, String debug) { boolean old = Boolean.getBoolean(sysprop); System.setProperty(sysprop, debug); return old; } }
public static boolean isAccessibilityEnabled(AccessibilityManager manager) { if (isCachingEnabled) { if (!isCachedIsAccessibilityEnabledSet) { updateCachedIsAccessibilityEnabled(manager); } return cachedIsAccessibilityEnabled; } else { return Boolean.getBoolean("is_accessibility_enabled") || isRunningApplicableAccessibilityService(manager); } }
static ResolverProvider factory(Vertx vertx, AddressResolverOptions options) { // For now not really plugable, we just want to not fail when we can't load the async provider // that use an unstable API and fallback on the default (blocking) provider try { if (!Boolean.getBoolean(DISABLE_DNS_RESOLVER_PROP_NAME)) { return new DnsResolverProvider((VertxImpl) vertx, options); } } catch (Throwable e) { if (e instanceof VertxException) { throw e; } Logger logger = LoggerFactory.getLogger(ResolverProvider.class); logger.info("Using the default address resolver as the dns resolver could not be loaded"); } return new DefaultResolverProvider(); }
SubclassInjectionLoader() { if (!Boolean.getBoolean("org.mockito.internal.noUnsafeInjection") && ClassInjector.UsingReflection.isAvailable()) { this.loader = new WithReflection(); } else if (ClassInjector.UsingLookup.isAvailable()) { this.loader = tryLookup(); } else { throw new MockitoException(join(ERROR_MESSAGE, "", Platform.describe())); } }
@Override public boolean isSatisfied() { if (Boolean.getBoolean(forceSystemProperty())) { return true; } return Util.isUnix(); }