提交 dc508dc6 编写于 作者: P peterz

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

Reviewed-by: rupashka
上级 cf56726a
...@@ -438,8 +438,12 @@ public class SwingUtilities2 { ...@@ -438,8 +438,12 @@ public class SwingUtilities2 {
// c may be null here. // c may be null here.
String clipString = "..."; String clipString = "...";
availTextWidth -= SwingUtilities2.stringWidth(c, fm, clipString); availTextWidth -= SwingUtilities2.stringWidth(c, fm, clipString);
boolean needsTextLayout; if (availTextWidth <= 0) {
//can not fit any characters
return clipString;
}
boolean needsTextLayout;
synchronized (charsBufferLock) { synchronized (charsBufferLock) {
int stringLength = syncCharsBuffer(string); int stringLength = syncCharsBuffer(string);
needsTextLayout = needsTextLayout =
......
...@@ -520,9 +520,6 @@ java/math/BigInteger/ModPow65537.java generic-all ...@@ -520,9 +520,6 @@ java/math/BigInteger/ModPow65537.java generic-all
# jdk_misc # 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 # Need to be marked othervm, or changed to be samevm safe
com/sun/jndi/ldap/ReadTimeoutTest.java generic-all com/sun/jndi/ldap/ReadTimeoutTest.java generic-all
com/sun/jndi/rmi/registry/RegistryContext/UnbindIdempotent.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 ...@@ -1122,9 +1119,6 @@ sun/security/tools/keytool/selfissued.sh solaris-all
# jdk_swing (not using samevm) # 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 # Fails on solaris 11 i586, with othervm
javax/swing/JFileChooser/6570445/bug6570445.java generic-all javax/swing/JFileChooser/6570445/bug6570445.java generic-all
javax/swing/JFileChooser/6738668/bug6738668.java generic-all javax/swing/JFileChooser/6738668/bug6738668.java generic-all
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
@run main Test6635110 @run main Test6635110
*/ */
import com.sun.java.swing.plaf.gtk.GTKLookAndFeel;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
...@@ -59,7 +58,12 @@ public class Test6635110 implements Runnable { ...@@ -59,7 +58,12 @@ public class Test6635110 implements Runnable {
} }
public static void main(String[] args) throws Exception { 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()); SwingUtilities.invokeAndWait(new Test6635110());
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册