JDK-8014863 : Line break calculations in Java 7 are incorrect.
  • Type: Bug
  • Component: client-libs
  • Affected Version: 7,8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-05-20
  • Updated: 2014-08-21
  • Resolved: 2013-05-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u40Fixed 8 b93Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Run HTMLEditorTest which will display a frame with a HTMLEditorKit backed
JEditorPane.

Inorder to see as described below, do not resize the Window.
Insert the cursor before the first qqqq in the text.

Step 1 type "o"
Expected: The last pp in the first line is moved to the next line.
Actual: The last pp is moved to the next line, but it is proceeded by a
space.

Step 2 type "n"
Expected: n is added after the o
Actual: n is added after the o, but also the last q in the last qqqq on the
first line is moved to the next line.

Step 3 type "e tw".
Expected: the last qqqq is moved to the next line.
Actual: Everything after the first qqqq is moved to the next line. 
Comments
When a document contains several elements and some text is inserted, only the views around the insertion are updated. The other views, (e.g. GlyphView) keep using the previously calculated break points. This will cause an incorrect line break calculation. Suggested fix: GlyphView should not cache the break points.
22-05-2013