summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorPete Fritchman <petef@FreeBSD.org>2002-05-27 04:33:43 +0000
committerPete Fritchman <petef@FreeBSD.org>2002-05-27 04:33:43 +0000
commit8f1a119b38dd922f176201f6b1e5cb2456b40b9e (patch)
treeaf049c3d82381136a4c299c4807bc7fe87f42d89 /www
parentUpdate our config file to reflect that the URT sources come with the netpbm (diff)
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>
Notes
Notes: svn path=/head/; revision=60065
Diffstat (limited to 'www')
-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";
+ }