From 74c2dbf7a17c27d606e21dc6be52de40d7e17f4b Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Sun, 30 May 2004 13:35:15 +0000 Subject: [PATCH] BeanInfoEmbryo.java, [...]: Rename enum to e because enum is a keyword in Java 1.5. 2004-05-30 Michael Koch * gnu/java/beans/BeanInfoEmbryo.java, java/awt/im/InputContext.java, javax/swing/tree/DefaultMutableTreeNode.java: Rename enum to e because enum is a keyword in Java 1.5. From-SVN: r82447 --- libjava/ChangeLog | 7 +++++++ libjava/gnu/java/beans/BeanInfoEmbryo.java | 12 ++++++------ libjava/java/awt/im/InputContext.java | 12 ++++++------ libjava/javax/swing/tree/DefaultMutableTreeNode.java | 8 ++++---- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 0a20670900e..be6629e8582 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2004-05-30 Michael Koch + + * gnu/java/beans/BeanInfoEmbryo.java, + java/awt/im/InputContext.java, + javax/swing/tree/DefaultMutableTreeNode.java: + Rename enum to e because enum is a keyword in Java 1.5. + 2004-05-30 Michael Koch * gnu/java/math/MPN.java, diff --git a/libjava/gnu/java/beans/BeanInfoEmbryo.java b/libjava/gnu/java/beans/BeanInfoEmbryo.java index 16738fe6048..2dc1166527e 100644 --- a/libjava/gnu/java/beans/BeanInfoEmbryo.java +++ b/libjava/gnu/java/beans/BeanInfoEmbryo.java @@ -85,9 +85,9 @@ public class BeanInfoEmbryo { PropertyDescriptor[] Aproperties = new PropertyDescriptor[properties.size()]; int i = 0; - Enumeration enum = properties.elements(); - while(enum.hasMoreElements()) { - Aproperties[i] = (PropertyDescriptor)enum.nextElement(); + Enumeration e = properties.elements(); + while (e.hasMoreElements()) { + Aproperties[i] = (PropertyDescriptor) e.nextElement(); if(defaultPropertyName != null && Aproperties[i].getName().equals(defaultPropertyName)) { defaultProperty = i; } @@ -96,9 +96,9 @@ public class BeanInfoEmbryo { EventSetDescriptor[] Aevents = new EventSetDescriptor[events.size()]; i = 0; - enum = events.elements(); - while(enum.hasMoreElements()) { - Aevents[i] = (EventSetDescriptor)enum.nextElement(); + e = events.elements(); + while (e.hasMoreElements()) { + Aevents[i] = (EventSetDescriptor) e.nextElement(); if(defaultEventName != null && Aevents[i].getName().equals(defaultEventName)) { defaultEvent = i; } diff --git a/libjava/java/awt/im/InputContext.java b/libjava/java/awt/im/InputContext.java index ab483377d4f..c8e7cf35a4c 100644 --- a/libjava/java/awt/im/InputContext.java +++ b/libjava/java/awt/im/InputContext.java @@ -86,20 +86,20 @@ public class InputContext private static final ArrayList descriptors = new ArrayList(); static { - Enumeration enum; + Enumeration e; try { - enum = ClassLoader.getSystemResources + e = ClassLoader.getSystemResources ("META_INF/services/java.awt.im.spi.InputMethodDescriptor"); } catch (IOException ex) { // XXX Should we do something else? - enum = EmptyEnumeration.getInstance(); + e = EmptyEnumeration.getInstance(); } - while (enum.hasMoreElements()) + while (e.hasMoreElements()) { - URL url = (URL) enum.nextElement(); + URL url = (URL) e.nextElement(); BufferedReader in; String line; try @@ -125,7 +125,7 @@ public class InputContext } line = in.readLine().trim(); } - catch (IOException e) + catch (IOException ex) { continue outer; } diff --git a/libjava/javax/swing/tree/DefaultMutableTreeNode.java b/libjava/javax/swing/tree/DefaultMutableTreeNode.java index 020e7410f97..b6dd1d0b870 100644 --- a/libjava/javax/swing/tree/DefaultMutableTreeNode.java +++ b/libjava/javax/swing/tree/DefaultMutableTreeNode.java @@ -997,17 +997,17 @@ public class DefaultMutableTreeNode public int getLeafCount() { // Variables - Enumeration enum; + Enumeration e; int count; TreeNode current; // Get Enumeration of all descendants - enum = depthFirstEnumeration(); + e = depthFirstEnumeration(); // Process Nodes count = 0; - while (enum.hasMoreElements() == true) { - current = (TreeNode) enum.nextElement(); + while (e.hasMoreElements() == true) { + current = (TreeNode) e.nextElement(); if (current.isLeaf() == true) { count++; } // if -- 2.30.2