RFR: 8255255: Update Apache Santuario (XML Signature) to version 2.2.0 [v2]
Weijun Wang
weijun at openjdk.java.net
Sun Jan 10 15:24:59 UTC 2021
On Sun, 10 Jan 2021 04:55:38 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:
>> Weijun Wang has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.
>
> src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java line 196:
>
>> 194: @SuppressWarnings("deprecation")
>> 195: SignatureAlgorithmSpi result = implementingClass.newInstance();
>> 196: return result;
>
> A IDE may have a warning for the result value as it is not really necessary, except for the suppress warnings. Maybe, the @SuppressWarings could be placed in the method level. Just for your reference, go ahead with your preference.
I am using IntelliJ and there is not such a warning. I chose this style because that exactly where the suppressed warning happens and I don't want a reader to search for it.
That said, I'm now thinking of updating the `newInstance()` call with `getDeclaredConstructor().newInstance()`, as suggested by the `@deprecated` section of `newInstance()`. I'll also update to 2021.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1206
More information about the security-dev
mailing list