public String getValue() { if (this.value == null) { return value; } /* * Ensure that the value is only decrypted once regardless of usage. This prevents KMS from * being called over and over from within the function to decrypt the same field. */ if (!this.decrypted) { try { this.value = Passwords.decrypt(this.value, Region.getRegion(this.region)); } catch (UnsupportedEncodingException e) { throw new ConfigurationException("Unable to decrypt", e); } this.decrypted = true; } return this.value; }
public String getValue() { if (this.value == null) { return value; } /* * Ensure that the value is only decrypted once regardless of usage. This prevents KMS from * being called over and over from within the function to decrypt the same field. */ if (!this.decrypted) { try { this.value = Passwords.decrypt(this.value, Region.getRegion(this.region)); } catch (UnsupportedEncodingException e) { throw new ConfigurationException("Unable to decrypt", e); } this.decrypted = true; } return this.value; }