taylor 2004/10/05 18:51:20 Modified: commons/src/java/org/apache/jetspeed/container JetspeedPortletConfig.java Log: the language code is a mess im not really sure how to address this easily, since its tied to the Pluto model The problem I had to deal with is caused by the language set creation is tied to the <portlet-info> If no portlet-info exists, then no languages are added to the language set This is wrong, as the spec states you can have either portlet-info OR resources bundles In the case where there was no portlet-info, yet there was a resource bundle, a NPE would occur trying to access a non-existent resource bundle This patch attempts to rectify the situation on the fly I think a better approach would be to create the language set based on the supported locales Revision Changes Path 1.6 +3 -2 jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/container/JetspeedPortletConfig.java Index: JetspeedPortletConfig.java =================================================================== RCS file: /home/cvs/jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/container/JetspeedPortletConfig.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- JetspeedPortletConfig.java 18 Aug 2004 01:13:27 -0000 1.5 +++ JetspeedPortletConfig.java 6 Oct 2004 01:51:20 -0000 1.6 @@ -65,6 +65,7 @@ public ResourceBundle getResourceBundle(Locale locale) { LanguageSet languageSet = portletDefinition.getLanguageSet(); + Language lang = languageSet.get(locale); if (lang == null) @@ -72,7 +73,7 @@ Locale defaultLocale = languageSet.getDefaultLocale(); lang = languageSet.get(defaultLocale); } - + return lang.getResourceBundle(); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]