HADOOP-14688. Intern strings in KeyVersion and EncryptedKeyVersion. Contributed by Xiao Chen.
This commit is contained in:
parent
ccd2ac60ec
commit
ad32759fd9
@ -71,8 +71,8 @@ public static class KeyVersion {
|
|||||||
|
|
||||||
protected KeyVersion(String name, String versionName,
|
protected KeyVersion(String name, String versionName,
|
||||||
byte[] material) {
|
byte[] material) {
|
||||||
this.name = name;
|
this.name = name == null ? null : name.intern();
|
||||||
this.versionName = versionName;
|
this.versionName = versionName == null ? null : versionName.intern();
|
||||||
this.material = material;
|
this.material = material;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,8 +81,9 @@ public static class EncryptedKeyVersion {
|
|||||||
protected EncryptedKeyVersion(String keyName,
|
protected EncryptedKeyVersion(String keyName,
|
||||||
String encryptionKeyVersionName, byte[] encryptedKeyIv,
|
String encryptionKeyVersionName, byte[] encryptedKeyIv,
|
||||||
KeyVersion encryptedKeyVersion) {
|
KeyVersion encryptedKeyVersion) {
|
||||||
this.encryptionKeyName = keyName;
|
this.encryptionKeyName = keyName == null ? null : keyName.intern();
|
||||||
this.encryptionKeyVersionName = encryptionKeyVersionName;
|
this.encryptionKeyVersionName = encryptionKeyVersionName == null ?
|
||||||
|
null : encryptionKeyVersionName.intern();
|
||||||
this.encryptedKeyIv = encryptedKeyIv;
|
this.encryptedKeyIv = encryptedKeyIv;
|
||||||
this.encryptedKeyVersion = encryptedKeyVersion;
|
this.encryptedKeyVersion = encryptedKeyVersion;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user