hello Tom,

On Monday 12 June 2006 03:17, Tom Tromey wrote:
> >>>>> "Raif" == Raif S Naffah <[EMAIL PROTECTED]> writes:
>
> Raif>          String t = tokens[i];
> Raif> -        if
> (Character.isJavaIdentifierStart(cn.toCharArray()[0])) Raif> -       
>   abort("");
> Raif> +        if (!
> Character.isJavaIdentifierStart(t.toCharArray()[0])) Raif> +         
> abort("Class name [" + cn
> Raif> +                + "] contains an invalid sub-package
> identifier: " + t); This code looks pretty weird.
> I think Character.isJavaIdentifierStart(t.charAt(0)) would be much
> more efficient.

indeed.  the attached patch does that.


cheers;
rsn
Index: ConfigFileParser.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/javax/security/auth/login/ConfigFileParser.java,v
retrieving revision 1.4
diff -u -r1.4 ConfigFileParser.java
--- ConfigFileParser.java	11 Jun 2006 12:14:43 -0000	1.4
+++ ConfigFileParser.java	12 Jun 2006 03:54:50 -0000
@@ -267,7 +267,7 @@
     for (int i = 0; i < tokens.length; i++)
       {
         String t = tokens[i];
-        if (! Character.isJavaIdentifierStart(t.toCharArray()[0]))
+        if (! Character.isJavaIdentifierStart(t.charAt(0)))
           abort("Class name [" + cn
                 + "] contains an invalid sub-package identifier: " + t);
 

Reply via email to