Skip to content

Commit

Permalink
Fix other equality checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Baccata committed May 30, 2024
1 parent 43faffb commit a9a8206
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private Optional<UnionShape> asProtoInlinedOneOf(Shape shape) {

private Stream<StructureShape> shapeUsingUnionMembers(Model model, UnionShape union) {
return model.getMemberShapes().stream().flatMap(m -> {
if (m.getTarget() == union.getId()) {
if (m.getTarget().equals(union.getId())) {
return OptionHelper.toStream(model.getShape(m.getContainer()).flatMap(Shape::asStructureShape));
} else {
return Stream.empty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public List<ValidationEvent> validate(Model model) {
for (Shape shape : model.getShapesWithTrait(DataExamplesTrait.class)) {
DataExamplesTrait trt = shape.getTrait(DataExamplesTrait.class).get();
for (DataExamplesTrait.DataExample example : trt.getExamples()) {
if (example.getExampleType() == DataExamplesTrait.DataExampleType.SMITHY) {
if (example.getExampleType().equals(DataExamplesTrait.DataExampleType.SMITHY)) {
NodeValidationVisitor visitor = createVisitor(example.getContent(), model, shape);
events.addAll(shape.accept(visitor));
}
Expand Down

0 comments on commit a9a8206

Please sign in to comment.