aboutsummaryrefslogtreecommitdiff
path: root/src/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java')
-rw-r--r--src/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java b/src/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java
index ed33ca4..9b350d7 100644
--- a/src/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java
+++ b/src/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java
@@ -1,13 +1,13 @@
/*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
*/
/*
- * Copyright 2001-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -23,9 +23,6 @@
package com.sun.org.apache.xalan.internal.xsltc.compiler;
-import java.util.Enumeration;
-import java.util.Vector;
-
import com.sun.org.apache.bcel.internal.generic.BranchHandle;
import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
import com.sun.org.apache.bcel.internal.generic.GOTO;
@@ -42,6 +39,8 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ResultTreeType;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
+import java.util.Iterator;
+import java.util.Vector;
/**
* @author Jacek Ambroziak
@@ -97,9 +96,9 @@ final class ForEach extends Instruction {
// Collect sort objects associated with this instruction
final Vector sortObjects = new Vector();
- Enumeration children = elements();
- while (children.hasMoreElements()) {
- final Object child = children.nextElement();
+ Iterator<SyntaxTreeNode> children = elements();
+ while (children.hasNext()) {
+ final SyntaxTreeNode child = children.next();
if (child instanceof Sort) {
sortObjects.addElement(child);
}
@@ -187,7 +186,7 @@ final class ForEach extends Instruction {
MethodGenerator methodGen) {
final int n = elementCount();
for (int i = 0; i < n; i++) {
- final Object child = getContents().elementAt(i);
+ final SyntaxTreeNode child = getContents().get(i);
if (child instanceof Variable) {
Variable var = (Variable)child;
var.initialize(classGen, methodGen);