diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a2296469..3a789f139 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.18.18 + +* Fix an issue in the ADT trait validators that would sometimes fail validation while they shouldn't. + # 0.18.17 * Constraints applied to list or map members are now correctly rendered in the generated code. diff --git a/modules/protocol/src/smithy4s/meta/validation/AdtValidatorCommon.java b/modules/protocol/src/smithy4s/meta/validation/AdtValidatorCommon.java index 62b6c0f50..322e36495 100644 --- a/modules/protocol/src/smithy4s/meta/validation/AdtValidatorCommon.java +++ b/modules/protocol/src/smithy4s/meta/validation/AdtValidatorCommon.java @@ -51,7 +51,7 @@ ShapeId getReferencer() { private static List getReferences(Model model, Shape adtMemberShape, Shape adtParent) { return model.getMemberShapes().stream().flatMap(memberShape -> { - boolean doesMemberTargetAdtShape = memberShape.getTarget() == adtMemberShape.getId(); + boolean doesMemberTargetAdtShape = memberShape.getTarget().equals(adtMemberShape.getId()); boolean isMemberShapeInDesiredTarget = memberShape.getContainer().equals(adtParent.toShapeId()); if (doesMemberTargetAdtShape) { return Stream.of(new Reference(isMemberShapeInDesiredTarget, memberShape.getContainer()));