You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2010/02/18 22:25:27 UTC

[jira] Resolved: (FELIX-2105) Make Web Console compatible with OSGi/Minimum-1.1 EE

     [ https://issues.apache.org/jira/browse/FELIX-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved FELIX-2105.
--------------------------------------

    Resolution: Fixed

Re UUID: Actually, this has only been introduced in Java 5, so it is a good idea to replace it
Re Collections.list(Enumeration): Agreed, but will create method in internal Util for now
Re Locale.Locale(String): Agreed with using Locale.ENGLISH (default locale would be de_CH on my box, which is not exactly english ;-) )

Implemented changes in Rev. 911590.

> Make Web Console compatible with OSGi/Minimum-1.1 EE
> ----------------------------------------------------
>
>                 Key: FELIX-2105
>                 URL: https://issues.apache.org/jira/browse/FELIX-2105
>             Project: Felix
>          Issue Type: Bug
>          Components: Web Console
>    Affects Versions: webconsole-3.0.0
>            Reporter: Felix Meschberger
>             Fix For: webconsole-3.0.0
>
>
> Initially reported in FELIX-1957:
> The latest changes to the webconsole makes it again incompatible with the OSGi/Minimum EE:
> - UUID used in ConfigurationRender is missing in OSGi/Minimum-1.2
> - Collections.list(Enumeration) used in ComponentsServlet & ComponentConfigurationPrinter is not support by OSGi/Minimum-1.1. Although it is added in OSGi/Minimum-1.2, it's better for wider compatibility to replace this method with own. Simple implementation is given below:
> class WebConsoleUtil {
>  ....
>      /**
>      * This method is the same as Collections#list(Enumeration). The reason to duplicate it here,
>      * is that it is missing in OSGi/Minimum execution environment.
>      * 
>      * @param e the enumeration which to convert
>      * @return the list containing all enumeration entries.
>      */
>     public static final ArrayList list( Enumeration e )
>     {
>         ArrayList l = new ArrayList();
>         while ( e.hasMoreElements() )
>             l.add( e.nextElement() );
>         return l;
>     }
> }
> - Locale.Locale( String ) constructor is not available in OSGi/Minimum-1.1 (though available in OSGi/Minimum-1.2). However, for better compatibility we should use another approach.
> So instead of:
> DEFAULT_LOCALE = new Locale( "" )
> it can be
> DEFAULT_LOCALE = Locale.getDefault();
> or even better (since our default language translation is English):
> DEFAULT_LOCALE = Locale().ENGLISH

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.