| 241 | } |
| 242 | |
| 243 | public static CharSequenceObjHashMap<String> processArgs(String... args) { |
| 244 | final int n = args.length; |
| 245 | if (n == 0) { |
| 246 | throw new BootstrapException("Arguments expected, non provided"); |
| 247 | } |
| 248 | CharSequenceObjHashMap<String> optHash = new CharSequenceObjHashMap<>(); |
| 249 | for (int i = 0; i < n; i++) { |
| 250 | String arg = args[i]; |
| 251 | if (arg.length() > 1 && arg.charAt(0) == '-') { |
| 252 | if (i + 1 < n) { |
| 253 | String nextArg = args[i + 1]; |
| 254 | if (nextArg.length() > 1 && nextArg.charAt(0) == '-') { |
| 255 | optHash.put(arg, ""); |
| 256 | } else { |
| 257 | optHash.put(arg, nextArg); |
| 258 | i++; |
| 259 | } |
| 260 | } else { |
| 261 | optHash.put(arg, ""); |
| 262 | } |
| 263 | } else { |
| 264 | optHash.put("$" + i, arg); |
| 265 | } |
| 266 | } |
| 267 | return optHash; |
| 268 | } |
| 269 | |
| 270 | public static void reportCrashFiles(CairoConfiguration cairoConfiguration, Log log) { |
| 271 | final CharSequence dbRoot = cairoConfiguration.getDbRoot(); |