JDK-8005277 : Regression in JDK 7 in Bidi implementation
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-12-19
  • Updated: 2013-06-26
  • Resolved: 2012-12-31
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
7u40 b10Fixed 8Fixed
Description
The following shows a regression in the JDK 7 Bidi algorithm which is affecting FX.

import java.text.*;

public class biditest {
 public static void main(String args[]) {
   printRuns("\u05D0\u05D1\u05D2");
 }

 static void printRuns(String string) {
    Bidi bidi = new Bidi(string, Bidi.DIRECTION_LEFT_TO_RIGHT);
    for (int i = 0, count = bidi.getRunCount(); i < count; i++) {
        System.out.println("Run=" + i + " start=" + bidi.getRunStart(i) + " end=" + bidi.getRunLimit(i) + " level=" + bidi.getRunLevel(i));
    }
 }
}

 /java/re/jdk/6u32/promoted/all/b05/binaries/solaris-sparc/bin/java -client biditest
Run=0 start=0 end=3 level=1
rincewind 114%  /java/re/jdk/7/promoted/fcs/b148/binaries/solaris-sparc/bin/java biditest
Run=0 start=0 end=3 level=0
 /java/re/jdk/8/promoted/latest/binaries/solaris-sparc/bin/java -client biditest
Run=0 start=0 end=3 level=0