aboutsummaryrefslogtreecommitdiffstats
path: root/www/cocoon
diff options
context:
space:
mode:
authorpetef <petef@FreeBSD.org>2002-05-27 12:33:43 +0800
committerpetef <petef@FreeBSD.org>2002-05-27 12:33:43 +0800
commit83fe6fed6e812648e032bb7e0ba3911c5ca95482 (patch)
tree2af52d7f21007d43f79561681389a1d92ef6ef43 /www/cocoon
parent8ed678821a722eac9e68029104a980995b1fca4b (diff)
downloadfreebsd-ports-gnome-83fe6fed6e812648e032bb7e0ba3911c5ca95482.tar.gz
freebsd-ports-gnome-83fe6fed6e812648e032bb7e0ba3911c5ca95482.tar.zst
freebsd-ports-gnome-83fe6fed6e812648e032bb7e0ba3911c5ca95482.zip
Fix a critical bug in 1.8.2 & bump PORTREVISION, for details see:
http://www.mail-archive.com/cocoon-users@xml.apache.org/msg05651.html PR: 37989 Submitted by: Volker Stolz <vs@lambda.foldr.org>
Diffstat (limited to 'www/cocoon')
-rw-r--r--www/cocoon/Makefile2
-rw-r--r--www/cocoon/files/patch-Utils.java51
2 files changed, 52 insertions, 1 deletions
diff --git a/www/cocoon/Makefile b/www/cocoon/Makefile
index 468bb6f2821c..8df5072f2d7f 100644
--- a/www/cocoon/Makefile
+++ b/www/cocoon/Makefile
@@ -7,7 +7,7 @@
PORTNAME= cocoon
PORTVERSION= 1.8.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= textproc www java
MASTER_SITES= http://xml.apache.org/cocoon/dist/cocoon1/ \
http://www.metaverse.nl/~ernst/ \
diff --git a/www/cocoon/files/patch-Utils.java b/www/cocoon/files/patch-Utils.java
new file mode 100644
index 000000000000..5f89c384dc3e
--- /dev/null
+++ b/www/cocoon/files/patch-Utils.java
@@ -0,0 +1,51 @@
+$FreeBSD$
+
+--- src/org/apache/cocoon/Utils.java.orig Sun May 12 13:30:49 2002
++++ src/org/apache/cocoon/Utils.java Sun May 12 13:30:58 2002
+@@ -331,16 +331,20 @@
+ */
+ public static final Object getLocationResource(String location) throws MalformedURLException {
+ Object resource = null;
+-
++
+ if (location.indexOf("://") < 0) {
+ resource = new File(location);
+ } else if (location.startsWith("resource://")) {
+ // FIXME (SM): this should _not_ be system resource, but rather a resource of current classloader
+- resource = ClassLoader.getSystemResource(location.substring("resource://".length()));
++// resource = ClassLoader.getSystemResource(location.substring("resource://".length()));
++
++ // The Fix!
++ Dummy classloadrefernce = new Dummy();
++ resource = classloadrefernce.getClass().getClassLoader().getResource(location.substring("resource://".length()));
+ } else {
+ resource = new URL(location);
+ }
+-
++
+ return resource;
+ }
+
+@@ -362,11 +366,20 @@
+ resource = new File(location);
+ } else if (location.startsWith("resource://")) {
+ // FIXME (SM): this should _not_ be system resource, but rather a resource of current classloader
+- resource = ClassLoader.getSystemResource(location.substring("resource://".length()));
++// resource = ClassLoader.getSystemResource(location.substring("resource://".length()));
++
++ // The Fix!
++ Dummy classloadrefernce = new Dummy();
++ resource = classloadrefernce.getClass().getClassLoader().getResource(location.substring("resource://".length()));
+ } else {
+ resource = new URL(location);
+ }
+-
++
+ return resource;
+ }
++
++}
++
++class Dummy {
++ String why = "to provide a classloader ref";
+ }