Project: SWT
Bug 118241 StyledText: getLineHeight(int) and getBaseline(int): code do not match spec
Reported: 2005-11-28 10:08:33 | Status: verified fixed

N20051127-0010 The Javadoc says: * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_RANGE when the offset is outside the valid range (< 0 or > getCharCount())</li> While the code tests: if (!(0 <= offset && offset < content.getCharCount())) { SWT.error(SWT.ERROR_INVALID_RANGE); Which one is correct?

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java