DESCRIPTION

Add IAE guard around calls to getStyleRangeAtOffset

This follows the same pattern as guards added around
calls to getOffsetAtLocation

Bug: 367937
Change-Id: I0c6b83748ad56216726b02032bfbff088042d05c


COMMENTS

author: Jaidyn Nichols
date: 2012-01-05 21:05:51.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2012-01-05 21:25:56.000000000

Patch Set 3:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/2238/ 

-------------------------------------
author: Brenden Conley
date: 2012-01-05 21:40:25.000000000

Patch Set 3: Build Successful

Build Successful 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/2238/ : SUCCESS

-------------------------------------
author: Sebastian Porter
date: 2012-01-06 09:15:26.000000000

Patch Set 3: I would prefer that you didn't submit this

In this case you don't need to catch the IAE: 'o' is an offset and hence you can simply check that it's not exceeding the text:

StyleRange r= null;
if (o < t.getCharCount())
	r= t.getStyleRangeAtOffset(o);

-------------------------------------
