aboutsummaryrefslogtreecommitdiff
path: root/textproc
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 /textproc
parent6dcca44f3a62353b3274158455055d3055408a27 (diff)
downloadports-8f1a119b38dd922f176201f6b1e5cb2456b40b9e.tar.gz
ports-8f1a119b38dd922f176201f6b1e5cb2456b40b9e.zip
Notes
Diffstat (limited to 'textproc')
-rw-r--r--textproc/cocoon/Makefile2
-rw-r--r--textproc/cocoon/files/patch-Utils.java51
2 files changed, 52 insertions, 1 deletions
diff --git a/textproc/cocoon/Makefile b/textproc/cocoon/Makefile
index 468bb6f2821c..8df5072f2d7f 100644
--- a/textproc/cocoon/Makefile
+++ b/textproc/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/textproc/cocoon/files/patch-Utils.java b/textproc/cocoon/files/patch-Utils.java
new file mode 100644
index 000000000000..5f89c384dc3e
--- /dev/null
+++ b/textproc/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";
+ }