--- a/langtools/src/share/classes/com/sun/tools/classfile/Attributes.java Wed Dec 18 19:22:58 2013 +0000
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Attributes.java Wed Dec 18 16:05:18 2013 -0500
@@ -38,8 +38,12 @@
* deletion without notice.</b>
*/
public class Attributes implements Iterable<Attribute> {
+
+ public final Attribute[] attrs;
+ public final Map<String, Attribute> map;
+
Attributes(ClassReader cr) throws IOException {
- map = new HashMap<String,Attribute>();
+ map = new HashMap<>();
int attrs_count = cr.readUnsignedShort();
attrs = new Attribute[attrs_count];
for (int i = 0; i < attrs_count; i++) {
@@ -55,7 +59,7 @@
public Attributes(ConstantPool constant_pool, Attribute[] attrs) {
this.attrs = attrs;
- map = new HashMap<String,Attribute>();
+ map = new HashMap<>();
for (Attribute attr : attrs) {
try {
map.put(attr.getName(constant_pool), attr);
@@ -100,7 +104,4 @@
length += a.byteLength();
return length;
}
-
- public final Attribute[] attrs;
- public final Map<String, Attribute> map;
}