You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "Ussama Baggili (JIRA)" <ji...@apache.org> on 2009/03/23 22:47:51 UTC
[jira] Created: (PLUTO-541) locale retrieval from
PortletRequestImpl throws NoSuchElement Exception
locale retrieval from PortletRequestImpl throws NoSuchElement Exception
-----------------------------------------------------------------------
Key: PLUTO-541
URL: https://issues.apache.org/jira/browse/PLUTO-541
Project: Pluto
Issue Type: Bug
Affects Versions: 2.0.0-M1, 2.0.0
Reporter: Ussama Baggili
Fix For: 2.0.0-M1, 2.0.0
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))
{
- locales.add((Locale)e.nextElement());
+ locales.add(locale);
}
}
return Collections.enumeration(locales);
@@ -518,7 +518,7 @@
Locale locale = (Locale)e.nextElement();
if (!locale.equals(preferredLocale))
{
- locales.add(e.nextElement().toString());
+ locales.add(locale.toString());
}
}
return Collections.enumeration(locales);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (PLUTO-541) locale retrieval from
PortletRequestImpl throws NoSuchElement Exception
Posted by "Ate Douma (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PLUTO-541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ate Douma reassigned PLUTO-541:
-------------------------------
Assignee: Ate Douma
> locale retrieval from PortletRequestImpl throws NoSuchElement Exception
> -----------------------------------------------------------------------
>
> Key: PLUTO-541
> URL: https://issues.apache.org/jira/browse/PLUTO-541
> Project: Pluto
> Issue Type: Bug
> Affects Versions: 2.0.0-M1, 2.0.0
> Reporter: Ussama Baggili
> Assignee: Ate Douma
> Fix For: 2.0.0-M1, 2.0.0
>
> Original Estimate: 0.08h
> Remaining Estimate: 0.08h
>
> 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))
> {
> - locales.add((Locale)e.nextElement());
> + locales.add(locale);
> }
> }
> return Collections.enumeration(locales);
> @@ -518,7 +518,7 @@
> Locale locale = (Locale)e.nextElement();
> if (!locale.equals(preferredLocale))
> {
> - locales.add(e.nextElement().toString());
> + locales.add(locale.toString());
> }
> }
> return Collections.enumeration(locales);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (PLUTO-541) locale retrieval from PortletRequestImpl
throws NoSuchElement Exception
Posted by "Ate Douma (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PLUTO-541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ate Douma closed PLUTO-541.
---------------------------
Resolution: Fixed
Fix Version/s: (was: 2.0.0-M1)
Fix applied
> locale retrieval from PortletRequestImpl throws NoSuchElement Exception
> -----------------------------------------------------------------------
>
> Key: PLUTO-541
> URL: https://issues.apache.org/jira/browse/PLUTO-541
> Project: Pluto
> Issue Type: Bug
> Affects Versions: 2.0.0-M1, 2.0.0
> Reporter: Ussama Baggili
> Assignee: Ate Douma
> Fix For: 2.0.0
>
> Original Estimate: 0.08h
> Remaining Estimate: 0.08h
>
> 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))
> {
> - locales.add((Locale)e.nextElement());
> + locales.add(locale);
> }
> }
> return Collections.enumeration(locales);
> @@ -518,7 +518,7 @@
> Locale locale = (Locale)e.nextElement();
> if (!locale.equals(preferredLocale))
> {
> - locales.add(e.nextElement().toString());
> + locales.add(locale.toString());
> }
> }
> return Collections.enumeration(locales);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (PLUTO-541) locale retrieval from
PortletRequestImpl throws NoSuchElement Exception
Posted by "Ate Douma (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PLUTO-541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688442#action_12688442 ]
Ate Douma commented on PLUTO-541:
---------------------------------
Thanks for the report and the fix Ussama.
I'll fix it ASAP.
> locale retrieval from PortletRequestImpl throws NoSuchElement Exception
> -----------------------------------------------------------------------
>
> Key: PLUTO-541
> URL: https://issues.apache.org/jira/browse/PLUTO-541
> Project: Pluto
> Issue Type: Bug
> Affects Versions: 2.0.0-M1, 2.0.0
> Reporter: Ussama Baggili
> Assignee: Ate Douma
> Fix For: 2.0.0-M1, 2.0.0
>
> Original Estimate: 0.08h
> Remaining Estimate: 0.08h
>
> 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))
> {
> - locales.add((Locale)e.nextElement());
> + locales.add(locale);
> }
> }
> return Collections.enumeration(locales);
> @@ -518,7 +518,7 @@
> Locale locale = (Locale)e.nextElement();
> if (!locale.equals(preferredLocale))
> {
> - locales.add(e.nextElement().toString());
> + locales.add(locale.toString());
> }
> }
> return Collections.enumeration(locales);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.