Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101873 - jtidy-0_pre20010801 doesn't compile under java 1.5.0 (Patch included)
Summary: jtidy-0_pre20010801 doesn't compile under java 1.5.0 (Patch included)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-09 09:06 UTC by Adam Davison
Modified: 2005-08-09 09:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Davison 2005-08-09 09:06:56 UTC
jtidy-0_pre20010801 doesn't compile under java 1.5.0_04 because it uses enum as
a variable name, which is a new reserved word and this java compile doesn't
support treating the source as 1.4

jtidy seems to be pretty unmaintained so possible solutions are have java 1.4.2
installed too which sounds bad or fix jtidy.

This patch applies in the src/ directory of the build and just renames the
variable, allowing it to compile successfully under java 1.5, although there are
still a number of warnings.

I couldn't find any docs on how people like patches at gentoo, err, so here it
just is. If you want it differently, let me know. I also just kind of guessed at
what to put for severity/priority. Hope I didn't ruin anyones life.

Adam

--- Patch Begins Here---

--- org/w3c/tidy/Configuration.java     2005-08-09 16:58:06.000000000 +0100
+++ org/w3c/tidy/Configuration.java     2005-08-09 16:58:38.000000000 +0100
@@ -123,10 +123,10 @@

     public void addProps( Properties p )
     {
-        Enumeration enum = p.propertyNames();
-        while (enum.hasMoreElements())
+        Enumeration en = p.propertyNames();
+        while (en.hasMoreElements())
         {
-            String key = (String) enum.nextElement();
+            String key = (String) en.nextElement();
             String value = p.getProperty(key);
             _properties.put(key, value);
         }
Comment 1 Thomas Matthijs (RETIRED) gentoo-dev 2005-08-09 09:34:30 UTC
easyer to just -source 1.4 it
Comment 2 Adam Davison 2005-08-09 09:47:57 UTC
Isn't it worth putting that flag into the package in that case?

java 1.5.0 complained that it couldn't do classic style java so I assumed it
meant that it had been passed -source 1.4 but couldn't do it any more.

Or at worst, how do I use that flag when I'm building the packages so I can
actually build them on my machine, there are a couple more that produce the same
bug.