Anchor token fix.

git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@431131 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
A. Abram White 2006-08-13 01:49:01 +00:00
parent 132602e3d2
commit 26ae2fa31c
1 changed files with 2 additions and 2 deletions

View File

@ -523,7 +523,7 @@ public class Configurations {
String path = resource;
String anchor = null;
int idx = path.indexOf('.');
int idx = path.indexOf('#');
if (idx != -1) {
if (idx < path.length() - 1)
anchor = path.substring(idx + 1);
@ -596,7 +596,7 @@ public class Configurations {
String anchor = null;
try {
String path = file.getCanonicalPath();
int idx = path.indexOf('.');
int idx = path.indexOf('#');
if (idx != -1) {
if (idx < path.length() - 1)
anchor = path.substring(idx + 1);