RFR: 1350: Altfixversions isn't checking Backport resolution

Erik Joelsson erikj at openjdk.java.net
Wed Feb 16 15:27:56 UTC 2022


On Tue, 15 Feb 2022 20:40:07 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> This patch fixes a flaw in the altfixversion feature. Currently a backport with an altfixversion is considered valid if the state is "resolved". There are two problems with this. It misses backports that are in state closed. It could also cause false positives by accepting backports that aren't set to resolution "Fixed".
>> 
>> To fix this, I've introduced a new method on the Issue interface "isFixed()". The default implementation (which will get used in testing) just delegates to isResolved(). For JiraIssue, it checks both the state and the resolution.
>
> issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java line 190:
> 
>> 188:     @Override
>> 189:     public boolean isFixed() {
>> 190:         if (isResolved() || isClosed()) {
> 
> This test might not be needed -- the resolution will be empty or null for unresolved issues. I don't see any harm in leaving it if you prefer to have the extra check.

I agree that JBS should guarantee this to be true. I went back and forth on this myself, but in the end I think it's clearer like this.

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

PR: https://git.openjdk.java.net/skara/pull/1286


More information about the skara-dev mailing list