?:
如果 ?: 左边表达式非空,elvis操作符就会返回左边的结果,否则返回右边的结果。
readFromStorage() ?: throw InvalidSeedException(Throwable("Master is null"))
public static String toHexString(byte[] data) { return data == null ? "" : Hex.toHexString(data); }