Hi folks, thanks so much for making Revapi! Has been a very useful tool.
Recently we started sealing some of our internally used interfaces, after which I added a method to one of the now-sealed interfaces + implemented it in the only permitted implementation. Sealing the interface didn't cause revapi to complain about source incompatibility, however when I added methods to the now-sealed interface, it told me
java.method.addedToInterface: Method was added to an interface.
...
SOURCE: BREAKING, BINARY: NON_BREAKING, SEMANTIC: POTENTIALLY_BREAKING
I would have expected that the sealing could have been registered as a source break, since anyone currently implementing the interface in other projects would no longer be permitted to do so. However, it shouldn't be a break to add methods to an already sealed interface as long as the sealing continues all the way down the hierarchy to a final class, which I think can be statically checked.
Am I correct in the above reasoning? If so, would a contribution be welcome to implement this, and where should I look to do so? Thanks!
Hi folks, thanks so much for making Revapi! Has been a very useful tool.
Recently we started sealing some of our internally used interfaces, after which I added a method to one of the now-sealed interfaces + implemented it in the only permitted implementation. Sealing the interface didn't cause revapi to complain about source incompatibility, however when I added methods to the now-sealed interface, it told me
I would have expected that the sealing could have been registered as a source break, since anyone currently implementing the interface in other projects would no longer be permitted to do so. However, it shouldn't be a break to add methods to an already sealed interface as long as the sealing continues all the way down the hierarchy to a
finalclass, which I think can be statically checked.Am I correct in the above reasoning? If so, would a contribution be welcome to implement this, and where should I look to do so? Thanks!