resolves OPENJPA-1743: anchors in mappingtool config invocation

git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/2.0.x@966482 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Patrick Linskey 2010-07-22 02:43:16 +00:00
parent b0b74b2b58
commit a6f62b829c
1 changed files with 8 additions and 1 deletions

View File

@ -840,7 +840,14 @@ public class ConfigurationImpl
* <code>properties</code> value with the name of a resource. * <code>properties</code> value with the name of a resource.
*/ */
public void setProperties(String resourceName) throws IOException { public void setProperties(String resourceName) throws IOException {
ProductDerivations.load(resourceName, null, String anchor = null;
if (resourceName.indexOf("#") != -1)
{
anchor = resourceName.substring(resourceName.lastIndexOf("#") + 1);
resourceName = resourceName.substring(0,
resourceName.length() - anchor.length() - 1);
}
ProductDerivations.load(resourceName, anchor,
getClass().getClassLoader()).setInto(this); getClass().getClassLoader()).setInto(this);
_auto = resourceName; _auto = resourceName;
} }