Commit 64813c7
committed
Bug fix: Validate individual topics, not parent topic
Previously, the `validationDelegate()` was being prior to looping over children. As a result, the parent topic was being validated after it had already been mapped in order to determine if the children themselves should be mapped. There are scenarios where this makes sense, but is not the intuitive expectation and precludes quite a few scenarios. Further, the behavior was counter to the documentation.
Notably, this made it very difficult to prevent one children among many from being excluded based on an attribute such as its content type since the logic was always evaluated on the parent. I.e., all children could be excluded based on their parent's attribute, but not based on their individual attributes. That's a far more likely scenario for most cases, and the one implied by the documentation.
Technically, this bug fix could be a breaking change. As we have visibility into all current implementations of `HierarchicalTopicMappingService<T>`, however, we have high confidence that the only scenarios that this will break are internal to OnTopic, and don't affect any client implementations. And that makes sense, as it's likely that anyone attempting to implement this would have tripped over the unintuitive and even buggy logic, thus necessitating that this be patched previously.1 parent d63f2b5 commit 64813c7
1 file changed
Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
| 192 | + | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
0 commit comments