From ec3b71e5b66d0c39d4a736ff6fe99c7f6cb37e81 Mon Sep 17 00:00:00 2001 From: Skylot Date: Sat, 21 Feb 2015 17:01:04 +0300 Subject: [PATCH] core: don't hardcode attributes count --- .../src/main/java/jadx/core/dex/attributes/AType.java | 7 +------ .../java/jadx/core/dex/attributes/AttributeStorage.java | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/jadx-core/src/main/java/jadx/core/dex/attributes/AType.java b/jadx-core/src/main/java/jadx/core/dex/attributes/AType.java index 8660aaed6..2d5ab8493 100644 --- a/jadx-core/src/main/java/jadx/core/dex/attributes/AType.java +++ b/jadx-core/src/main/java/jadx/core/dex/attributes/AType.java @@ -22,17 +22,12 @@ import jadx.core.dex.trycatch.SplitterBlockAttr; /** * Attribute types enumeration, - * uses generic type for omit cast after in 'AttributeStorage.get' method + * uses generic type for omit cast after 'AttributeStorage.get' method * * @param attribute class implementation */ public class AType { - private AType() { - } - - public static final int FIELDS_COUNT = 18; - public static final AType> JUMP = new AType>(); public static final AType> LOOP = new AType>(); diff --git a/jadx-core/src/main/java/jadx/core/dex/attributes/AttributeStorage.java b/jadx-core/src/main/java/jadx/core/dex/attributes/AttributeStorage.java index 54a2dd252..d7b82f2c1 100644 --- a/jadx-core/src/main/java/jadx/core/dex/attributes/AttributeStorage.java +++ b/jadx-core/src/main/java/jadx/core/dex/attributes/AttributeStorage.java @@ -24,7 +24,7 @@ public class AttributeStorage { public AttributeStorage() { flags = EnumSet.noneOf(AFlag.class); - attributes = new IdentityHashMap, IAttribute>(AType.FIELDS_COUNT); + attributes = new IdentityHashMap, IAttribute>(); } public void add(AFlag flag) {