myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonardo Uribe <lu4...@gmail.com>
Subject Re: Possible problem in FacesConfig ordering
Date Fri, 03 Dec 2010 22:57:47 GMT
Hi

It is possible there is no faces-config.xml with the name configured in the
webAppConfig.

In theory, we can safely ignore it and a simple check for null can do the
job.

I committed the fix on MYFACES-2994.

regards,

Leonardo Uribe

2010/12/3 David Jencks <david_jencks@yahoo.com>

> I'm finding a tck problem around FacesConfig ordering.  I haven't figured
> out if this is caused by the geronimo integration or myfaces itself but I
> think there's something odd in the myfaces code.
>
> DefaultFacesConfigurationProvider line 461 has
>
>                    getDispenser().feed(getFacesConfig(appConfigResources,
> nameSlot.getName()));
>
>
> getFacesConfig can return null if it doesn't find a FacesConfig with the
> supplied name:
>
>    private FacesConfig getFacesConfig(List<FacesConfig> appConfigResources,
> String name)
>    {
>        for (FacesConfig cfg: appConfigResources)
>        {
>            if (cfg.getName() != null && name.equals(cfg.getName()))
>            {
>                return cfg;
>            }
>        }
>        return null;
>    }
>
>
> but the feed method starts off:
>
>    public void feed(FacesConfig config)
>    {
>        for (Factory factory : config.getFactories())
>
>
> assuming a non-null argument.
>
> Whatever the cause of the null I'm seeing returned from getFacesConfig this
> doesn't seem right.
>
> thanks
> david jencks
>
>
>
>

Mime
View raw message