Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #247 - RelativePathResolver should consider TCCL #248

Merged
merged 1 commit into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jVinci/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.apt_generated/
/.apt_generated_tests/
/META-INF/
1 change: 1 addition & 0 deletions uimaj-adapter-vinci/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.apt_generated/
/.apt_generated_tests/
/META-INF/
1 change: 1 addition & 0 deletions uimaj-core/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.apt_generated/
/.apt_generated_tests/
/META-INF/
Original file line number Diff line number Diff line change
Expand Up @@ -189,17 +189,22 @@ public URL resolveRelativePath(URL aRelativeUrl) {

// fallback on classloader
String f = aRelativeUrl.getFile();
URL absURL;
URL absURL = null;
if (mClassLoader != null) {
absURL = mClassLoader.getResource(f);
} else {// if no ClassLoader specified (could be the bootstrap classloader), try the system
// classloader
}

// fallback on TCCL
if (absURL == null) {
ClassLoader tccl = Thread.currentThread().getContextClassLoader();
absURL = tccl.getResource(f);
}

// https://issues.apache.org/jira/browse/UIMA-5902
ClassLoader tccl = Thread.currentThread().getContextClassLoader();
absURL = (tccl != null) ? tccl.getResource(f)
: ClassLoader.getSystemClassLoader().getResource(f);
// if no ClassLoader specified (could be the bootstrap classloader), try the system classloader
if (absURL == null && mClassLoader == null) {
absURL = ClassLoader.getSystemClassLoader().getResource(f);
}

return absURL;
}

Expand Down
1 change: 1 addition & 0 deletions uimaj-cpe/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ checkpoint_synchPoint.xml
checkpoint_synchPoint.xml.prev
/.apt_generated/
/.apt_generated_tests/
/META-INF/
1 change: 1 addition & 0 deletions uimaj-tools/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.apt_generated/
/.apt_generated_tests/
/META-INF/