Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8146237

PREFER from Features API taking precedence over catalog file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • xml
    • None
    • 9
    • b107

      PREFER property set from Catalog API is taking precedence over the one set from catalog file.

      The following code throws CatalogException:
      CatalogFeatures features = CatalogFeatures.builder().with(CatalogFeatures.Feature.PREFER, "system").build();
      Catalog catalog = CatalogManager.catalog(features, RESOURCES + "catalog_file_precedence.xml");
      CatalogResolver catalogResolver = CatalogManager.catalogResolver(catalog);
      catalogResolver.resolveEntity("-//FOO//DTD XML Dummy V0.0//EN", "http://www.oracle.com/alt1sys.dtd").getSystemId();

      for the following catalog xml:
      <catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">

          <public publicId="-//FOO//DTD XML Dummy V0.0//EN"
                  uri="dummy.dtd"/>
      </catalog>

            joehw Joe Wang
            pchinnasamy Prabushankar Chinnasamy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: