Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0-M1, 2.0.0
-
None
-
None
Description
when a portlet is trying to retrieve the locales and compare them with prefferedLocale and/or add them, the Enumeration that is used to retrieve the elements checks for "hasNextElement" but then retrieves "nextElement" twice.
I'm attaching a patch for th simple fix:
Index: pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java
===================================================================
— pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java (revision 757432)
+++ pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java (working copy)
@@ -349,7 +349,7 @@
Locale locale = (Locale)e.nextElement();
if (!locale.equals(preferredLocale))
}
return Collections.enumeration(locales);
@@ -518,7 +518,7 @@
Locale locale = (Locale)e.nextElement();
if (!locale.equals(preferredLocale))
}
return Collections.enumeration(locales);