6959260: javax/swing/JLabel/6501991/bug6501991.java failed on build 1.7.0-ea-b96

Reviewed-by: rupashka
This commit is contained in:
Peter Zhelezniakov 2010-06-22 14:36:46 +04:00
parent 3cd3bb0958
commit c24951c366
3 changed files with 11 additions and 9 deletions

View File

@ -438,8 +438,12 @@ public class SwingUtilities2 {
// c may be null here.
String clipString = "...";
availTextWidth -= SwingUtilities2.stringWidth(c, fm, clipString);
boolean needsTextLayout;
if (availTextWidth <= 0) {
//can not fit any characters
return clipString;
}
boolean needsTextLayout;
synchronized (charsBufferLock) {
int stringLength = syncCharsBuffer(string);
needsTextLayout =

View File

@ -520,9 +520,6 @@ java/math/BigInteger/ModPow65537.java generic-all
# jdk_misc
# On Windows com.sun.java.swing.plaf.gtk does not exist, always fails there
com/sun/java/swing/plaf/gtk/Test6635110.java windows-all
# Need to be marked othervm, or changed to be samevm safe
com/sun/jndi/ldap/ReadTimeoutTest.java generic-all
com/sun/jndi/rmi/registry/RegistryContext/UnbindIdempotent.java generic-all
@ -1122,9 +1119,6 @@ sun/security/tools/keytool/selfissued.sh solaris-all
# jdk_swing (not using samevm)
# Fails on solaris 10 sparc, throws RuntimeException that just says "failed"
javax/swing/JLabel/6501991/bug6501991.java generic-all
# Fails on solaris 11 i586, with othervm
javax/swing/JFileChooser/6570445/bug6570445.java generic-all
javax/swing/JFileChooser/6738668/bug6738668.java generic-all

View File

@ -28,7 +28,6 @@
@run main Test6635110
*/
import com.sun.java.swing.plaf.gtk.GTKLookAndFeel;
import javax.swing.*;
import java.awt.*;
import java.awt.image.BufferedImage;
@ -59,7 +58,12 @@ public class Test6635110 implements Runnable {
}
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new GTKLookAndFeel());
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
} catch (Exception e) {
System.out.println("GTKLookAndFeel cannot be set, skipping this test");
return;
}
SwingUtilities.invokeAndWait(new Test6635110());
}
}