Method
getIntegerParam
(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) { |
Tested by
no test coverage detected