Uploaded image for project: 'HiveMind'
  1. HiveMind
  2. HIVEMIND-105

ServiceImplementationFactoryParameters.getFirstParameter should cope better with zero parameters

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1
    • 1.1
    • framework
    • None

    Description

      ServiceImplementationFactoryParameters.getFirstParameter() bails with an IndexOutOfBoundsException if there aren't any paremeters to start with. I think it should:

      1) Return null, or
      2) Throw an ApplicationRuntimeException explaining the situation

      Attached goes a patch that implements (1), since I find it to be easier to check for a null first parameter than catch an exception, and it's more streamlined that checking for an empty parameter list.

      Attachments

        1. get-first-parameter.patch
          2 kB
          Marcus Brito

        Activity

          People

            jwcarman James Carman
            pazu Marcus Brito
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: