SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

Mantis - Squeak
Viewing Issue Advanced Details
6366 Collections minor always 03-23-07 00:10 04-18-10 22:05
nicolas cellier  
none trunk  
0006366: [BUG] WideString findString:startingAt: and other matchTable problems
self assert:
    ((WideString with: 300 asCharacter with: 400 asCharacter)
        findString: (WideString with: 300 asCharacter) startingAt: 1)
    = 1.

fails with an exception
Because underlying algorithm use CaseSensitiveOrder matchTable which is single byte based...

1) either outOfBounds error should be handled
2) or a ifAbsent: block argument provided to the matchTable
3) or a more ellaborate class be used (maybe a WideCharacterDictionary like WideCharacterSet patch at [^]

This bug is also related to [^]
related to 0005331closed andreas 'abc' beginsWith: 'ab' asWideString (returns wrong result) 
related to 0003574closed andreas String>>findFirstInString:inSet:startingAt: does not work if character of interest is last character in String, also WideString 
related to 0006579closed nicolas cellier String>>#findLastOccuranceOfString:startingAt: isBuggedWhen: [substring first=substring last] 
 Collection-WideString-findSubstring-Patch.1.cs [^] (6,579 bytes) 07-27-07 22:18
 Collection-WideString-findSubstring-Test.1.cs [^] (2,017 bytes) 07-27-07 22:52

nicolas cellier   
07-27-07 22:53   
A test and patch are provided here.
Please, someone check...
nicolas cellier   
03-24-08 22:08   
"fix begin"
Installer mantis bug: 6366 fix:'Collection-WideString-findSubstring-Patch.1.cs'.
"fix test"
Installer mantis bug: 6366 fix:'Collection-WideString-findSubstring-Test.1.cs'.
"fix end"

nicolas cellier   
10-03-09 19:37   
Fixed in [^]