[jboss-dev-forums] [Design of POJO Server] - Re: Caching of classes in BaseClassLoaderDomain

alesj do-not-reply at jboss.com
Tue May 5 03:12:31 EDT 2009


I moved the failIfBlackListed flag chek into the checkClassBlackList method,
as I think it should be its responsibility to determine what to do with it.
(e.g. some other domain impl might handle this diff ... although not very likely :-))


  | +   void checkClassBlackList(BaseClassLoader classLoader, String name, String path, boolean allExports, boolean failIfBlackListed) throws ClassNotFoundException
  |     {
  |        if (allExports)
  |        {
  | -         if (globalClassBlackList.containsKey(path))
  | +         if (failIfBlackListed && globalClassBlackList.containsKey(path))
  |           {
  |              if (log.isTraceEnabled())
  |                 log.trace("Found " + name + " in global blacklist");
  | @@ -1491,7 +1494,7 @@
  |      *                          result in ClassNotFoundException; <code>false</code>
  |      *                          if a <code>null</code> return value is acceptable
  |      * @return the class when found in the cache
  | -    * @throws ClassNotFoundException when the class is blacklisted and 
  | +    * @throws ClassNotFoundException when the class is blacklisted and
  |      *                               <code>failIfBlackListed</code> is <code>true</code>
  |      */
  |     protected Class<?> checkClassCacheAndBlackList(BaseClassLoader classLoader, String name, String path, boolean allExports, boolean failIfBlackListed) throws ClassNotFoundException
  | @@ -1502,11 +1505,9 @@
  |        Class<?> result = checkClassCache(classLoader, name, path, allExports);
  |        if (result != null)
  |           return result;
  | -      
  | -      if (failIfBlackListed)
  | -      {
  | -         checkClassBlackList(classLoader, name, path, allExports);
  | -      }
  | +
  | +      checkClassBlackList(classLoader, name, path, allExports, failIfBlackListed);
  | +

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228498#4228498

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228498



More information about the jboss-dev-forums mailing list