Skip to content
Commit bdc1382a authored by Alex Klyubin's avatar Alex Klyubin
Browse files

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.

Bug: 18088752
Change-Id: I6d62eb67f904a15782673d16bcdae240cdc8f979
parent a194eb9b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment