[cp-patches] Patch: Appletviewer fix

Thomas Fitzsimmons fitzsim at redhat.com
Thu Jun 1 17:26:33 UTC 2006


Lillian Angel wrote:
> This fixes the classloading problem with a lot of applets.
> 
> 2006-06-01  Lillian Angel  <langel at redhat.com>
> 
>         * tools/gnu/classpath/tools/appletviewer/AppletTag.java
>         (prependCodebase): Fixed check. No dirname was ever considered 
> 	to be a file, so every applet fell into the if-statement 
> 	causing a lot of classloading problems with the applets.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: tools/gnu/classpath/tools/appletviewer/AppletTag.java
> ===================================================================
> RCS file: /cvsroot/classpath/classpath/tools/gnu/classpath/tools/appletviewer/AppletTag.java,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -u -r1.2 -r1.3
> --- tools/gnu/classpath/tools/appletviewer/AppletTag.java	24 May 2006 20:14:22 -0000	1.2
> +++ tools/gnu/classpath/tools/appletviewer/AppletTag.java	1 Jun 2006 16:40:11 -0000	1.3
> @@ -451,7 +451,7 @@
>          else
>            {
>              String dirname = documentbase.getFile();
> -            if (!new File(dirname).isFile())
> +            if (dirname.indexOf(".") < 0)
>                fullcodebase = new URL(documentbase + File.separator);

This is fine for now, but I'm thinking we may be working around a general 
problem with our URL class.  Shouldn't http://gnu.org/software/classpath and 
http://gnu.org/software/classpath/ resolve to the same location when passed to 
the URL constructor?

Tom




More information about the Classpath-patches mailing list