+ if (classpath) {
+ if (bundleContext != null) {
+ Bundle currentBundle = bundleContext.getBundle();
+ url = currentBundle.getResource(resUrl);
+ if (url != null) {// found
+ dataModelBundle = findDataModelBundle(resUrl);
+ }
+ } else {
+ resUrl = "classpath:" + resUrl;
+ url = null;
+ // url =
+ // getClass().getClassLoader().getResource(resUrl);
+ // if (url == null)
+ // url = Thread.currentThread()
+ // .getContextClassLoader()
+ // .getResource(resUrl);
+ }
+ } else if (!resUrl.startsWith("classpath:")) {
+ url = new URL(resUrl);
+ } else {
+ url = null;
+ }
+ }