private TraitDefinition.ChangeType isChangeBreaking(TraitDefinition.ChangeType type, Node left, Node right) {
            switch (type) {
                case ADD:
                    return left.isNullNode() && !right.isNullNode() ? type : null;
                case REMOVE:
                    return right.isNullNode() && !left.isNullNode() ? type : null;
                case UPDATE:
                    return !left.isNullNode() && !right.isNullNode() && !left.equals(right) ? type : null;
                case ANY:
                    for (TraitDefinition.ChangeType checkType : ANY_TYPES) {
                        if (isChangeBreaking(checkType, left, right) != null) {
                            return checkType;
                        }
                    }
                    return null;
                case PRESENCE:
                    for (TraitDefinition.ChangeType checkType : PRESENCE_TYPES) {
                        if (isChangeBreaking(checkType, left, right) != null) {
                            return checkType;
                        }
                    }
                default:
                    return null;
            }
        }
Finds breaking changes related to when a trait is added, removed, or
updated based on the breakingChanges property of traits.
smithy-diff/src/main/java/software/amazon/smithy/diff/evaluators/TraitBreakingChange.java