mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
Moved testng DTD from war to core, so that this resource can be accessed even when the code runs inside Maven process (#1426)
I thought about leaving the look up from servlet in there, perhaps as a fallback, but realized that the behavior change between the master and the slaves are probably not desirable. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7810 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
93158ea050
commit
fd649b81d4
2 files changed
+1
-1
No files matched your search
@@ -36,7 +36,7 @@ class XMLEntityResolver implements EntityResolver {
|
||||
LOGGER.fine("It's a TestNG document, will try to lookup DTD in classpath");
|
||||
String dtdFileName = systemId.substring(TESTNG_NAMESPACE.length());
|
||||
|
||||
URL url = Hudson.getInstance().servletContext.getResource('/' + dtdFileName);
|
||||
URL url = getClass().getClassLoader().getResource(dtdFileName);
|
||||
if (url != null)
|
||||
return new InputSource(url.toString());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user