-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Area: RepositoriesRelates to the `ITopicRepository` interface or one of its implementations.Relates to the `ITopicRepository` interface or one of its implementations.Priority: 2Severity 1: MinorStatus 2: ScheduledPlanned for an upcoming release.Planned for an upcoming release.Type: BugBehavior that is inconsistent with documented or expected behavior.Behavior that is inconsistent with documented or expected behavior.
Milestone
Description
When SqlTopicRepository,Load()
can't find a Topic
, it throws a TopicNotFoundException
. When CachedTopicRepository.Load()
can't find a topic, it returns null
. In fact, the signature for Load()
on SqlTopicRepository
returns a Topic
, whereas the signature for Load()
on CachedTopicRepository
(and, incidentally, ITopicRepository
) returns a Topic?
.
There are good arguments for returning null
vs. throwing an exception here. But the behavior and the return type nullability should be consistent—or, at least, clearly documented. That said, updating this behavior is a breaking change, and so this may need to wait until OnTopic 6.0.0.
Metadata
Metadata
Assignees
Labels
Area: RepositoriesRelates to the `ITopicRepository` interface or one of its implementations.Relates to the `ITopicRepository` interface or one of its implementations.Priority: 2Severity 1: MinorStatus 2: ScheduledPlanned for an upcoming release.Planned for an upcoming release.Type: BugBehavior that is inconsistent with documented or expected behavior.Behavior that is inconsistent with documented or expected behavior.