On Fri, 27 Oct 2023 20:41:59 GMT, Naoto Sato <na...@openjdk.org> wrote:
>> Joe Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Impl CSR Changes: change the parameter type from String to Enum > > src/java.xml/share/classes/javax/xml/catalog/CatalogResolver.java line 283: > >> 281: return type; >> 282: } >> 283: } > > Instead of looping through all the elements, `Enum.valueOf()` can be used > (and it appropriately throws IAE if not found). Thanks. Added IAE. Enum.valueOf() is nice. However, in this case, the Enum type is mapped to the resolve property that was defined to be case sensitive. It would therefore require validating the case and then convert it to upper case before calling valueOf. While the current impl requires loop, it uses toString() that's mapped to the resolve property. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16045#discussion_r1375090816