Uploaded image for project: 'Service Orchestrator'
  1. Service Orchestrator
  2. SO-1156

ArrayIndexOutOfBoundsException in CreateVcpeResCustService.groovy

XMLWordPrintable

      In CreateVcpeResCustService.groovy file in method: preProcessRequest, there is a peace of code like this:

      String vimId = jsonUtil.getJsonValue(createVcpeServiceRequest,
      "requestDetails.cloudConfiguration.lcpCloudRegionId")
      def cloudRegion = vimId.split("_")
      def cloudOwner = cloudRegion[0].toString()
      def cloudRegionId = cloudRegion[1].toString()

      If lcpCloudRegionId value is without "_", we get ArrayIndexOutOfBoundsException. It should be handled in a more appropriate way, for example checking if the value has ""_ mark, and if not, the proper message should be log that the value of lcpCloudRegionId is wrong.

      For now, I get a message that do not tell me much:

      Java Error: Catch a Java Lang Exception in CreateVcpeResCustService

            kkuzmick kkuzmick
            lukaszm lukaszm
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: