diff options
author | Ying Wang <wangying@google.com> | 2012-02-27 18:34:24 -0800 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2012-02-27 18:34:24 -0800 |
commit | 9f606f95f03a75961498803e24bee6799a7c0885 (patch) | |
tree | a45f4d74feda9b76277a0c9ced55ad15d82248a1 /src/proguard/classfile/ClassPool.java | |
parent | cfead78069f3dc32998dc118ee08cab3867acea2 (diff) | |
download | proguard-9f606f95f03a75961498803e24bee6799a7c0885.tar.gz |
Revert "Upgrade from Progaurd 4.4 to 4.7."android-sdk-support_r11android-cts-4.2_r2android-cts-4.1_r4android-cts-4.1_r2android-cts-4.1_r1tools_r22tools_r21jb-mr1.1-dev-plus-aospjb-mr1.1-devjb-mr1-dev-plus-aospjb-mr1-devjb-dev
This reverts commit cfead78069f3dc32998dc118ee08cab3867acea2.
Bug: 6079915
Diffstat (limited to 'src/proguard/classfile/ClassPool.java')
-rw-r--r-- | src/proguard/classfile/ClassPool.java | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/proguard/classfile/ClassPool.java b/src/proguard/classfile/ClassPool.java index c5defe8..57728a5 100644 --- a/src/proguard/classfile/ClassPool.java +++ b/src/proguard/classfile/ClassPool.java @@ -2,7 +2,7 @@ * ProGuard -- shrinking, optimization, obfuscation, and preverification * of Java bytecode. * - * Copyright (c) 2002-2011 Eric Lafortune (eric@graphics.cornell.edu) + * Copyright (c) 2002-2009 Eric Lafortune (eric@graphics.cornell.edu) * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free @@ -26,16 +26,14 @@ import proguard.classfile.visitor.*; import java.util.*; /** - * This is a set of representations of classes. They can be enumerated or + * This is a set of representations of classes. They can be enumerated or * retrieved by name. They can also be accessed by means of class visitors. * * @author Eric Lafortune */ public class ClassPool { - // We're using a sorted tree map instead of a hash map to store the classes, - // in order to make the processing more deterministic. - private final Map classes = new TreeMap(); + private final Map classes = new HashMap(); /** @@ -68,11 +66,11 @@ public class ClassPool /** * Returns a Clazz from the class pool based on its name. Returns * <code>null</code> if the class with the given name is not in the class - * pool. + * pool. Returns the base class if the class name is an array type. */ public Clazz getClass(String className) { - return (Clazz)classes.get(className); + return (Clazz)classes.get(ClassUtil.internalClassNameFromClassType(className)); } @@ -124,11 +122,8 @@ public class ClassPool */ public void classesAcceptAlphabetically(ClassVisitor classVisitor) { - // We're already using a tree map. - //TreeMap sortedClasses = new TreeMap(classes); - //Iterator iterator = sortedClasses.values().iterator(); - - Iterator iterator = classes.values().iterator(); + TreeMap sortedClasses = new TreeMap(classes); + Iterator iterator = sortedClasses.values().iterator(); while (iterator.hasNext()) { Clazz clazz = (Clazz)iterator.next(); |