1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

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>
This commit is contained in:
Pete Fritchman 2002-05-27 04:33:43 +00:00
parent 6dcca44f3a
commit 8f1a119b38
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=60065
4 changed files with 104 additions and 2 deletions

View File

@ -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/ \

View File

@ -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";
}

View File

@ -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/ \

View File

@ -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";
}