RFR: 1951: Refactor Issue class hierarchy

Erik Joelsson erikj at openjdk.org
Wed Jun 21 08:57:39 UTC 2023


On Tue, 20 Jun 2023 19:27:08 GMT, Zhao Song <zsong at openjdk.org> wrote:

> Furthermore, regarding setting or getting the state of an IssueTrackerIssue or a Pull Request, we currently utilize `Issue.State.XXX`. However, I think it might be better to use `IssueTrackerIssue.State.XXX` and `PullRequest.State.XXX`.

Not sure if you mean that we should have separate state enums for `IssueTrackerIssue` and `PullRequest` or if you are just wanting to save an import by referencing the enum through the sub interfaces. If the former, then if we need to express different states in issues vs pull requests, then yes we should have different enums, but I don't think we do right now at least. If the later, I don't think optimizing or reducing imports is something to strive for. They are handled automatically by the IDE.

Another variant of this change would be to remove the common super interface between issue and pull request completely. It really is a false abstraction to begin with.

-------------

PR Comment: https://git.openjdk.org/skara/pull/1534#issuecomment-1600454762


More information about the skara-dev mailing list