Hi, Vladislav.
Is it possible to provide an automated test for this change?
On 11/28/19 2:08 am, Volodin, Vladislav wrote:
Hello everyone,
I'd like to contribute a little improvement to javax/swing/text/html/CSS. The issue is
that "font-size: 100%" throws NumberFormatException for 100%, because of a
wrong execution path. It is possible to reproduce the issue with the code below (but you
should create Java exception breakpoints to see the place):
package com.test;
import javax.swing.text.MutableAttributeSet;
import javax.swing.text.SimpleAttributeSet;
import javax.swing.text.html.CSS;
import javax.swing.text.html.StyleSheet;
public class Main {
public static void main(String[] args) {
StyleSheet ss = new StyleSheet();
MutableAttributeSet attr = new SimpleAttributeSet();
ss.addCSSAttribute(attr, CSS.Attribute.FONT_SIZE, "100%");
}
}
Bug: https://bugs.openjdk.java.net/browse/JDK-8234913
Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8234913.0/
Kind regards,
Vlad
--
Best regards, Sergey.