use of org.apache.maven.plugins.assembly.format.AssemblyFormattingException in project maven-plugins by apache.
the class TypeConversionUtils method modeToInt.
public static int modeToInt(final String mode, final Logger logger) throws AssemblyFormattingException {
if (mode == null || mode.trim().length() < 1) {
return -1;
}
try {
final int value = Integer.parseInt(mode, 8);
// discard sanity assessment here; we're pushing ahead.
verifyModeSanity(value, logger);
return value;
} catch (final NumberFormatException e) {
throw new AssemblyFormattingException("Failed to parse mode as an octal number: \'" + mode + "\'.", e);
}
}
Aggregations