mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-05 16:15:54 +00:00
Fixed a problem related to OC4J. See http://www.nabble.com/Hudson-on-OC4J-tt16702113.html
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@8632 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
2c5d33cb79
commit
fb5127ed12
1 file changed
+6
@@ -32,6 +32,12 @@ public class Which {
|
||||
return new File(decode(new URL(resURL).getPath()));
|
||||
}
|
||||
|
||||
if(resURL.startsWith("code-source:/")) {
|
||||
// OC4J apparently uses this. See http://www.nabble.com/Hudson-on-OC4J-tt16702113.html
|
||||
resURL = resURL.substring("code-source:/".length(), resURL.lastIndexOf('!')); // cut off jar: and the file name portion
|
||||
return new File(decode(new URL(resURL).getPath()));
|
||||
}
|
||||
|
||||
if(resURL.startsWith("file:")) {
|
||||
// unpackaged classes
|
||||
int n = clazz.getName().split("\\.").length; // how many slashes do wo need to cut?
|
||||
|
||||
Reference in new issue
Block a user