From 686b5abef9c269a726897c6992d0ea2abea79b04 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Thu, 4 Sep 2014 18:16:16 +0400 Subject: java-decompiler: optimization (empty lists allocation avoided) --- .../decompiler/struct/attr/StructAnnDefaultAttribute.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/org/jetbrains/java/decompiler/struct/attr/StructAnnDefaultAttribute.java') diff --git a/src/org/jetbrains/java/decompiler/struct/attr/StructAnnDefaultAttribute.java b/src/org/jetbrains/java/decompiler/struct/attr/StructAnnDefaultAttribute.java index f36df6d..fbad47e 100644 --- a/src/org/jetbrains/java/decompiler/struct/attr/StructAnnDefaultAttribute.java +++ b/src/org/jetbrains/java/decompiler/struct/attr/StructAnnDefaultAttribute.java @@ -18,20 +18,15 @@ package org.jetbrains.java.decompiler.struct.attr; import org.jetbrains.java.decompiler.modules.decompiler.exps.Exprent; import org.jetbrains.java.decompiler.struct.consts.ConstantPool; -import java.io.ByteArrayInputStream; -import java.io.DataInputStream; - +import java.io.IOException; public class StructAnnDefaultAttribute extends StructGeneralAttribute { private Exprent defaultValue; - public void initContent(ConstantPool pool) { - - name = ATTRIBUTE_ANNOTATION_DEFAULT; - - DataInputStream data = new DataInputStream(new ByteArrayInputStream(info)); - defaultValue = StructAnnotationAttribute.parseAnnotationElement(data, pool); + @Override + public void initContent(ConstantPool pool) throws IOException { + defaultValue = StructAnnotationAttribute.parseAnnotationElement(stream(), pool); } public Exprent getDefaultValue() { -- cgit v1.2.3