diff options
author | Alex Klyubin <klyubin@google.com> | 2015-05-18 12:59:43 -0700 |
---|---|---|
committer | Alex Klyubin <klyubin@google.com> | 2015-05-18 12:59:43 -0700 |
commit | 2cd7673d6e4428338d0b75953a634df552eb08e2 (patch) | |
tree | 18360e66faa3799e4a64fab54e8c7fe2de85e272 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | beda8613ad7bc01affa17857faed04d9589db34c (diff) |
Switch from getSpi to getCurrentSpi.
Crypto primitives' getSpi has a side-effect which modifies the state
of the primitive: it selects an SPI implementation if it hasn't been
selected yet (e.g., Cipher.getInstance("AES") doesn't select an SPI
implementation until Cipher.init). The new method getCurrentSpi has
no side-effects: it simply returns null if no SPI implementation is
selected. The switch to getCurrentSpi lets us avoid side-effects and
throw a more pertinent exception when no SPI is yet selected.
(cherry-picked from bdc1382ac575a06c98cab69117700e081c90c595)
Bug: 18088752
Change-Id: Ib369c7e988329315075aa4e18f720d86f3d96a93
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions