Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1707

The BlueprintMetadata.getBlueprintContainer throws inconsistent exceptions

    XMLWordPrintableJSON

Details

    Description

      The BlueprintMetadata_getBlueprintContainer method throws IllegalArgumentException as follow:

      BlueprintMetadata.java
       if (serviceReferences == null || serviceReferences.length <1) {
                  throw new IllegalArgumentException("Invalid BlueprintContainer service id: " + containerServiceId);
              }
      

      However, the FrameworkUtils_resolveService method throws IOException for the same condition:

      FrameworkUtils.java
      if (references == null || references.length < 1) {
                      throw new IOException("Service with id [" + serviceId + "] not found");
                  } else {
                      result = references[0];
                  }
      

      This is confusing. Indeed, I notice that the buggy code of ARIES-333 throws IllegalArgumentException, but the fixed code throws IOException.
      The current BlueprintMetadata.java shall be modified to eliminate the confusing.

      Attachments

        1. aries.patch
          5 kB
          Hao Zhong

        Activity

          People

            gnodet Guillaume Nodet
            haozhong Hao Zhong
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: