xml-xalan-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mk...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xml/utils Hashtree2Node.java
Date Wed, 15 Oct 2003 14:42:36 GMT
mkwan       2003/10/15 07:42:36

  Modified:    java/src/org/apache/xalan/processor XSLTAttributeDef.java
               java/src/org/apache/xalan/templates OutputProperties.java
                        Stylesheet.java
               java/src/org/apache/xalan/xslt EnvironmentCheck.java
               java/src/org/apache/xalan/xsltc/compiler
                        AttributeValueTemplate.java
               java/src/org/apache/xml/serializer CharInfo.java
               java/src/org/apache/xml/utils Hashtree2Node.java
  Log:
  Fix for bugzilla 22342.
  
  Rename variables with name "enum". In JDK 1.5, enum is a keyword.
  
  Revision  Changes    Path
  1.30      +3 -3      xml-xalan/java/src/org/apache/xalan/processor/XSLTAttributeDef.java
  
  Index: XSLTAttributeDef.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/XSLTAttributeDef.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- XSLTAttributeDef.java	30 Jan 2003 18:45:45 -0000	1.29
  +++ XSLTAttributeDef.java	15 Oct 2003 14:42:35 -0000	1.30
  @@ -720,11 +720,11 @@
   	}    
   	
       // An avt wasn't used.
  -  	int enum = this.getEnum(value);
  +  	int key = this.getEnum(value);
       
  -    if (enum != StringToIntTable.INVALID_KEY) 
  +    if (key != StringToIntTable.INVALID_KEY) 
       {
  -        if (objToReturn == null) objToReturn = new Integer(enum);
  +        if (objToReturn == null) objToReturn = new Integer(key);
       }
   
       // enum not used.  Validate qname-but-not-ncname.
  
  
  
  1.30      +3 -3      xml-xalan/java/src/org/apache/xalan/templates/OutputProperties.java
  
  Index: OutputProperties.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/OutputProperties.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- OutputProperties.java	8 Apr 2003 01:57:36 -0000	1.29
  +++ OutputProperties.java	15 Oct 2003 14:42:35 -0000	1.30
  @@ -628,11 +628,11 @@
     public void copyFrom(Properties src, boolean shouldResetDefaults)
     {
   
  -    Enumeration enum = src.keys();
  +    Enumeration keys = src.keys();
   
  -    while (enum.hasMoreElements())
  +    while (keys.hasMoreElements())
       {
  -      String key = (String) enum.nextElement();
  +      String key = (String) keys.nextElement();
       
         if (!isLegalPropertyKey(key))
           throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_OUTPUT_PROPERTY_NOT_RECOGNIZED,
new Object[]{key})); //"output property not recognized: "
  
  
  
  1.29      +3 -3      xml-xalan/java/src/org/apache/xalan/templates/Stylesheet.java
  
  Index: Stylesheet.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/Stylesheet.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- Stylesheet.java	25 Aug 2003 23:31:14 -0000	1.28
  +++ Stylesheet.java	15 Oct 2003 14:42:35 -0000	1.29
  @@ -1521,10 +1521,10 @@
         
         if(null != m_NonXslTopLevel)
         {
  -      	java.util.Enumeration enum = m_NonXslTopLevel.elements();
  -      	while(enum.hasMoreElements())
  +      	java.util.Enumeration elements = m_NonXslTopLevel.elements();
  +      	while(elements.hasMoreElements())
         	{
  -      	  ElemTemplateElement elem = (ElemTemplateElement)enum.nextElement();
  +      	  ElemTemplateElement elem = (ElemTemplateElement)elements.nextElement();
             if (visitor.visitTopLevelInstruction(elem))
             {
               elem.callChildVisitors(visitor);
  
  
  
  1.22      +15 -15    xml-xalan/java/src/org/apache/xalan/xslt/EnvironmentCheck.java
  
  Index: EnvironmentCheck.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xslt/EnvironmentCheck.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- EnvironmentCheck.java	14 Aug 2003 16:27:44 -0000	1.21
  +++ EnvironmentCheck.java	15 Oct 2003 14:42:35 -0000	1.22
  @@ -298,12 +298,12 @@
         "#---- BEGIN writeEnvironmentReport($Revision$): Useful stuff found: ----");
   
       // Fake the Properties-like output
  -    for (Enumeration enum = h.keys(); 
  -         enum.hasMoreElements();
  +    for (Enumeration keys = h.keys(); 
  +         keys.hasMoreElements();
           /* no increment portion */
           )
       {
  -      Object key = enum.nextElement();
  +      Object key = keys.nextElement();
         String keyStr = (String) key;
         try
         {
  @@ -401,12 +401,12 @@
       {
         Hashtable subhash = (Hashtable) v.elementAt(i);
   
  -      for (Enumeration enum = subhash.keys(); 
  -           enum.hasMoreElements();
  +      for (Enumeration keys = subhash.keys(); 
  +           keys.hasMoreElements();
              /* no increment portion */
             )
         {
  -        Object key = enum.nextElement();
  +        Object key = keys.nextElement();
           String keyStr = (String) key;
           try
           {
  @@ -470,12 +470,12 @@
         Element hashNode = factory.createElement("environment");
         envCheckNode.appendChild(hashNode);
         
  -      for (Enumeration enum = h.keys(); 
  -           enum.hasMoreElements();
  +      for (Enumeration keys = h.keys(); 
  +           keys.hasMoreElements();
             /* no increment portion */
             )
         {
  -        Object key = enum.nextElement();
  +        Object key = keys.nextElement();
           String keyStr = (String) key;
           try
           {
  @@ -552,12 +552,12 @@
       {
         Hashtable subhash = (Hashtable) v.elementAt(i);
   
  -      for (Enumeration enum = subhash.keys(); 
  -           enum.hasMoreElements();
  +      for (Enumeration keys = subhash.keys(); 
  +           keys.hasMoreElements();
              /* no increment portion */
             )
         {
  -        Object key = enum.nextElement();
  +        Object key = keys.nextElement();
           try
           {
             String keyStr = (String) key;
  
  
  
  1.9       +4 -4      xml-xalan/java/src/org/apache/xalan/xsltc/compiler/AttributeValueTemplate.java
  
  Index: AttributeValueTemplate.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/AttributeValueTemplate.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AttributeValueTemplate.java	30 Jan 2003 18:45:59 -0000	1.8
  +++ AttributeValueTemplate.java	15 Oct 2003 14:42:35 -0000	1.9
  @@ -197,9 +197,9 @@
   	    il.append(DUP);
   	    il.append(new INVOKESPECIAL(initBuffer));
   	    // StringBuffer is on the stack
  -	    final Enumeration enum = elements();
  -	    while (enum.hasMoreElements()) {
  -		final Expression exp = (Expression)enum.nextElement();
  +	    final Enumeration elements = elements();
  +	    while (elements.hasMoreElements()) {
  +		final Expression exp = (Expression)elements.nextElement();
   		exp.translate(classGen, methodGen);
   		il.append(append);
   	    }
  
  
  
  1.8       +3 -3      xml-xalan/java/src/org/apache/xml/serializer/CharInfo.java
  
  Index: CharInfo.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/serializer/CharInfo.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CharInfo.java	5 Oct 2003 14:10:45 -0000	1.7
  +++ CharInfo.java	15 Oct 2003 14:42:35 -0000	1.8
  @@ -214,9 +214,9 @@
           }
   
           if (entities != null) {
  -            Enumeration enum = entities.getKeys();
  -            while (enum.hasMoreElements()){
  -                String name = (String) enum.nextElement();
  +            Enumeration keys = entities.getKeys();
  +            while (keys.hasMoreElements()){
  +                String name = (String) keys.nextElement();
                   String value = entities.getString(name);
                   int code = Integer.parseInt(value);
                   defineEntity(name, (char) code);
  
  
  
  1.4       +8 -8      xml-xalan/java/src/org/apache/xml/utils/Hashtree2Node.java
  
  Index: Hashtree2Node.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/utils/Hashtree2Node.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Hashtree2Node.java	30 Jan 2003 18:46:19 -0000	1.3
  +++ Hashtree2Node.java	15 Oct 2003 14:42:35 -0000	1.4
  @@ -119,12 +119,12 @@
               Element hashNode = factory.createElement(elemName);
               container.appendChild(hashNode);
   
  -            Enumeration enum = hash.keys();
  +            Enumeration keys = hash.keys();
               Vector v = new Vector();
   
  -            while (enum.hasMoreElements())
  +            while (keys.hasMoreElements())
               {
  -                Object key = enum.nextElement();
  +                Object key = keys.nextElement();
                   String keyStr = key.toString();
                   Object item = hash.get(key);
   
  @@ -157,12 +157,12 @@
               }
   
               // Now go back and do the saved hashes
  -            enum = v.elements();
  -            while (enum.hasMoreElements())
  +            keys = v.elements();
  +            while (keys.hasMoreElements())
               {
                   // Retrieve name and hash in two steps
  -                String n = (String) enum.nextElement();
  -                Hashtable h = (Hashtable) enum.nextElement();
  +                String n = (String) keys.nextElement();
  +                Hashtable h = (Hashtable) keys.nextElement();
   
                   appendHashToNode(h, n, hashNode, factory);
               }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message