mirror of https://github.com/apache/openjpa.git
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:
parent
b0b74b2b58
commit
a6f62b829c
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue