commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1702424 - in /commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6: classfile/Attribute.java classfile/AttributeReader.java util/ClassLoader.java util/ClassVector.java
Date Fri, 11 Sep 2015 10:53:35 GMT
Author: sebb
Date: Fri Sep 11 10:53:35 2015
New Revision: 1702424

URL: http://svn.apache.org/r1702424
Log:
Gradually working towards restoring binary compatibility
Restore deprecated classes for now

Added:
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/AttributeReader.java
      - copied unchanged from r1695477, commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/AttributeReader.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassLoader.java
      - copied, changed from r1695787, commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassLoader.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassVector.java
      - copied, changed from r1695421, commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassVector.java
Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Attribute.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Attribute.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Attribute.java?rev=1702424&r1=1702423&r2=1702424&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Attribute.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/Attribute.java
Fri Sep 11 10:53:35 2015
@@ -114,6 +114,21 @@ public abstract class Attribute implemen
      * 
      * @param name the name of the attribute as stored in the class file
      * @param r    the reader object
+     * @deprecated Use {@link #addAttributeReader(String, UnknownAttributeReader)} instead
+     */
+    @java.lang.Deprecated
+    public static void addAttributeReader(String name, AttributeReader r)
+    {
+        readers.put(name, r);
+    }
+
+    /**
+     * Add an Attribute reader capable of parsing (user-defined) attributes
+     * named "name". You should not add readers for the standard attributes such
+     * as "LineNumberTable", because those are handled internally.
+     * 
+     * @param name the name of the attribute as stored in the class file
+     * @param r    the reader object
      */
     public static void addAttributeReader(String name, UnknownAttributeReader r)
     {

Copied: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassLoader.java
(from r1695787, commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassLoader.java)
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassLoader.java?p2=commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassLoader.java&p1=commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassLoader.java&r1=1695787&r2=1702424&rev=1702424&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassLoader.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassLoader.java
Fri Sep 11 10:53:35 2015
@@ -51,16 +51,19 @@ import org.apache.commons.bcel6.classfil
  * @version $Id$
  * @see JavaWrapper
  * @see ClassPath
+ * @deprecated 6.0 Do not use - does not work
  */
-public class ClassLoader extends java.lang.ClassLoader { // TODO rename this class to reduce
confusion with parent
+@Deprecated
+public class ClassLoader extends java.lang.ClassLoader {
 
     private static final String BCEL_TOKEN = "$$BCEL$$";
 
-    private static final String[] DEFAULT_IGNORED_PACKAGES = {
+    public static final String[] DEFAULT_IGNORED_PACKAGES = {
             "java.", "javax.", "sun."
     };
 
-    private final Hashtable<String, Class<?>> classes = new Hashtable<String,
Class<?>>(); // Hashtable is synchronized thus thread-safe
+    private final Hashtable<String, Class<?>> classes = new Hashtable<String,
Class<?>>();
+    // Hashtable is synchronized thus thread-safe
     private final String[] ignored_packages;
     private Repository repository = SyntheticRepository.getInstance();
 

Copied: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassVector.java
(from r1695421, commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassVector.java)
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassVector.java?p2=commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassVector.java&p1=commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassVector.java&r1=1695421&r2=1702424&rev=1702424&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassVector.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/ClassVector.java
Fri Sep 11 10:53:35 2015
@@ -34,6 +34,7 @@ import org.apache.commons.bcel6.classfil
 public class ClassVector implements java.io.Serializable {
 
     private static final long serialVersionUID = 5600397075672780806L;
+    @Deprecated
     protected List<JavaClass> vec = new ArrayList<JavaClass>();
 
 



Mime
View raw message