# HG changeset patch # User gsm # Date 1247670318 -14400 # Node ID 78a96d1fe5573041e92dba53fdd640327b480aee # Parent 584da5a15e552788b11d4e09959005df7bdc5c72 6612541: api/javax_swing/text/LabelView/index.html#getXXX[LabelView0004] fails since JDK 7 b20 Reviewed-by: peterz diff -r 584da5a15e55 -r 78a96d1fe557 jdk/src/share/classes/javax/swing/text/GlyphView.java --- a/jdk/src/share/classes/javax/swing/text/GlyphView.java Sun Jul 12 06:07:50 2009 -0700 +++ b/jdk/src/share/classes/javax/swing/text/GlyphView.java Wed Jul 15 19:05:18 2009 +0400 @@ -719,8 +719,9 @@ checkPainter(); int p0 = getStartOffset(); int p1 = painter.getBoundedPosition(this, p0, pos, len); - return ((p1 > p0) && (getBreakSpot(p0, p1) != BreakIterator.DONE)) ? - View.ExcellentBreakWeight : View.BadBreakWeight; + return p1 == p0 ? View.BadBreakWeight : + getBreakSpot(p0, p1) != BreakIterator.DONE ? + View.ExcellentBreakWeight : View.GoodBreakWeight; } return super.getBreakWeight(axis, pos, len); }