List of usage examples for java.lang Boolean valueOf
public static Boolean valueOf(String s)
From source file:net.testdriven.psiprobe.controllers.apps.AjaxReloadContextController.java
protected ModelAndView handleContext(String contextName, Context context, HttpServletRequest request, HttpServletResponse response) throws Exception { if (!request.getContextPath().equals(contextName) && context != null) { try {//from www . ja v a 2 s . c o m logger.info(request.getRemoteAddr() + " requested RELOAD of " + contextName); context.reload(); } catch (Throwable e) { logger.error(e); // // make sure we always re-throw ThreadDeath // if (e instanceof ThreadDeath) { throw (ThreadDeath) e; } } } return new ModelAndView(getViewName(), "available", Boolean.valueOf(context != null && context.getAvailable())); }
From source file:com.open.license.config.ContextConfig.java
public ContextConfig() { APP_ENV = System.getProperty("APP_ENV"); DATASOURCE_URL = System.getProperty("DATASOURCE_URL"); DATABASE_USERNAME = System.getProperty("DATABASE_USERNAME"); DATABASE_PASSWORD = System.getProperty("DATABASE_PASSWORD"); START_EMBEDDED_BROKER = Boolean.valueOf(System.getProperty("START_EMBEDDED_BROKER")); ACTIVEMQ_HOST_NAME = System.getProperty("ACTIVEMQ_HOST_NAME"); ACTIVEMQ_TCP_PORT = System.getProperty("ACTIVEMQ_TCP_PORT"); ACTIVEMQ_STOMP_PORT = System.getProperty("ACTIVEMQ_STOMP_PORT"); }
From source file:de.hybris.platform.importcockpit.services.impex.generator.operations.impl.DefaultDataGeneratorOperationTest.java
@Before public void setUp() { MockitoAnnotations.initMocks(this); when(Boolean.valueOf(inputDataLine.isEmpty())).thenReturn(Boolean.FALSE); when(Boolean.valueOf(atomicTypeMapping.hasChildren())).thenReturn(Boolean.TRUE); }
From source file:com.atlassian.jira.config.webwork.JiraAliasingActionFactoryProxy.java
public JiraAliasingActionFactoryProxy(ActionFactory aFactory) { super(aFactory); try {// ww w. java 2 s . c om aliasingOnly = Boolean.valueOf(Configuration.getString("webwork.aliasing.only")).booleanValue(); } catch (IllegalArgumentException e) { // Ignore - hence default is false } }
From source file:com.intuit.tank.vm.settings.ReportingInstance.java
/** * @return whether to reuse stopped instances or to start new ones. *//*from w w w .j a v a 2 s . co m*/ public boolean getReuseInstances() { boolean ret = false; String reuse = get("reuse-instances"); if (reuse != null) { ret = Boolean.valueOf(reuse); } return ret; }
From source file:name.abhijitsarkar.javaee.coffeehouse.spring.support.DayOfTheWeekCondition.java
@Override public boolean matches(final ConditionContext context, final AnnotatedTypeMetadata metadata) { final Map<String, Object> attributes = metadata .getAnnotationAttributes(ConditionalOnDayOfTheWeek.class.getName()); final ConditionalOnDayOfTheWeek.DayOfTheWeek dayOfTheWeek = (ConditionalOnDayOfTheWeek.DayOfTheWeek) attributes .get("value"); final boolean isWeekend = Boolean.valueOf(System.getProperty("isWeekend", "false")); LOGGER.debug("Day of the week: {}, isWeekend: {}.", dayOfTheWeek, isWeekend); return (dayOfTheWeek.equals(ConditionalOnDayOfTheWeek.DayOfTheWeek.WEEKEND) && isWeekend) || (dayOfTheWeek.equals(ConditionalOnDayOfTheWeek.DayOfTheWeek.WEEKDAY) && !isWeekend); }
From source file:facebook4j.RawAPIResponseImpl.java
RawAPIResponseImpl(HttpResponse res) throws FacebookException { responseAsString = res.asString();/* ww w. j av a 2s . c om*/ if (responseAsString.startsWith("{")) { jsonObject = res.asJSONObject(); jsonArray = null; bool = null; } else if (responseAsString.startsWith("[")) { jsonObject = null; jsonArray = res.asJSONArray(); bool = null; } else { jsonObject = null; jsonArray = null; bool = Boolean.valueOf(responseAsString.trim()); } }
From source file:library.functions.BaseFunctions.java
public BaseFunctions() { try {/*from w ww .j a v a 2 s . c o m*/ rxml = new ReadXmlData(); browser = getData().commonData("browser"); remoteUrl = getData().commonData("remoteUrl"); urlString = getData().commonData("url"); record = Boolean.valueOf(getData().commonData("record")); } catch (Throwable e) { throw new ExceptionInInitializerError(e); } }
From source file:de.dal33t.powerfolder.util.ConfigurationLoader.java
public static boolean overwriteConfigEntries(Properties p) { boolean overWrite = Boolean.valueOf(ConfigurationEntry.CONFIG_OVERWRITE_VALUES.getDefaultValue()); String owStr = p.getProperty(ConfigurationEntry.CONFIG_OVERWRITE_VALUES.getConfigKey()); try {// w w w. j a v a 2s .c o m overWrite = Boolean.parseBoolean(owStr); } catch (Exception e) { LOG.warning("Unable to parse pre-config overwrite value. Problem value: " + owStr + ". Now using: " + overWrite + ". " + e); } return overWrite; }
From source file:com.lexicalintelligence.admin.save.SaveRequest.java
public SaveResponse execute() { SaveResponse saveResponse;//from ww w .j a v a 2s . com Reader reader = null; try { HttpResponse response = client.getHttpClient().execute(new HttpGet(client.getUrl() + PATH + getPath())); reader = new InputStreamReader(response.getEntity().getContent(), StandardCharsets.UTF_8); saveResponse = new SaveResponse(Boolean.valueOf(IOUtils.toString(reader))); } catch (Exception e) { saveResponse = new SaveResponse(false); log.error(e); } finally { try { reader.close(); } catch (Exception e) { log.error(e); } } return saveResponse; }