On 12/04/2019 13:13, Mark Thomas wrote:
> On 12/04/2019 09:56, Mark Thomas wrote:
>> On 12/04/2019 01:32, Igal Sapir wrote:
>>> Mark,
>>>
>>> I just realized that you refactored my fix for the false positive unit test
>>> [1] a while ago.  Unfortunately your refactoring still shows false
>>> positives if the path of the command prompt has a lower-cased driver
>>> letter, e.g.
>>>
>>> expected:<jar:war:file:/[E]:/Workspace/Test/apa...> but
>>> was:<jar:war:file:/[e]:/Workspace/Test/apa...>
>>>
>>>
>>> I pushed a different fix earlier, prior to noticing your refactoring (TBH I
>>> thought that I never pushed the fix in the first place), which does an
>>> equalsIgnoreCase() [2]
>>>
>>> The only unit tests where I experience this issue
>>> are TestAbstractArchiveResource.java and TestFileResource.java and the
>>> problem seems to be with the Driver Letter which appears in brackets, e.g.
>>> [E] vs. [e].
>>>
>>> If you think that a full case-insensitive comparison is not right then I
>>> can  modify only the drive letter if the pattern "jar:war:file:/[X]" is
>>> found.
>>>
>>> Any thoughts?
>>
>> The test failure indicates that something isn't using canonical paths
>> when it should. Lets see if we can figure out where and then decide how
>> best to fix it.
>>
>> For reference, as well as refactoring the tests I made this change:
>> https://github.com/apache/tomcat/commit/d63695a656f04e39bd1ad4dee0f2339b0e3b898f#diff-ec06eb37e0fee8269d835107dedf7a90
>>
>> which triggered a regression hence this additional change:
>> https://github.com/apache/tomcat/commit/ad60947e42e666dc9c9d77315787ea9bb567e3fd#diff-ec06eb37e0fee8269d835107dedf7a90
>>
>> I wonder if this failure is related.
>>
>> I'm going to look at this now. If it doesn't take too long, I;d like to
>> get this fixed before 9.0.19.
> 
> The bug is in ContextConfig but it is proving a little tricky to address
> as there are lots of edge cases where we need to be careful.
> 
> I'll leave the current work-around for the test in place and look at
> this again after the 9.0.19 tag.

For the benefit of the archives, this is the command I used to get a
Windows command prompt using a lower case letter:

C:\Windows\System32\cmd.exe /K "cd /d c:\"

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to