Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-2526

org.jboss.seam.core.SeamResourceBundle::getKeys()

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Trivial
    • Resolution: Done
    • Affects Version/s: 2.0.1.CR1
    • Fix Version/s: 2.0.1.GA, 2.1.0.A1
    • Component/s: Core
    • Labels:
      None

      Description

      Please, take a look at this code:
      org.jboss.seam.core.SeamResourceBundle

      public Enumeration<String> getKeys()
      {
      List<java.util.ResourceBundle> pageBundles = getPageResourceBundles();
      List<ResourceBundle> bundles = getBundlesForCurrentLocale();
      Enumeration<String>[] enumerations = new Enumeration[bundles.size() + pageBundles.size()];
      int i = 0;
      for (; i < pageBundles.size(); i++)

      { enumerations[i++] = pageBundles.get(i).getKeys(); }

      for (; i < bundles.size(); i++)

      { enumerations[i] = bundles.get(i).getKeys(); }

      [...]
      }

      Loops doesn't look ok for me. I think, it shoud be:

      int j = 0;
      int i;
      for (i = 0; i < pageBundles.size(); i+, j+)

      { enumerations[ j ] = pageBundles.get(i).getKeys(); }

      for (i = 0; i < bundles.size(); i+, j+)

      { enumerations[ j ] = bundles.get(i).getKeys(); }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                norman.richards Norman Richards
                Reporter:
                antoni.jakubiak Antoni Jakubiak
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: