BCEL Bug.

[email protected]
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <[email protected]>
As i am not used to using diff and its just a oneline bug i will just
copy paste the code.


org.apache.util.Classpath

line 192 - 207

  /**
   * @param name fully qualified class name, e.g. java.lang.String
   * @return input stream for class
   */
  public InputStream getInputStream(String name) throws IOException {
    return getInputStream(name, ".class");
  }

  /**
   * Return stream for class or resource on CLASSPATH.
   *
   * @param name fully qualified file name, e.g. java/lang/String
   * @param suffix file name ends with suff, e.g. .java
   * @return input stream for file on class path
   */
  public InputStream getInputStream(String name, String suffix)


The problem is that getInputStream(String name) claims to accept
"java.lang.String" class name and then it uses the
getInputStream(String name, String suffix) method that wants "java/lang/String".

So the fix would be

return getInputStream(name.replace('.','/'), ".class");

on line 197.

BR Bjorn Blowqvist
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.