elmuerte commented on issue #71: VFS-444: corrected ResourceFileProvider uri/path processing. URL: https://github.com/apache/commons-vfs/pull/71#issuecomment-526068310 I understand your point. The problem with this issue is that the current behavior is inconsistent, and that addressing the bug affects the inconstancy too. Either way, how about this. With the res: uri all leading slashes will be ignored. So, the following would basically be the same 1. `res:foo` 2. `res:/foo` 3. `res://foo` 4. `res:///foo` So despite 2. and 3. actually being incorrect according to the URI spec, they will be accepted as if there were 1./4. It does not matter for resource handling in any way. It's like how `ls -l /` and `ls -l ///////` produce the same result. The effect of making this change is that call sites which previously would get an exception about invalid URIs (so, not related to availability of resource) will now work and not throw an exception. There would be no cases where a call site previously worked, but now throws an exception. Referring to ResSchemeTestCase the following tests would need to be changed, as they would no longer throw an exception as they accept the same res: URI as resolveURI does: - test_resolveFile_String_S - test_resolveFile_String_SS - test_resolveFile_String_SSS - test_resolveFile_URI_S - test_resolveFile_URI_SS - test_resolveFile_URI_SSS
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
