Element minElement, Element maxElement, ContractLineType contractLineType) throws DataConversionException { boolean minimumEnabled = minElement == null ? false : minElement.getAttribute("on").getBooleanValue(); int minimumWeight; if (minimumEnabled) { minimumWeight = 0; boolean maximumEnabled = maxElement == null ? false : maxElement.getAttribute("on").getBooleanValue(); int maximumWeight; if (maximumEnabled) {
private Boolean parseBooleanAttr(Element sharingChild, String attrName) { Attribute attribute = sharingChild.getAttribute(attrName); Boolean attrValue = null; if (attribute != null) { try { attrValue = Boolean.valueOf(attribute.getBooleanValue()); } catch (DataConversionException e) { // dont use the data } } return attrValue; }
private Boolean parseBooleanAttr(Element sharingChild, String attrName) { Attribute attribute = sharingChild.getAttribute(attrName); Boolean attrValue = null; if (attribute != null) { try { attrValue = Boolean.valueOf(attribute.getBooleanValue()); } catch (DataConversionException e) { // dont use the data } } return attrValue; }
public void readFrom(Element element) { Element channelElement = element.getChild(ELEMENT_CHANNEL); Element logoElement = element.getChild(ELEMENT_LOGO_URL); Attribute enabledAttr = element.getAttribute(ATTR_ENABLED); if( enabledAttr != null ) { try { enabled = enabledAttr.getBooleanValue() ; } catch (DataConversionException e) { enabled = true ; } } else { enabled = true ; } if( channelElement != null ) { this.channel = channelElement.getText(); } if( logoElement != null ) { this.logoUrl = logoElement.getText(); } }
/** * The entry point to this class. This function takes a method element and * processes it, adding instructions to release and retain objects as * needed. For the command set that it adds, see the InstructionProcessor * class. */ @SuppressWarnings("unchecked") public void process(Element method) throws DataConversionException, ReferenceCountingException { Attribute isAbstract= method.getAttribute("isAbstract"); Attribute isNative= method.getAttribute("isNative"); // abstract and native methods do not require processing if (isAbstract != null && isAbstract.getBooleanValue()) { return; } if (isNative != null && isNative.getBooleanValue()) { return; } Element codeElement= method.getChild("code", dex); int numReg= codeElement.getAttribute("register-size").getIntValue(); processRecStart(numReg, (List<Element>) codeElement.getChildren(), codeElement); }
postSuccessful = postSuccessfulAttr.getBooleanValue(); postStarted = postStartedAttr.getBooleanValue(); postFailed = postFailedAttr.getBooleanValue();
if ("MetaData".equals(childDef.getAttribute("name").getValue()) && "mgnl:metaData".equals(childDef.getAttribute("defaultPrimaryType").getValue()) && childDef.getAttribute("autoCreated").getBooleanValue() && childDef.getAttribute("mandatory").getBooleanValue()) { foundChildDef = true; break;
eState.getAttribute(ATTR_ENABLED).getBooleanValue()); } catch (DataConversionException e1) { Loggers.SERVER.warn(LOG_PREFIX_WEB_HOOK_CONFIG + e1.getMessage()); if (eTypes.getAttribute(ATTR_ENABLED_FOR_ALL) != null){ try { this.enableForAllBuildsInProject(eTypes.getAttribute(ATTR_ENABLED_FOR_ALL).getBooleanValue()); } catch (DataConversionException e1) { Loggers.SERVER.warn(LOG_PREFIX_WEB_HOOK_CONFIG + e1.getMessage()); this.enableForSubProjects(eTypes.getAttribute(ATTR_ENABLED_FOR_SUBPROJECTS).getBooleanValue()); } catch (DataConversionException e1) { Loggers.SERVER.warn(LOG_PREFIX_WEB_HOOK_CONFIG + e1.getMessage()); authEnabled = eAuth.getAttribute(ATTR_ENABLED).getBooleanValue(); } catch (DataConversionException e1){ authPreemptive = eAuth.getAttribute(ATTR_PREEMPTIVE).getBooleanValue();
eState.getAttribute(ENABLED).getBooleanValue()); } catch (DataConversionException e1) {e1.printStackTrace();} if (eTypes.getAttribute(ENABLED_FOR_ALL) != null){ try { this.enableForAllBuildsInProject(eTypes.getAttribute(ENABLED_FOR_ALL).getBooleanValue()); } catch (DataConversionException e1) {e1.printStackTrace();} this.enableForSubProjects(eTypes.getAttribute(ENABLED_FOR_SUBPROJECTS).getBooleanValue()); } catch (DataConversionException e1) {e1.printStackTrace();}
Element minElement, Element maxElement, ContractLineType contractLineType) throws DataConversionException { boolean minimumEnabled = minElement == null ? false : minElement.getAttribute("on").getBooleanValue(); int minimumWeight; if (minimumEnabled) { minimumWeight = 0; boolean maximumEnabled = maxElement == null ? false : maxElement.getAttribute("on").getBooleanValue(); int maximumWeight; if (maximumEnabled) {
public JedisPoolConfig initRediPoolConfig() throws DataConversionException { Element element = JdomUtils.getRootElemet(FileUtil.getConfigURL(GlobalConstants.RedisConfigFile.REDIS_POOL_CONIFG).getFile()); JedisPoolConfig jedisPoolConfig = new JedisPoolConfig(); int maxIdle = element.getAttribute("maxIdle").getIntValue(); boolean testWhileIdle = element.getAttribute("testWhileIdle").getBooleanValue(); int timeBetweenEvictionRunsMillis = element.getAttribute("timeBetweenEvictionRunsMillis").getIntValue(); int numTestsPerEvictionRun = element.getAttribute("numTestsPerEvictionRun").getIntValue(); int minEvictableIdleTimeMillis = element.getAttribute("minEvictableIdleTimeMillis").getIntValue(); jedisPoolConfig.setTestWhileIdle(testWhileIdle); jedisPoolConfig.setMaxIdle(maxIdle); jedisPoolConfig.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); jedisPoolConfig.setNumTestsPerEvictionRun(numTestsPerEvictionRun); jedisPoolConfig.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis); return jedisPoolConfig; }