Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-1012

Many places throw IllegalArgumentException during parameter validation, but some are inconsistent

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Component/s: core, wtk, wtk-terra
    • Labels:
      None
    • Environment:
      All

      Description

      Primarily the code looks like this currently:

      if (param == null)
      throw new IllegalArgumentException(param + " is null");
      

      But not all places have the message in the exception, and not all places check the parameters as they should, and not all places have the same message.

      So, regularize this checking everywhere by making common "core" methods to do this null check (or other checks, such as <= 0, etc.) so that the checking and messaging are common. This also simplifies the code, and with JIT compiling shouldn't affect runtime speed either, as this common method should get compiled and/or inlined as appropriate.

        Attachments

          Activity

            People

            • Assignee:
              rwhitcomb Roger Lee Whitcomb
              Reporter:
              rwhitcomb Roger Lee Whitcomb
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: