Skip to content

Commit 7e1b1ab

Browse files
committed
Fixed AwsResolver.CreateProperties() to use logical OR condition when checking for Amazon.Lambda.CloudWatchEvents.CloudWatchEvent type.
1 parent eb7e990 commit 7e1b1ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Libraries/src/Amazon.Lambda.Serialization.Json/AwsResolver.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ protected override IList<JsonProperty> CreateProperties(Type type, MemberSeriali
130130
}
131131
}
132132
}
133+
// If user is directly using CloudWatchEvent class or using a derived type created in custom namespace.
133134
else if (type.FullName.StartsWith("Amazon.Lambda.CloudWatchEvents.")
134-
&& (type.GetTypeInfo().BaseType?.FullName?.StartsWith("Amazon.Lambda.CloudWatchEvents.CloudWatchEvent`",
135+
|| (type.GetTypeInfo().BaseType?.FullName?.StartsWith("Amazon.Lambda.CloudWatchEvents.CloudWatchEvent`",
135136
StringComparison.Ordinal) ?? false))
136137
{
137138
foreach (JsonProperty property in properties)

0 commit comments

Comments
 (0)