Community
Participate
Working Groups
Build 20030218 When using Java text search with pattern 'SIGNATURE' in case INsensitive mode and working set 'jdtcore', it will not find exact case match in IIndexConstants.
Problem is in IndexSummary.getFirstBlockLocationForPrefix(char[], boolean). In case insensitive mode, it should not stop on the first block it finds, but it should look for all possible blocks. For example, if you have the following blocks: - AA +- Aa +- Ab - aa + aA + ab and you search for 'ab' in case insentitive mode, it will only search in block AA.
Indeed, in case sensitive mode, it behaves ok. In case insensitive mode, multiple blocks could match the pattern, and a dichotomic search may only find one of them (somewhat random). In case insensitive mode, it should iterate over the entire summary on detect all starting blocks, then walk them all.
Put the old code back which first finds all matching entries of the same kind, then does the case insensitive match with the entered name. With the way the blocks are stored in the index its not possible to search them affectively using a case insensitive comparison. The blocks are ordered: aaa aab abb baa bab ... zzz Aaa ...
Just curious: do you remember why the new code was introduced in the first place? Was this for optimization?
Ok, in case insensitive mode the only prefix used is case sensitive (/methodRef). Will walk more entries, but this is the old behavior and our index encoding doesn't allow much more at this point.
Verified.