You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by robert burrell donkin <ro...@blueyonder.co.uk> on 2005/05/22 21:57:28 UTC

Re: svn commit: r171301 - /jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java

On Sun, 2005-05-22 at 10:43 +0000, skitching@apache.org wrote:
> Author: skitching

<snip>

> @@ -368,24 +461,48 @@
>          String logClassName = getLogClassName();
>  
>          // Attempt to load the Log implementation class
> +        //
> +        // Question: why is the loginterface being loaded dynamically?
> +        // Isn't the code below exactly the same as this?
> +        //    Class logInterface = Log.class;
> +        

i suspect that the reason it was coded this way is there are some
security gymnastics performed and it's the LogFactory (rather than
LogFactoryImpl) class classloader that is used to load the class. 

i'm not convinced that this actually serves any useful purpose: in the
end the instance created will have to be cast to Log as referenced by
LogFactoryImpl. 

- robert


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org