You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2003/09/23 23:42:31 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/impl/xs XSGrammarBucket.java
mrglavas 2003/09/23 14:42:31
Modified: java/src/org/apache/xml/serialize HTMLSerializer.java
XMLSerializer.java
java/src/org/apache/xerces/impl XMLDTDScannerImpl.java
java/src/org/apache/xerces/util NamespaceSupport.java
AugmentationsImpl.java
java/src/org/apache/xerces/impl/xs/traversers
XSAttributeChecker.java
java/src/org/apache/xerces/impl/xs XSGrammarBucket.java
Log:
In anticipation of J2SE 1.5, replace all occurences
where enum has been used as the name in a local
variable, with a new and appropriate name. In J2SE
1.5, enum has become a keyword. Making these
changes should prevent potential compilation
problems when J2SE 1.5 becomes available.
Revision Changes Path
1.23 +5 -5 xml-xerces/java/src/org/apache/xml/serialize/HTMLSerializer.java
Index: HTMLSerializer.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/HTMLSerializer.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- HTMLSerializer.java 13 May 2003 13:23:48 -0000 1.22
+++ HTMLSerializer.java 23 Sep 2003 21:42:31 -0000 1.23
@@ -343,12 +343,12 @@
preserveSpace = true;
if ( addNSAttr ) {
- Enumeration enum;
+ Enumeration keys;
- enum = _prefixes.keys();
- while ( enum.hasMoreElements() ) {
+ keys = _prefixes.keys();
+ while ( keys.hasMoreElements() ) {
_printer.printSpace();
- value = (String) enum.nextElement();
+ value = (String) keys.nextElement();
name = (String) _prefixes.get( value );
if ( name.length() == 0 ) {
_printer.printText( "xmlns=\"" );
1.54 +5 -5 xml-xerces/java/src/org/apache/xml/serialize/XMLSerializer.java
Index: XMLSerializer.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/XMLSerializer.java,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- XMLSerializer.java 30 Jul 2003 11:14:08 -0000 1.53
+++ XMLSerializer.java 23 Sep 2003 21:42:31 -0000 1.54
@@ -367,12 +367,12 @@
}
if (_prefixes != null) {
- Enumeration enum;
+ Enumeration keys;
- enum = _prefixes.keys();
- while (enum.hasMoreElements()) {
+ keys = _prefixes.keys();
+ while (keys.hasMoreElements()) {
_printer.printSpace();
- value = (String) enum.nextElement();
+ value = (String) keys.nextElement();
name = (String) _prefixes.get( value );
if (name.length() == 0) {
_printer.printText( "xmlns=\"" );
1.45 +6 -6 xml-xerces/java/src/org/apache/xerces/impl/XMLDTDScannerImpl.java
Index: XMLDTDScannerImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XMLDTDScannerImpl.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- XMLDTDScannerImpl.java 25 Jul 2003 19:50:02 -0000 1.44
+++ XMLDTDScannerImpl.java 23 Sep 2003 21:42:31 -0000 1.45
@@ -1193,21 +1193,21 @@
// call handler
if (fDTDHandler != null) {
- String[] enum = null;
+ String[] enumeration = null;
if (fEnumerationCount != 0) {
- enum = new String[fEnumerationCount];
- System.arraycopy(fEnumeration, 0, enum,
+ enumeration = new String[fEnumerationCount];
+ System.arraycopy(fEnumeration, 0, enumeration,
0, fEnumerationCount);
}
// Determine whether the default value to be passed should be null.
// REVISIT: should probably check whether fLiteral.ch is null instead. LM.
if (defaultType!=null && (defaultType.equals("#REQUIRED") ||
defaultType.equals("#IMPLIED"))) {
- fDTDHandler.attributeDecl(elName, name, type, enum,
+ fDTDHandler.attributeDecl(elName, name, type, enumeration,
defaultType, null, null, null);
}
else {
- fDTDHandler.attributeDecl(elName, name, type, enum,
+ fDTDHandler.attributeDecl(elName, name, type, enumeration,
defaultType, fLiteral, fLiteral2, null);
}
}
1.17 +4 -4 xml-xerces/java/src/org/apache/xerces/util/NamespaceSupport.java
Index: NamespaceSupport.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/util/NamespaceSupport.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- NamespaceSupport.java 24 Jun 2003 21:56:59 -0000 1.16
+++ NamespaceSupport.java 23 Sep 2003 21:42:31 -0000 1.17
@@ -125,9 +125,9 @@
public NamespaceSupport(NamespaceContext context) {
pushContext();
// copy declaration in the context
- Enumeration enum = context.getAllPrefixes();
- while (enum.hasMoreElements()){
- String prefix = (String)enum.nextElement();
+ Enumeration prefixes = context.getAllPrefixes();
+ while (prefixes.hasMoreElements()){
+ String prefix = (String)prefixes.nextElement();
String uri = context.getURI(prefix);
declarePrefix(prefix, uri);
}
1.8 +4 -4 xml-xerces/java/src/org/apache/xerces/util/AugmentationsImpl.java
Index: AugmentationsImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/util/AugmentationsImpl.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AugmentationsImpl.java 23 Jan 2003 17:27:12 -0000 1.7
+++ AugmentationsImpl.java 23 Sep 2003 21:42:31 -0000 1.8
@@ -311,10 +311,10 @@
public String toString() {
StringBuffer buff = new StringBuffer();
buff.append("LargeContainer");
- Enumeration enum = fAugmentations.keys();
+ Enumeration keys = fAugmentations.keys();
- while (enum.hasMoreElements()) {
- Object key = enum.nextElement();
+ while (keys.hasMoreElements()) {
+ Object key = keys.nextElement();
buff.append("\nkey == ");
buff.append(key);
buff.append("; value == ");
1.27 +4 -4 xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java
Index: XSAttributeChecker.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- XSAttributeChecker.java 24 Jul 2003 15:14:43 -0000 1.26
+++ XSAttributeChecker.java 23 Sep 2003 21:42:31 -0000 1.27
@@ -1579,11 +1579,11 @@
// REVISIT: pass the proper element node to reportSchemaError
public void checkNonSchemaAttributes(XSGrammarBucket grammarBucket) {
// for all attributes
- Enumeration enum = fNonSchemaAttrs.keys();
+ Enumeration keys = fNonSchemaAttrs.keys();
XSAttributeDecl attrDecl;
- while (enum.hasMoreElements()) {
+ while (keys.hasMoreElements()) {
// get name, uri, localpart
- String attrRName = (String)enum.nextElement();
+ String attrRName = (String)keys.nextElement();
String attrURI = attrRName.substring(0,attrRName.indexOf(','));
String attrLocal = attrRName.substring(attrRName.indexOf(',')+1);
// find associated grammar
1.8 +4 -4 xml-xerces/java/src/org/apache/xerces/impl/xs/XSGrammarBucket.java
Index: XSGrammarBucket.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSGrammarBucket.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XSGrammarBucket.java 11 Jun 2002 19:22:57 -0000 1.7
+++ XSGrammarBucket.java 23 Sep 2003 21:42:31 -0000 1.8
@@ -180,10 +180,10 @@
int count = fGrammarRegistry.size() + (fNoNSGrammar==null ? 0 : 1);
SchemaGrammar[] grammars = new SchemaGrammar[count];
// get grammars with target namespace
- Enumeration enum = fGrammarRegistry.elements();
+ Enumeration schemas = fGrammarRegistry.elements();
int i = 0;
- while (enum.hasMoreElements())
- grammars[i++] = (SchemaGrammar)enum.nextElement();
+ while (schemas.hasMoreElements())
+ grammars[i++] = (SchemaGrammar)schemas.nextElement();
// add the grammar without target namespace, if any
if (fNoNSGrammar != null)
grammars[count-1] = fNoNSGrammar;
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org