On Wed, 28 Apr 2021 16:21:00 GMT, Roger Riggs <[email protected]> wrote:
>> Joe Wang has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Update the CSR. See Update 03 in the CSR
>
> src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/XMLSecurityManager.java
> line 264:
>
>> 262: int temp;
>> 263: if (Integer.class.isAssignableFrom(value.getClass())) {
>> 264: temp = (Integer)value;
>
> Why not use pattern matching?
> `if (value instanceof Integer intValue) {
> temp = intValue;
> }
Good question. Given that the earlier changes in the whole set (impl-specific
properties) were backported, I assumed this would too, to be complete. Code
consistency and clean backport may exceed the benefit of a more advanced code
feature (e.g. pattern matching).
I also am still doing works based on JDK 8, that provides a much quicker
turnaround.
Saw Patrick's pattern matching changesets for some lib code. It's possible we
could do it as well for the xml code. But in general, xml code, esp. those from
Apache support a lower source level.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3644