Case sensitive keys in S3 object user metadata High

An uppercase character was detected in the user metadata key. User metadata keys are case insensitive and are returned as lowercase strings, even if they were originally specified with uppercase strings.

Detector ID

Noncompliant example

1public void getUserMetaDataNoncompliant(ObjectMetadata objectMetadata) {
2    // Noncompliant: the metadata key contains an uppercase letter.
3    objectMetadata.getUserMetaDataOf("Key");

Compliant example

1public void getUserMetaDataCompliant(ObjectMetadata objectMetadata) {
2    // Compliant: the metadata key only contains lowercase letters.
3    objectMetadata.getUserMetaDataOf("key");