MCPcopy Create free account
hub / github.com/baidu/openrasp / getIntegerParam

Method getIntegerParam

rasp-install/java/src/main/java/com/baidu/rasp/App.java:148–154  ·  view source on GitHub ↗
(CommandLine cmd, String param)

Source from the content-addressed store, hash-verified

146 }
147
148 private static int getIntegerParam(CommandLine cmd, String param) throws RaspError {
149 try {
150 return Integer.parseInt(cmd.getOptionValue(param));
151 } catch (NumberFormatException e) {
152 throw new RaspError(E10005 + "The -" + param + " parameter must have a integer value");
153 }
154 }
155
156 private static String checkRaspId(String raspId) {
157 if (raspId.length() < 16 || raspId.length() > 512) {

Callers 1

argsParserMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected