[jdk11u-dev] Integrated: 8315606: Open source few swing text/html tests
Sonia Zaldana Calles
szaldana at openjdk.org
Wed Nov 29 15:37:25 UTC 2023
On Fri, 27 Oct 2023 17:02:16 GMT, Sonia Zaldana Calles <szaldana at openjdk.org> wrote:
> Hi all,
> This pull request contains a backport of commit [4127fbb9ed6ca3c3e82da599dbf9cee54de5da31](https://github.com/openjdk/jdk/commit/4127fbb9ed6ca3c3e82da599dbf9cee54de5da31).
>
> Patch doesn't apply cleanly. There are some slight changes in test/jdk/javax/swing/text/html/ImageView/bug4329185.java regarding pattern matching for instanceof. Pattern matching was introduced in Java 14, so it raises a compilation error. I resolved by adding some casting.
>
>
> diff --git a/test/jdk/javax/swing/text/html/ImageView/bug4329185.java b/test/jdk/javax/swing/text/html/ImageView/bug4329185.java
> index 6338e395d45..da43b8b80dc 100644
> --- a/test/jdk/javax/swing/text/html/ImageView/bug4329185.java
> +++ b/test/jdk/javax/swing/text/html/ImageView/bug4329185.java
> @@ -103,8 +103,7 @@ public class bug4329185 {
> public View create(Element elem) {
> Object o = elem.getAttributes()
> .getAttribute(StyleConstants.NameAttribute);
> - if (o instanceof HTML.Tag) {
> - HTML.Tag kind = (HTML.Tag) o;
> + if (o instanceof HTML.Tag kind) {
> if (kind == HTML.Tag.IMG) {
> View v = super.create(elem);
> views[i++] = v;
This pull request has now been integrated.
Changeset: 4ddc5d74
Author: Sonia Zaldana Calles <szaldana at openjdk.org>
Committer: Thomas Stuefe <stuefe at openjdk.org>
URL: https://git.openjdk.org/jdk11u-dev/commit/4ddc5d74c58f17eef204ddf863d866fb1c76b449
Stats: 399 lines in 4 files changed: 399 ins; 0 del; 0 mod
8315606: Open source few swing text/html tests
Reviewed-by: aph, andrew
Backport-of: 4127fbb9ed6ca3c3e82da599dbf9cee54de5da31
-------------
PR: https://git.openjdk.org/jdk11u-dev/pull/2234
More information about the jdk-updates-dev
mailing list