RFR: 8132256: jaxp: Investigate removal of com/sun/org/apache/bcel/internal/util/ClassPath.java

Daniel Fuchs daniel.fuchs at oracle.com
Fri Jul 24 08:46:11 UTC 2015


Hi,

Please find below a patch that fixes

8132256: jaxp: Investigate removal of
                com/sun/org/apache/bcel/internal/util/ClassPath.java
https://bugs.openjdk.java.net/browse/JDK-8132256

webrev:
http://cr.openjdk.java.net/~dfuchs/webrev_8132256/webrev.00


The class com.sun.org.appache.bcel.internal.util.ClassPath does
not seem to serve any useful purpose in JDK 9.

  - There's only one instance created, using its default empty
    constructor.
  - There's only one method called on that instance, from
    SyntheticRepository.java: _path.getInputStream(className);
  - Because _path was created using the default (and deprecated)
    empty constructor, and because ClassPath is loaded from the BCL
    (ClassPath.class.getClassLoader() == null), then
    _path.getInputStream(className) will always throw an IOException.

Therefore - it seems that in the JDK - the use of 
com.sun.org.appache.bcel.internal.util.ClassPath is reduced
to an elaborate means of throwing an IOException.

The patch above arranges for the removal of
com/sun/org/apache/bcel/internal/util/ClassPath.java

best regards,

-- daniel



More information about the core-libs-dev mailing list