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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.1
    • core, wtk, wtk-terra
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: