openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Prud'hommeaux <mprud...@apache.org>
Subject Re: Possible bug in EntityManagerFactoryImpl
Date Wed, 08 Aug 2007 17:12:36 GMT
Patrick-

That certainly looks like a bug to me. My only guess is that we  
should be assigning the innermost delegate to "fetch", although it  
does look like someone very intentionally was storing it in another  
variable.

Did you happen to find this with findbugs, code inspection, or did it  
actually cause a visible problem?


On Aug 8, 2007, at 9:45 AM, Patrick Linskey wrote:

> Hi,
>
> EntityManagerFactoryImpl.toFetchPlan() begins like so:
>
>     FetchPlan toFetchPlan(Broker broker, FetchConfiguration fetch) {
>         if (fetch == null)
>             return null;
>
>         FetchConfiguration inner = fetch;
>         if (inner instanceof DelegatingFetchConfiguration)
>             inner = ((DelegatingFetchConfiguration) inner).
>                 getInnermostDelegate();
>
>
> However, we never use 'inner'. Does anyone have any insight into
> whether we should just remove the inner-related lines, or if we should
> remove the 'inner' variable and reassign 'fetch' instead?
>
> -Patrick
>
> -- 
> Patrick Linskey
> 202 669 5907


Mime
View raw message