You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2015/01/08 18:54:00 UTC
svn commit: r1650347 - in /ofbiz/trunk/framework:
base/src/org/ofbiz/base/util/UtilURL.java
entity/src/org/ofbiz/entity/util/EntityClassLoader.java
Author: adrianc
Date: Thu Jan 8 17:53:59 2015
New Revision: 1650347
URL: http://svn.apache.org/r1650347
Log:
Some small fixups for some of my previous commits.
Modified:
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilURL.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityClassLoader.java
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilURL.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilURL.java?rev=1650347&r1=1650346&r2=1650347&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilURL.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilURL.java Thu Jan 8 17:53:59 2015
@@ -95,7 +95,8 @@ public class UtilURL {
}
url = loader.getResource(resourceName);
if (url != null) {
- urlMap.put(resourceName, url);
+ // Do not cache URLs from ClassLoader - interferes with EntityClassLoader operation
+ //urlMap.put(resourceName, url);
return url;
}
url = ClassLoader.getSystemResource(resourceName);
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityClassLoader.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityClassLoader.java?rev=1650347&r1=1650346&r2=1650347&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityClassLoader.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityClassLoader.java Thu Jan 8 17:53:59 2015
@@ -83,7 +83,7 @@ public final class EntityClassLoader ext
Delegator delegator = DelegatorFactory.getDelegator(delegatorName);
GenericValue resourceValue = delegator.findOne("JavaResource", true, "resourceName", name);
if (resourceValue != null) {
- url = makeUrl(resourceValue);
+ url = newUrl(resourceValue);
} else {
misses.put(key, key);
}
@@ -112,7 +112,7 @@ public final class EntityClassLoader ext
if (!resourceValues.isEmpty()) {
List<URL> urls = new ArrayList<URL>(resourceValues.size());
for (GenericValue resourceValue : resourceValues) {
- urls.add(makeUrl(resourceValue));
+ urls.add(newUrl(resourceValue));
}
urlEnum = Collections.enumeration(urls);
} else {
@@ -160,7 +160,7 @@ public final class EntityClassLoader ext
return inFindValue;
}
- private URL makeUrl(GenericValue resourceValue) throws MalformedURLException {
+ private URL newUrl(GenericValue resourceValue) throws MalformedURLException {
return new URL("entity", resourceValue.getDelegator().getDelegatorName(), -1, "/".concat(resourceValue
.getString("resourceName")), streamHandler);
}