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.
1public void getUserMetaDataNoncompliant(ObjectMetadata objectMetadata) {
2 // Noncompliant: the metadata key contains an uppercase letter.
3 objectMetadata.getUserMetaDataOf("Key");
4}
1public void getUserMetaDataCompliant(ObjectMetadata objectMetadata) {
2 // Compliant: the metadata key only contains lowercase letters.
3 objectMetadata.getUserMetaDataOf("key");
4}