Issue 57544 - patch to solve the enum keyword problem in sun jdk1.5
Summary: patch to solve the enum keyword problem in sun jdk1.5
Status: CLOSED DUPLICATE of issue 59368
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: OOO 2.0 Beta2
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: svante.schubert
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-09 06:22 UTC by weichuan_lin
Modified: 2006-04-07 11:19 UTC (History)
2 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description weichuan_lin 2005-11-09 06:22:49 UTC
The patch is for Sun jdk1.5.0_05, enum is interpreted as keyword by the
jvm, and the old code use enum as an identifier. This patch just revises
them to "enumer".

I have successfully built the ooo with this patch on FC4, ia32, and
--with-tag=src680-m136, the tar file which I got is
ooo-build-src680.137.0.tar.gz.

diff -urp
ooo-build-src680.137.0.orig/build/src680-m136/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java
ooo-build-src680.137.0/build/src680-m136/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java
---
ooo-build-src680.137.0.orig/build/src680-m136/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java
2005-11-08 13:27:21.000000000 +0800
+++
ooo-build-src680.137.0/build/src680-m136/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java
2005-11-08 13:06:06.000000000 +0800
@@ -127,8 +127,8 @@ public class ConvertData {
      *           <code>Vector</code> of <code>Document</code> objects.
      */
     public Enumeration getDocumentEnumeration() {
-        Enumeration enum = v.elements();
-		return (enum);
+        Enumeration enumer = v.elements();
+		return (enumer);
 	}
 
 
diff -urp
ooo-build-src680.137.0.orig/build/src680-m136/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java
ooo-build-src680.137.0/build/src680-m136/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java
---
ooo-build-src680.137.0.orig/build/src680-m136/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java
2005-11-08 13:29:15.000000000 +0800
+++
ooo-build-src680.137.0/build/src680-m136/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java
2005-11-08 13:11:05.000000000 +0800
@@ -155,14 +155,14 @@ public final class DocumentDeserializerI
      */
     public Document deserialize() throws ConvertException, IOException {
 	log("\nFound the XSLT deserializer");
-	Enumeration enum = cd.getDocumentEnumeration();
+	Enumeration enumer = cd.getDocumentEnumeration();
 	org.w3c.dom.Document domDoc=null;
 	DOMDocument docOut=null;
 	GenericOfficeDocument doc = null;
 	ByteArrayOutputStream baos =null;
 	GenericOfficeDocument sxwDoc = new GenericOfficeDocument("output");
-	while (enum.hasMoreElements()) {       
-		 docOut = (DOMDocument) enum.nextElement();
+	while (enumer.hasMoreElements()) {       
+		 docOut = (DOMDocument) enumer.nextElement();
 	}
 	domDoc = docOut.getContentDOM();	
 	try{
diff -urp
ooo-build-src680.137.0.orig/build/src680-m136/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java
ooo-build-src680.137.0/build/src680-m136/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java
---
ooo-build-src680.137.0.orig/build/src680-m136/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java
2005-11-08 13:29:04.000000000 +0800
+++
ooo-build-src680.137.0/build/src680-m136/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java
2005-11-08 13:14:00.000000000 +0800
@@ -183,9 +183,9 @@ public final class PluginFactoryImpl ext
 	String ext= ".txt";
 	String mimeType = null;
 	ConverterInfo ci = this.getConverterInfo();
-	Enumeration enum = ci.getDeviceMime();
-	while (enum.hasMoreElements()) {       
-	    mimeType= (String) enum.nextElement();
+	Enumeration enumer = ci.getDeviceMime();
+	while (enumer.hasMoreElements()) {       
+	    mimeType= (String) enumer.nextElement();
 	}
 	try {
 	    props.load(is);
Comment 1 jogi 2005-11-15 11:17:24 UTC
-> porting
Comment 2 stx123 2006-04-07 01:53:50 UTC
I guess "jsi" forgot to reassign issue to owner of selected subcomponent...
Comment 3 Martin Hollmichel 2006-04-07 11:12:02 UTC
reassign
Comment 4 svante.schubert 2006-04-07 11:16:34 UTC
Will be fixed with 59368 in pp3

*** This issue has been marked as a duplicate of 59368 ***
Comment 5 svante.schubert 2006-04-07 11:19:11 UTC
sus-> weichuan_lin:
closed as dublicated,
but thanks anyway for your effort on the patch.
The good news it will be fixed soon.