On Sat, 27 Nov 2004 12:26:06 -0800
Kaffe CVS <[EMAIL PROTECTED]> wrote:

> PatchSet 5496 
> Date: 2004/11/27 20:21:42
> Author: robilad
> Branch: HEAD
> Tag: (none) 
> Log:
> Resynced with GNU Classpath: ResourceBundle updated and remerged with 
> Classpath
> 
> 2004-11-27  Dalibor Topic  <[EMAIL PROTECTED]>
> 
>         * libraries/javalib/java/util/ResourceBundle.java:
>         Resynced with GNU Classpath. Reverted Helmer's changes from
>         2004-07-11 as they break mauve tests for
>         java.util.logging.Logger.

Looks like these  tests fail because java.util.logging.Logger doesn't
load the ResourceBundle using the context class loader of the current
thread (as the jdk does, as evidenced by the attached test).

Regards,
Helmer
import java.net.URL;
import java.io.InputStream;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.logging.Logger;

public class BundleLoader extends ClassLoader
{
   /*
    * assume ResourceBundle calls getResourceAsStream.
    */
   public InputStream getResourceAsStream (String name) 
   {
      if (name.equals ("TestBundle.properties"))
      {
         return new ByteArrayInputStream (new byte[0]);
      }

      return null;
   }

   public static void main (String[] args)
   {
      Thread.currentThread().setContextClassLoader (new BundleLoader ());

      try
      {
         System.out.println (Logger.getLogger ("test", "TestBundle"));
      }
      catch (Exception _) { _.printStackTrace (); }

   }
}
_______________________________________________
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to