RFR: 1951: Refactor Issue class hierarchy [v2]

Zhao Song zsong at openjdk.org
Wed Jun 21 17:00:08 UTC 2023


On Wed, 21 Jun 2023 08:55:13 GMT, Erik Joelsson <erikj 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.

What I mean was the later one. I was thinking using a specific subtype of `Issue` would be better. It could help us to distinguish between an Issue and a pull request. And also, if later we want to separate state enums for `IssueTrackerIssue` and `PullRequest`, it could save us some work.

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

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


More information about the skara-dev mailing list