[jdk11u-dev] Integrated: 8289511: Improve test coverage for XPath Axes: child

Sonia Zaldana Calles szaldana at openjdk.org
Wed Nov 29 15:36:27 UTC 2023


On Mon, 30 Oct 2023 20:36:35 GMT, Sonia Zaldana Calles <szaldana at openjdk.org> wrote:

> This backport contains [cfe9026fe0506488cc0f0557299cfa585811d194](https://github.com/openjdk/jdk/commit/cfe9026fe0506488cc0f0557299cfa585811d194). 
> 
> Patch does not apply cleanly. Notably, I made a change in how the string XML is initialized.
> Original commit uses triple quotes which are not yet enabled in jdk 11. I am adding the relevant differences below. 
> Test passes.
> 
> 
> diff --git a/test/jaxp/javax/xml/jaxp/unittest/xpath/XPathExpChildTest.java b/test/jaxp/javax/xml/jaxp/unittest/xpath/XPathExpChildTest.java
> index 00d6002209f..6f06192c44e 100644
> --- a/test/jaxp/javax/xml/jaxp/unittest/xpath/XPathExpChildTest.java
> +++ b/test/jaxp/javax/xml/jaxp/unittest/xpath/XPathExpChildTest.java
> @@ -45,19 +45,20 @@ import java.io.InputStream;
>   */
>  public class XPathExpChildTest {
>  
> -    private static final String XML =
> -            "<store>\n" +
> -            "   <book id="1" lang="en">\n" +
> -            "       <title/>\n" +
> -            "       <author id="1"/>\n" +
> -            "       <isbn>1234</isbn>\n" +
> -            "   </book>\n" +
> -            "   <book id="2" lang="en">\n" +
> -            "       <title/>\n" +
> -            "       <author id="2"/>\n" +
> -            "       <isbn>5678</isbn>\n" +
> -            "   </book>\n" +
> -            "</store>";
> +    private static final String XML = """
> +            <store>
> +               <book id="1" lang="en">
> +                  <title/>
> +                  <author id="1"/>
> +                  <isbn>1234</isbn>
> +               </book>
> +               <book id="2" lang="en">
> +                  <title/>
> +                  <author id="2"/>
> +                  <isbn>5678</isbn>
> +               </book>
> +            </store>
> +            """;
>      private static final String AUTHOR_1 = "author_1";
>      private static final String AUTHOR_2 = "author_2";
>      private static final Document doc;

This pull request has now been integrated.

Changeset: ac1764dc
Author:    Sonia Zaldana Calles <szaldana at openjdk.org>
Committer: Thomas Stuefe <stuefe at openjdk.org>
URL:       https://git.openjdk.org/jdk11u-dev/commit/ac1764dcd1ef314a67d938cb6adea2a9b473b162
Stats:     236 lines in 1 file changed: 236 ins; 0 del; 0 mod

8289511: Improve test coverage for XPath Axes: child

Reviewed-by: aph, andrew
Backport-of: cfe9026fe0506488cc0f0557299cfa585811d194

-------------

PR: https://git.openjdk.org/jdk11u-dev/pull/2243


More information about the jdk-updates-dev mailing list