Uploaded image for project: 'Scout (Retired)'
  1. Scout (Retired)
  2. SCOUT-119

IndexOutOfBoundsException caused by a simple copy&paste bug in following code.

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.3
    • 1.2.3
    • Scout Implementation
    • None

    Description

      I met a IndexOutOfBoundsException when running jaxr tck with scout 1.2.3-SNAPSHOT.

      06-29-2011 20:15:59: SVR-ERROR: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      at java.util.ArrayList.RangeCheck(ArrayList.java:547)
      at java.util.ArrayList.get(ArrayList.java:322)
      at org.apache.ws.scout.util.ScoutUddiV3JaxrHelper.getService(ScoutUddiV3JaxrHelper.java:383)
      at org.apache.ws.scout.util.ScoutUddiV3JaxrHelper.getOrganization(ScoutUddiV3JaxrHelper.java:224)
      at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.createOrganization(BusinessLifeCycleManagerV3Impl.java:954)
      at org.apache.ws.scout.registry.BusinessQueryManagerV3Impl.getRegistryObjects(BusinessQueryManagerV3Impl.java:855)

      I think there's a simple copy&paste bug in following code.

      org.apache.ws.scout.util.ScoutUddiV3JaxrHelper.getService(BusinessService, LifeCycleManager)

      {
      .....
      List<Description> descriptionList = businessService.getDescription();
      InternationalString dis = null;
      for (int i = 0; i < namesList.size(); i++) {
      Description desc = descriptionList.get;
      if (dis == null)

      { dis = lifeCycleManager.createInternationalString(getLocale(desc.getLang()), desc.getValue()); }

      else

      { dis.setValue(getLocale(desc.getLang()), desc.getValue()); }

      }

      .....

      }

      Attachments

        1. simple_bug.patch
          0.7 kB
          Lin Quan Jiang

        Activity

          People

            kstam Kurt Stam
            genspring Lin Quan Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment