cvs commit: jakarta-bcel/examples listclass.java

[email protected]
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <[email protected]>
mdahm       2003/08/13 07:11:07

  Modified:    examples listclass.java
  Log:
  regard again .class files
  
  Revision  Changes    Path
  1.3       +5 -2      jakarta-bcel/examples/listclass.java
  
  Index: listclass.java
  ===================================================================
  RCS file: /home/cvs/jakarta-bcel/examples/listclass.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- listclass.java	23 May 2003 07:55:10 -0000	1.2
  +++ listclass.java	13 Aug 2003 14:11:07 -0000	1.3
  @@ -142,8 +142,11 @@
           if(name.startsWith((String) exclude_name.elementAt(idx)))
             return;
   
  -      if((java_class = Repository.lookupClass(name)) == null)
  +      if(name.endsWith(".class")) {
           java_class = new ClassParser(name).parse(); // May throw IOException
  +      } else {
  +	java_class = Repository.lookupClass(name);
  +      }
   
         if(nocontents)
           System.out.println(java_class.getClassName());
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.