Skip to content
Permalink
Browse files

Merge pull request #3741 from bstansberry/WFCORE-4418

[WFCORE-4418] Deprecate unused ParseUtil methods.
  • Loading branch information
bstansberry committed Apr 14, 2019
2 parents 551be72 + 8d7227e commit 1786c007d9a8fed37dd28c69245f050a677cb043
Showing with 7 additions and 2 deletions.
  1. +7 −2 controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java
@@ -78,7 +78,7 @@ public static Element nextElement(XMLExtendedStreamReader reader, Namespace expe
Element element = nextElement(reader);

if (element == null) {
return element;
return null;
} else if (element != Element.UNKNOWN
&& expectedNamespace.equals(Namespace.forUri(reader.getNamespaceURI()))) {
return element;
@@ -418,7 +418,7 @@ public static String readStringAttributeElement(final XMLExtendedStreamReader re
* element does not contain the specified attribute, contains other
* attributes, or contains child elements.
*/
@SuppressWarnings({ "unchecked" })
@SuppressWarnings({"unchecked", "WeakerAccess"})
public static <T> List<T> readListAttributeElement(final XMLExtendedStreamReader reader, final String attributeName,
final Class<T> type) throws XMLStreamException {
requireSingleAttribute(reader, attributeName);
@@ -539,6 +539,8 @@ public static void requireNoNamespaceAttribute(final XMLExtendedStreamReader rea
}
}

/** @deprecated Use an {@code AttributeDefinition} for this kind of parsing. Will be removed -- https://issues.jboss.org/browse/WFCORE-4419 */
@Deprecated
public static ModelNode parseBoundedIntegerAttribute(final XMLExtendedStreamReader reader, final int index,
final int minInclusive, final int maxInclusive, boolean allowExpression) throws XMLStreamException {
final String stringValue = reader.getAttributeValue(index);
@@ -610,6 +612,7 @@ public static ModelNode parseAttributeValue(final String value, final boolean is
return node;
}

@SuppressWarnings("WeakerAccess")
public static boolean isExpression(String value) {
int openIdx = value.indexOf("${");
return openIdx > -1 && value.lastIndexOf('}') > openIdx;
@@ -626,6 +629,8 @@ public static ModelNode parsePossibleExpression(String value) {
return result;
}

/** @deprecated Will be removed -- https://issues.jboss.org/browse/WFCORE-4419 */
@Deprecated
public static String getWarningMessage(final String msg, final Location location) {
return ControllerLogger.ROOT_LOGGER.parsingProblem(location.getLineNumber(), location.getColumnNumber(), msg);
}

0 comments on commit 1786c00

Please sign in to comment.
You can’t perform that action at this time.