private String getProductVersionInFile(File file, String versionPrefix, JBossProductType productType) { if (!file.exists() || file.isDirectory()) { return null; } try { String versionLine = FileUtils.findString(file.getAbsolutePath(), versionPrefix); if (isNotBlank(versionLine)) { return productType.SHORT_NAME + " " + versionLine.substring(versionLine.lastIndexOf(versionPrefix) + versionPrefix.length()); } } catch (IOException e) { if (LOG.isDebugEnabled()) { LOG.debug("Could not read file " + file.getAbsolutePath(), e); } } return null; }
@Override boolean isConnectorPropertyDefined() { PropertyMap connector = configuration.getMap(CONNECTOR_PROPERTY); if (connector != null) { return isNotBlank(connector.getSimpleValue("name:0", EMPTY_STRING)); } return false; }
ConfigurationUpdateHelper(Configuration configuration) { this.configuration = configuration; hasDiscoveryGroupName = isNotBlank(this.configuration.getSimpleValue(DISCOVERY_GROUP_NAME)); hasConnector = isConnectorPropertyDefined(); hasNoneOfTheAlternatives = hasDiscoveryGroupName == hasConnector && hasConnector == false; errorMessage = getBeginningOfErrorMessage() + (hasNoneOfTheAlternatives ? " You provided none." : " You provided both."); }
if (isNotBlank(t.getMessage())) { messageBuilder.append(" - ").append(t.getMessage()); if (isNotBlank(t.getCause().getMessage())) { messageBuilder.append(": ").append(t.getCause().getMessage());
if (StringUtil.isNotBlank(res.getFailureDescription()) && res.getFailureDescription().startsWith(ASConnection.FAILURE_NO_RESPONSE)) { operationResult.setSimpleResult("Success");