Compare commits

..

No commits in common. "6b85e63c14704ab654af0945cb872762b16b60f8" and "eeb3ba970c34d6fda3924abdc382d2f621739992" have entirely different histories.

2 changed files with 12 additions and 14 deletions

View File

@ -106,12 +106,10 @@ class ObjectMD {
},
'key': '',
'location': null,
// versionId, isNull, nullVersionId and isDeleteMarker
// should be undefined when not set explicitly
'isNull': undefined,
'nullVersionId': undefined,
'isDeleteMarker': undefined,
'versionId': undefined,
'isNull': '',
'nullVersionId': '',
'isDeleteMarker': '',
'versionId': undefined, // If no versionId, it should be undefined
'tags': {},
'replicationInfo': {
status: '',
@ -607,7 +605,7 @@ class ObjectMD {
* @return {boolean} Whether new version is null or not
*/
getIsNull() {
return this._data.isNull || false;
return this._data.isNull;
}
/**
@ -624,7 +622,7 @@ class ObjectMD {
/**
* Get metadata nullVersionId value
*
* @return {string|undefined} The version id of the null version
* @return {string} The version id of the null version
*/
getNullVersionId() {
return this._data.nullVersionId;
@ -647,7 +645,7 @@ class ObjectMD {
* @return {boolean} Whether object is a delete marker
*/
getIsDeleteMarker() {
return this._data.isDeleteMarker || false;
return this._data.isDeleteMarker;
}
/**
@ -664,7 +662,7 @@ class ObjectMD {
/**
* Get metadata versionId value
*
* @return {string|undefined} The object versionId
* @return {string} The object versionId
*/
getVersionId() {
return this._data.versionId;
@ -674,7 +672,7 @@ class ObjectMD {
* Get metadata versionId value in encoded form (the one visible
* to the S3 API user)
*
* @return {string|undefined} The encoded object versionId
* @return {string} The encoded object versionId
*/
getEncodedVersionId() {
return VersionIDUtils.encode(this.getVersionId());

View File

@ -60,11 +60,11 @@ describe('ObjectMD class setters/getters', () => {
['Key', 'key'],
['Location', null, []],
['Location', ['location1']],
['IsNull', null, false],
['IsNull', null, ''],
['IsNull', true],
['NullVersionId', null, undefined],
['NullVersionId', null, ''],
['NullVersionId', '111111'],
['IsDeleteMarker', null, false],
['IsDeleteMarker', null, ''],
['IsDeleteMarker', true],
['VersionId', null, undefined],
['VersionId', '111111'],