Re: svn commit: r979269 - in /openwebbeans/trunk: webbeans-el10/src/main/java/org/apache/webbeans/el10/ webbeans-impl/src/main/java/org/apache/webbeans/el/

2010-07-27 Thread Gerhard Petracek
right - thx!
yes - the names are too similar. anyway, this oversight indicates that there
are no test-cases for the el-resolver in combination with dependent objects.
imo we should create a jira-task for creating such test-cases.

regards,
gerhard

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2010/7/27 Mark Struberg 

> yes, you are right. Thanks for catching this, I'll fix it asap.
>
> LieGrue,
> strub
>
>
>
> - Original Message 
> > From: Eric Covener 
> > To: dev@openwebbeans.apache.org
> > Sent: Tue, July 27, 2010 9:38:19 PM
> > Subject: Re: svn commit: r979269 - in /openwebbeans/trunk:
> >webbeans-el10/src/main/java/org/apache/webbeans/el10/
> >webbeans-impl/src/main/java/org/apache/webbeans/el/
> >
> > On Mon, Jul 26, 2010 at 9:10 AM,   wrote:
> > >  Author: struberg
> > > Date: Mon Jul 26 13:10:33 2010
> > > New Revision:  979269
> > >
> > > URL:  http://svn.apache.org/viewvc?rev=979269&view=rev
> > > Log:
> > > OWB-425  OWB EL performance improvement
> > >
> > > txs 2 gpetracek for the  patch!
> > >
> >
> > > +public Object findBeanByName(String  name)
> > > +{
> > > +Object cachedBean =  normalScopedObjects.get(name);
> > > +
> > > +if(cachedBean !=  null)
> > > +{
> > > +return cachedBean;
> > > + }
> > > +
> > > +Bean dependentBean =
>  beanNameToDependentBeanMapping.get(name);
> > > +
> > > + if(dependentBean == null)
> > > +{
> > > +return  null;
> > > +}
> > > +return  dependentObjects.get(dependentBean);
> > > +}
> > > +
> >
> > Rohit and I  were looking at this offline, and it seems like this
> > should have a  .getObject() on this final line -- otherwise the Object
> > returned here is a  CreationalStore.
> >
> > >> private Map,  CreationalStore> dependentObjects = new
> > HashMap,  CreationalStore>();
> >
> > The similar names and dissimilar values of the  dependent and normal
> > scoped hash maps is probably confusing here.
> >
>
>
>
>


Re: svn commit: r979269 - in /openwebbeans/trunk: webbeans-el10/src/main/java/org/apache/webbeans/el10/ webbeans-impl/src/main/java/org/apache/webbeans/el/

2010-07-27 Thread Mark Struberg
yes, you are right. Thanks for catching this, I'll fix it asap.

LieGrue,
strub



- Original Message 
> From: Eric Covener 
> To: dev@openwebbeans.apache.org
> Sent: Tue, July 27, 2010 9:38:19 PM
> Subject: Re: svn commit: r979269 - in /openwebbeans/trunk:  
>webbeans-el10/src/main/java/org/apache/webbeans/el10/ 
>webbeans-impl/src/main/java/org/apache/webbeans/el/
> 
> On Mon, Jul 26, 2010 at 9:10 AM,   wrote:
> >  Author: struberg
> > Date: Mon Jul 26 13:10:33 2010
> > New Revision:  979269
> >
> > URL:  http://svn.apache.org/viewvc?rev=979269&view=rev
> > Log:
> > OWB-425  OWB EL performance improvement
> >
> > txs 2 gpetracek for the  patch!
> >
> 
> > +public Object findBeanByName(String  name)
> > +{
> > +Object cachedBean =  normalScopedObjects.get(name);
> > +
> > +if(cachedBean !=  null)
> > +{
> > +return cachedBean;
> > + }
> > +
> > +Bean dependentBean =  beanNameToDependentBeanMapping.get(name);
> > +
> > + if(dependentBean == null)
> > +{
> > +return  null;
> > +}
> > +return  dependentObjects.get(dependentBean);
> > +}
> > +
> 
> Rohit and I  were looking at this offline, and it seems like this
> should have a  .getObject() on this final line -- otherwise the Object
> returned here is a  CreationalStore.
> 
> >> private Map,  CreationalStore> dependentObjects = new
> HashMap,  CreationalStore>();
> 
> The similar names and dissimilar values of the  dependent and normal
> scoped hash maps is probably confusing here.
> 


  


Re: svn commit: r979269 - in /openwebbeans/trunk: webbeans-el10/src/main/java/org/apache/webbeans/el10/ webbeans-impl/src/main/java/org/apache/webbeans/el/

2010-07-27 Thread Eric Covener
On Mon, Jul 26, 2010 at 9:10 AM,   wrote:
> Author: struberg
> Date: Mon Jul 26 13:10:33 2010
> New Revision: 979269
>
> URL: http://svn.apache.org/viewvc?rev=979269&view=rev
> Log:
> OWB-425 OWB EL performance improvement
>
> txs 2 gpetracek for the patch!
>

> +    public Object findBeanByName(String name)
> +    {
> +        Object cachedBean = normalScopedObjects.get(name);
> +
> +        if(cachedBean != null)
> +        {
> +            return cachedBean;
> +        }
> +
> +        Bean dependentBean = beanNameToDependentBeanMapping.get(name);
> +
> +        if(dependentBean == null)
> +        {
> +            return null;
> +        }
> +        return dependentObjects.get(dependentBean);
> +    }
> +

Rohit and I were looking at this offline, and it seems like this
should have a .getObject() on this final line -- otherwise the Object
returned here is a CreationalStore.

>> private Map, CreationalStore> dependentObjects = new
HashMap, CreationalStore>();

The similar names and dissimilar values of the dependent and normal
scoped hash maps is probably confusing here.