mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-21 16:49:43 +01:00
checkstyle suggestions
This commit is contained in:
@@ -61,7 +61,9 @@ public final class XmlUtils {
|
|||||||
/**
|
/**
|
||||||
* Constructs a validating secure SAX Parser.
|
* Constructs a validating secure SAX Parser.
|
||||||
*
|
*
|
||||||
* @param schemaStream One or more inputStreams with the schema(s) that the parser should be able to validate the XML against, one InputStream per schema
|
* @param schemaStream One or more inputStreams with the schema(s) that the
|
||||||
|
* parser should be able to validate the XML against, one InputStream per
|
||||||
|
* schema
|
||||||
* @return a SAX Parser
|
* @return a SAX Parser
|
||||||
* @throws ParserConfigurationException is thrown if there is a parser
|
* @throws ParserConfigurationException is thrown if there is a parser
|
||||||
* configuration exception
|
* configuration exception
|
||||||
@@ -88,31 +90,31 @@ public final class XmlUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts an attribute value representing an xsd:boolean value to a boolean using
|
* Converts an attribute value representing an xsd:boolean value to a
|
||||||
* the rules as stated in the XML specification
|
* boolean using the rules as stated in the XML specification.
|
||||||
*
|
*
|
||||||
* @param lexicalXSDBoolean The string-value of the boolean
|
* @param lexicalXSDBoolean The string-value of the boolean
|
||||||
* @return the boolean value represented by {@code lexicalXSDBoolean}
|
* @return the boolean value represented by {@code lexicalXSDBoolean}
|
||||||
* @throws IllegalArgumentException When {@code lexicalXSDBoolean} does
|
* @throws IllegalArgumentException When {@code lexicalXSDBoolean} does fit
|
||||||
* fit the lexical space of the XSD boolean datatype
|
* the lexical space of the XSD boolean datatype
|
||||||
*/
|
*/
|
||||||
public static boolean parseBoolean(String lexicalXSDBoolean) {
|
public static boolean parseBoolean(String lexicalXSDBoolean) {
|
||||||
final boolean result;
|
final boolean result;
|
||||||
switch (lexicalXSDBoolean) {
|
switch (lexicalXSDBoolean) {
|
||||||
case "true":
|
case "true":
|
||||||
case "1":
|
case "1":
|
||||||
result = true;
|
result = true;
|
||||||
break;
|
break;
|
||||||
case "false":
|
case "false":
|
||||||
case "0":
|
case "0":
|
||||||
result = false;
|
result = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("'"+lexicalXSDBoolean+"' is not a valid xs:boolean value");
|
throw new IllegalArgumentException("'" + lexicalXSDBoolean + "' is not a valid xs:boolean value");
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a secure SAX Parser.
|
* Constructs a secure SAX Parser.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user