Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:rantav/hector
Browse files Browse the repository at this point in the history
  • Loading branch information
btoddb committed Nov 1, 2011
2 parents 193bce5 + 9b944ca commit 0ddb8ca
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ private String getUniqueClassloaderIdentifier() {
* @return A string representing the current context path or null if it cannot be determined.
*/
private String getContextPath() {
URL url = getClass().getClassLoader().getResource("/");
ClassLoader loader = getClass().getClassLoader();
if(loader == null)
return null;
URL url = loader.getResource("/");
if (url != null) {
String[] elements = url.toString().split("/");
for (int i = elements.length - 1; i > 0; --i) {
Expand Down

0 comments on commit 0ddb8ca

Please sign in to comment.