-
Bug
-
Resolution: Fixed
-
P3
-
20
-
b21
-
b27
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
Linux x64
A DESCRIPTION OF THE PROBLEM :
The test case shows a Swing JLabel with a two-column HTML table (from a generated file list item tooltip). The closing tags of HTML <tr> <th> <td> elements are optional by the spec, and here they are omitted. Java 6 thru 19 have never given me grief about omitted tags. Testing in JDK 20 EA Build 22, the table is completely mangled unless I add the closing tags.
REGRESSION : Last worked in version 19.0.1
---------- BEGIN SOURCE ----------
import javax.swing.*;
class SwingHtmlTable {
SwingHtmlTable() {
try {
UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
} catch (Exception e) {
throw new RuntimeException(e);
}
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
String html = "<html><table>" +
"<tr><th align=right>Name:<td>sync-001.mp4" +
"<tr><th align=right>Modified:<td>2017-Jul-31, 00:14:55" +
"<tr><th align=right>File size:<td>3.1 MB" +
"<tr><th align=right>Duration:<td>1m03s" +
"<tr><th align=right>Video:<td>854 x 480 - 16:9 - 30.0 fps - 271 kbps - H.264 / AVC" +
"<tr><th align=right>Audio:<td>Stereo - 44100 Hz - 123 kbps - AAC";
JLabel label = new JLabel(html);
frame.add(label);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
public static void main(String... args) {
SwingUtilities.invokeLater(SwingHtmlTable::new);
}
}
---------- END SOURCE ----------
FREQUENCY : always
Linux x64
A DESCRIPTION OF THE PROBLEM :
The test case shows a Swing JLabel with a two-column HTML table (from a generated file list item tooltip). The closing tags of HTML <tr> <th> <td> elements are optional by the spec, and here they are omitted. Java 6 thru 19 have never given me grief about omitted tags. Testing in JDK 20 EA Build 22, the table is completely mangled unless I add the closing tags.
REGRESSION : Last worked in version 19.0.1
---------- BEGIN SOURCE ----------
import javax.swing.*;
class SwingHtmlTable {
SwingHtmlTable() {
try {
UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
} catch (Exception e) {
throw new RuntimeException(e);
}
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
String html = "<html><table>" +
"<tr><th align=right>Name:<td>sync-001.mp4" +
"<tr><th align=right>Modified:<td>2017-Jul-31, 00:14:55" +
"<tr><th align=right>File size:<td>3.1 MB" +
"<tr><th align=right>Duration:<td>1m03s" +
"<tr><th align=right>Video:<td>854 x 480 - 16:9 - 30.0 fps - 271 kbps - H.264 / AVC" +
"<tr><th align=right>Audio:<td>Stereo - 44100 Hz - 123 kbps - AAC";
JLabel label = new JLabel(html);
frame.add(label);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
public static void main(String... args) {
SwingUtilities.invokeLater(SwingHtmlTable::new);
}
}
---------- END SOURCE ----------
FREQUENCY : always