diff options
author | aclement <aclement> | 2006-03-04 10:43:11 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-03-04 10:43:11 +0000 |
commit | 1954377011ba95d032e7076ea37623a4c22020ac (patch) | |
tree | 764039c34803724a5b4231208ce8d7637c25e197 /bcel-builder | |
parent | 4a48f8cdb876becb88b43d26d4f586fbd3f61e7b (diff) | |
download | aspectj-1954377011ba95d032e7076ea37623a4c22020ac.tar.gz aspectj-1954377011ba95d032e7076ea37623a4c22020ac.zip |
optimization: removes static state from Bcel that was accumulating for all 'unknown' (i.e. aspectj!!) attributes
Diffstat (limited to 'bcel-builder')
-rw-r--r-- | bcel-builder/src/org/aspectj/apache/bcel/classfile/Unknown.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/classfile/Unknown.java b/bcel-builder/src/org/aspectj/apache/bcel/classfile/Unknown.java index 851d18214..97fd6e8c8 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/classfile/Unknown.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/classfile/Unknown.java @@ -56,7 +56,6 @@ package org.aspectj.apache.bcel.classfile; import org.aspectj.apache.bcel.Constants; import java.io.*; -import java.util.*; /** * This class represents a reference to an unknown (i.e., @@ -69,7 +68,7 @@ import java.util.*; * org.aspectj.apache.bcel.classfile.AttributeReader)">Attribute.addAttributeReader</a>. * - * @version $Id: Unknown.java,v 1.2 2004/11/19 16:45:18 aclement Exp $ + * @version $Id: Unknown.java,v 1.3 2006/03/04 10:43:17 aclement Exp $ * @see org.aspectj.apache.bcel.classfile.Attribute * @see org.aspectj.apache.bcel.classfile.AttributeReader * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> @@ -78,20 +77,21 @@ public final class Unknown extends Attribute { private byte[] bytes; private String name; - private static HashMap unknown_attributes = new HashMap(); + // evil static - removed by Andy C - no apparent users (4 Mar 06) +// private static HashMap unknown_attributes = new HashMap(); /** @return array of unknown attributes, but just one for each kind. */ - static Unknown[] getUnknownAttributes() { - Unknown[] unknowns = new Unknown[unknown_attributes.size()]; - Iterator entries = unknown_attributes.values().iterator(); - - for(int i=0; entries.hasNext(); i++) - unknowns[i] = (Unknown)entries.next(); - - unknown_attributes.clear(); - return unknowns; - } +// static Unknown[] getUnknownAttributes() { +// Unknown[] unknowns = new Unknown[unknown_attributes.size()]; +// Iterator entries = unknown_attributes.values().iterator(); +// +// for(int i=0; entries.hasNext(); i++) +// unknowns[i] = (Unknown)entries.next(); +// +// unknown_attributes.clear(); +// return unknowns; +// } /** * Initialize from another object. Note that both objects use the same @@ -117,7 +117,7 @@ public final class Unknown extends Attribute { name = ((ConstantUtf8)constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8)).getBytes(); - unknown_attributes.put(name, this); +// unknown_attributes.put(name, this); } /** |