I’ve come across a difference between handling of returned directories between 3.3.0 and 4.3.5.
Could I get help understanding if I am mistaken in how I am approaching this or if this might be a bug?
The following is what I see using 4.3.5-
This method is called as follows:
listFromClassLoader("<some path>", true, false, true);
The following logic is in this method:
if (urlExternalForm.startsWith(“jar:file:”) && urlExternalForm.contains("!")) {
//We can search the jar directly
.
.
.
else
//fall back to seeing if the stream lists sub-directories
.
.
.
}
If what I want back from this call is a directory, this method returns the directory with a trailing ‘/’ in the ‘if’ flow. It returns a directory without the trailing ‘/’ in the else flow.
I correct for this in my consuming code by removing the trailing ‘/’ if it exists.
We did not experience this is 3.3.0. I understand there was work to normalize pathing across operating systems between 3.3.0 and 4.3.5.
Am I missing something that would give me the same result in either path?
Or, is this a bug?