Community
Participate
Working Groups
build 20011025 The redrawRange API does not check for invalid ranges specified by the arguments. All other StyledText API does check the range and throws an IllegalArgumentException when it is not valid. When the default StyledTextContent is used the content does the range check and throws the exception. However, this is not spec'd at the StyledText level and other StyledTextContent won't throw the exception. Changing this would be a breaking API change since clients may expect their own exceptions getting thrown at the content level.
If the contract between StyledText and the StyledTextContent states that the content should throw the exception, then you probably don't need to do anything. However, if you aren't requiring the content to do it, then you should handle it. Check with the known content providers to see what they do. If no one currently would be broken by the change, then you can just go ahead and make it. Make sure the javadoc is updated.
Sent Kai email making sure this change won't affect him. Waiting for response.
Haven't heard anything from Kai against doing this. Go ahead and put in the check.
Fixed in the latest. redrawRange now has the same range check as the other API (except for getText which has a different range check to be compatible with RichText).