Community
Participate
Working Groups
Build Identifier: 20090920-1017 According to the documentation for Text#getTextLimit, if the max number of characters that the receiver is capable of holding has not been changed by calling setTextLimit(), the result of the method will be the constant Text.LIMIT. On both Windows Vista and Windows 7, however, this does not appear to be the case. The value of the Text.LIMIT constant ends up being 2147483647, and the value returned by getTextLimit (with no previous invocations of setTextLimit) is 2147483646. Reproducible: Always Steps to Reproduce: 1. Create an instance of org.eclipse.swt.widgets.Text. 2. Call Text#getTextLimit and compare the returned value with the constant Text.LIMIT. 3. Verify that the two values differ, despite documentation indicating otherwise.
Created attachment 168821 [details] Test case illustrating bug
This is the code that initializes Text.LIMIT * These values can be different on different platforms. * Therefore they are not initialized in the declaration * to stop the compiler from inlining. */ static { LIMIT = OS.IsWinNT ? 0x7FFFFFFF : 0x7FFF; DELIMITER = "\r\n"; } it is over 10 years old, I guess things changed a bit since the code was first written.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.