aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhq <hq@FreeBSD.org>2006-04-15 08:27:56 +0800
committerhq <hq@FreeBSD.org>2006-04-15 08:27:56 +0800
commit2980a8f6c45ae81e402c7646cc95c0ca0ea95e3d (patch)
tree3c042e0f0933b7f54bda7d020d6bba935d054cd0
parent33dbeb3c094a0850ac801e3811f31d75ba54b14e (diff)
downloadfreebsd-ports-gnome-2980a8f6c45ae81e402c7646cc95c0ca0ea95e3d.tar.gz
freebsd-ports-gnome-2980a8f6c45ae81e402c7646cc95c0ca0ea95e3d.tar.zst
freebsd-ports-gnome-2980a8f6c45ae81e402c7646cc95c0ca0ea95e3d.zip
Fix build with Java 1.5: rename the 'enum' variable
Reported by: pointyhat
-rw-r--r--textproc/xpp3/files/patch-java1.538
1 files changed, 38 insertions, 0 deletions
diff --git a/textproc/xpp3/files/patch-java1.5 b/textproc/xpp3/files/patch-java1.5
new file mode 100644
index 000000000000..a87c0c025e16
--- /dev/null
+++ b/textproc/xpp3/files/patch-java1.5
@@ -0,0 +1,38 @@
+$FreeBSD$
+
+With Java 1.5, 'enum' is a keyword
+
+--- src/java/xpath/org/xmlpull/v1/builder/xpath/jaxen/function/ext/LocaleFunctionSupport.java.orig Sat Apr 15 02:21:03 2006
++++ src/java/xpath/org/xmlpull/v1/builder/xpath/jaxen/function/ext/LocaleFunctionSupport.java Sat Apr 15 02:21:40 2006
+@@ -130,24 +130,24 @@
+ * be found
+ */
+ protected Locale findLocale(String localeText) {
+- StringTokenizer enum = new StringTokenizer( localeText, "-" );
+- if (enum.hasMoreTokens())
++ StringTokenizer _enum = new StringTokenizer( localeText, "-" );
++ if (_enum.hasMoreTokens())
+ {
+- String language = enum.nextToken();
+- if (! enum.hasMoreTokens())
++ String language = _enum.nextToken();
++ if (! _enum.hasMoreTokens())
+ {
+ return findLocaleForLanguage(language);
+ }
+ else
+ {
+- String country = enum.nextToken();
+- if (! enum.hasMoreTokens())
++ String country = _enum.nextToken();
++ if (! _enum.hasMoreTokens())
+ {
+ return new Locale(language, country);
+ }
+ else
+ {
+- String variant = enum.nextToken();
++ String variant = _enum.nextToken();
+ return new Locale(language, country, variant);
+ }
+ }