cvs commit: jakarta-bcel/src/java/org/apache/bcel/verifier/statics Pass2Verifier.java

[email protected]
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <[email protected]>
enver       2004/01/13 04:59:53

  Modified:    src/java/org/apache/bcel/verifier/statics Pass2Verifier.java
  Log:
  Apply patch by [email protected] that prevents an Exception when
  testing if an empty name is a valid Java identifier.
  
  Revision  Changes    Path
  1.5       +3 -1      jakarta-bcel/src/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
  
  Index: Pass2Verifier.java
  ===================================================================
  RCS file: /home/cvs/jakarta-bcel/src/java/org/apache/bcel/verifier/statics/Pass2Verifier.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Pass2Verifier.java	18 Dec 2003 17:22:58 -0000	1.4
  +++ Pass2Verifier.java	13 Jan 2004 12:59:53 -0000	1.5
  @@ -1298,6 +1298,8 @@
   	 * represents a valid Java identifier (so-called simple name).
   	 */
   	private static boolean validJavaIdentifier(String name){
  +    if  (name.length() == 0) return false; // must not be empty, reported by <[email protected]>, thanks!
  +
   		// vmspec2 2.7, vmspec2 2.2
   		if (!Character.isJavaIdentifierStart(name.charAt(0))) return false;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.