RFR: 1878: Improve argument check in SKARA CLI

Zhao Song zsong at openjdk.org
Thu Apr 13 23:43:05 UTC 2023


Currently, if a user misuses a command, in some cases, SKARA CLI crashes and throws a stack trace, which is bad and does not provide useful information to the user. 

After investigating, I found that in many places, we don't check whether an option is followed by an argument, and it would trigger some issues.

In this patch, the program would always check the presence of an argument  before attempting to retrieve it for an option.

-------------

Commit messages:
 - SKARA-1878

Changes: https://git.openjdk.org/skara/pull/1502/files
 Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1502&range=00
  Issue: https://bugs.openjdk.org/browse/SKARA-1878
  Stats: 142 lines in 14 files changed: 44 ins; 49 del; 49 mod
  Patch: https://git.openjdk.org/skara/pull/1502.diff
  Fetch: git fetch https://git.openjdk.org/skara.git pull/1502/head:pull/1502

PR: https://git.openjdk.org/skara/pull/1502


More information about the skara-dev mailing list