+1

Tom Tromey wrote:
> 
> Geoff et al --
> 
> Andrew says the appended patch is required, and I think he's right.
> 
> The issue is that the JCL says that Class.forName() takes the
> fully-qualified class name, whereas the existing code is trying to
> strip the punctuation.  This is pretty clearly shown in the examples
> in the book -- you should strip the punctuation for something like
> "Ljava/lang/String;" but not for "[java/lang/String;".
> 
> Ordinarily I would just check this in, but this is (will be) my first
> ever Classpath commit and I wanted to make sure I'm not breaking some
> rule by committing it.
> 
> So, is this ok to commit?  Are there any real processes in place for
> Classpath commits, or should I just do what I think is right?
> 
> 2000-04-17  Andrew Haley  <[EMAIL PROTECTED]>
> 
>         * TypeSignature.java (getClassForEncoding): Don't remove
>         punctuation from the classname of an array element.
> 
> Tom
> 
> Index: TypeSignature.java
> ===================================================================
> RCS file: /cvs/classpath/gnu/java/lang/reflect/TypeSignature.java,v
> retrieving revision 1.6
> diff -u -r1.6 TypeSignature.java
> --- TypeSignature.java  2000/03/17 00:50:30     1.6
> +++ TypeSignature.java  2000/04/17 22:44:05
> @@ -1,5 +1,5 @@
>  /* TypeSignature.java -- Class used to compute type signatures
> -   Copyright (C) 1998 Free Software Foundation, Inc.
> +   Copyright (C) 1998, 2000 Free Software Foundation, Inc.
> 
>  This file is part of GNU Classpath.
> 
> @@ -151,8 +151,7 @@
>        String component = type_code.substring( last_bracket + 1 );
> 
>        if( component.charAt( 0 ) == 'L' )
> -       component =
> -         component.substring( 1, component.length() - 1 ).replace('/', '.');
> +       component = component.replace( '/', '.' );
> 
>        return Class.forName( brackets + component );
>      }

-- 

Daniel Rall ([EMAIL PROTECTED])

Reply via email to