|
From: Darren D. <da...@da...> - 2004-09-17 12:31:00
|
createRelative(String) in ClassPathResource attempts to create a Resource
relative to only the FIRST part of the package name rather than all of it=
. So
if I have..
Resource root =3D new ClassPathResource("com/foo/bar/");
Resource res=3D root.createRelative("myFile.xml");
I would *expect* res.path to be "com/foo/bar/myFile.xml" instead it is
"com/myFile.xml"
Am I missing something? If not, I think the quickest fix is on line 117
(untested):
- int packageIndex =3D this.path.indexOf('/');
+ int packageIndex =3D this.path.lastIndexOf('/');
Regards,
--=20
Darren Davison
Public Key: http://www.davison.uk.net/pages/key.htm
|