forked from jasder/antlr
Initialize STGroupFile with url, not file path
- absolute file paths not reliable way to find resources on classpath - requires changes to ST4 in this PR: https://github.com/antlr/stringtemplate4/pull/199
This commit is contained in:
parent
7e93bf3e09
commit
7e89f26e9b
|
@ -509,7 +509,7 @@ public abstract class Target {
|
|||
URL url = Thread.currentThread().getContextClassLoader().getResource(groupFileName);
|
||||
STGroup result = null;
|
||||
try {
|
||||
result = new STGroupFile(url.getPath());
|
||||
result = new STGroupFile(url);
|
||||
}
|
||||
catch (IllegalArgumentException iae) {
|
||||
result = null;
|
||||
|
@ -524,7 +524,7 @@ public abstract class Target {
|
|||
|
||||
STGroup result = null;
|
||||
try {
|
||||
result = new STGroupFile(url.getPath());
|
||||
result = new STGroupFile(url);
|
||||
}
|
||||
catch (IllegalArgumentException iae) {
|
||||
gen.tool.errMgr.toolError(ErrorType.MISSING_CODE_GEN_TEMPLATES,
|
||||
|
|
Loading…
Reference in New Issue