aboutsummaryrefslogtreecommitdiffstats
path: root/src/proguard/classfile/editor/AttributeAdder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/proguard/classfile/editor/AttributeAdder.java')
-rw-r--r--src/proguard/classfile/editor/AttributeAdder.java22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/proguard/classfile/editor/AttributeAdder.java b/src/proguard/classfile/editor/AttributeAdder.java
index 2b610b7..ad4ecc0 100644
--- a/src/proguard/classfile/editor/AttributeAdder.java
+++ b/src/proguard/classfile/editor/AttributeAdder.java
@@ -2,7 +2,7 @@
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
- * Copyright (c) 2002-2009 Eric Lafortune (eric@graphics.cornell.edu)
+ * Copyright (c) 2002-2013 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
@@ -138,16 +138,14 @@ implements AttributeVisitor
public void visitInnerClassesAttribute(Clazz clazz, InnerClassesAttribute innerClassesAttribute)
{
- // TODO: Implement method.
- // Note that the attribute may already be present.
-// // Create a copy of the attribute.
-// InnerClassesAttribute newInnerClassesAttribute =
-// new InnerClassesAttribute(constantAdder.addConstant(clazz, innerClassesAttribute.u2attributeNameIndex),
-// 0,
-// null);
-//
-// // Add it to the target class.
-// attributesEditor.addClassAttribute(newInnerClassesAttribute);
+ // Create a copy of the attribute.
+ InnerClassesAttribute newInnerClassesAttribute =
+ new InnerClassesAttribute(constantAdder.addConstant(clazz, innerClassesAttribute.u2attributeNameIndex),
+ 0,
+ null);
+
+ // Add it to the target class.
+ attributesEditor.addAttribute(newInnerClassesAttribute);
}
@@ -256,7 +254,7 @@ implements AttributeVisitor
CodeAttributeComposer codeAttributeComposer = new CodeAttributeComposer();
- codeAttributeComposer.beginCodeFragment(codeAttribute.u4codeLength);
+ codeAttributeComposer.beginCodeFragment(codeAttribute.u4codeLength + 32);
// Add the instructions.
codeAttribute.instructionsAccept(clazz,