--- a/jdk/src/share/classes/javax/swing/text/html/parser/Parser.java Thu Aug 07 09:42:31 2008 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/parser/Parser.java Tue Aug 12 17:59:58 2008 -0700
@@ -649,12 +649,10 @@
if (!strict) {
ContentModel content = stack.contentModel();
- Vector elemVec = new Vector();
+ Vector<Element> elemVec = new Vector<Element>();
if (content != null) {
content.getElements(elemVec);
- for (Enumeration v = elemVec.elements(); v.hasMoreElements();) {
- Element e = (Element)v.nextElement();
-
+ for (Element e : elemVec) {
// Ensure that this element has not been included as
// part of the exclusions in the DTD.
//
@@ -1349,9 +1347,9 @@
continue;
}
- AttributeList att = null;
- String attname = null;
- String attvalue = null;
+ AttributeList att;
+ String attname;
+ String attvalue;
if (parseIdentifier(true)) {
attname = getString(0);
@@ -1549,7 +1547,7 @@
* Parse a start or end tag.
*/
void parseTag() throws IOException {
- Element elem = null;
+ Element elem;
boolean net = false;
boolean warned = false;
boolean unknown = false;