From 06434b40b9ddfb0538b60bed1a16984063b6a318 Mon Sep 17 00:00:00 2001 From: smarks Date: Wed, 7 Aug 2013 16:29:36 -0700 Subject: [PATCH] 8022479: clean up warnings from sun.tools.asm Reviewed-by: lancea, darcy --- .../classes/sun/tools/asm/Assembler.java | 90 ++++++++++--------- .../classes/sun/tools/asm/ConstantPool.java | 12 +-- .../classes/sun/tools/asm/Instruction.java | 17 ++-- .../classes/sun/tools/asm/SwitchData.java | 38 ++++---- src/share/classes/sun/tools/asm/TryData.java | 6 +- 5 files changed, 87 insertions(+), 76 deletions(-) diff --git a/src/share/classes/sun/tools/asm/Assembler.java b/src/share/classes/sun/tools/asm/Assembler.java index 1bf406e18..b4fc8b1d2 100644 --- a/src/share/classes/sun/tools/asm/Assembler.java +++ b/src/share/classes/sun/tools/asm/Assembler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -91,9 +91,9 @@ class Assembler implements Constants { add(new Instruction(where, opc, flagNoCovered)); } - static Vector SourceClassList = new Vector(); + static Vector SourceClassList = new Vector<>(); - static Vector TmpCovTable = new Vector(); + static Vector TmpCovTable = new Vector<>(); static int[] JcovClassCountArray = new int[CT_LAST_KIND + 1]; @@ -177,8 +177,8 @@ class Assembler implements Constants { case opc_lookupswitch: { SwitchData sw = (SwitchData)inst.value; optimize(env, sw.defaultLabel); - for (Enumeration e = sw.tab.elements() ; e.hasMoreElements();) { - optimize(env, (Label)e.nextElement()); + for (Enumeration