compiler: make Stub final class#2077
Conversation
| p->Print( | ||
| *vars, | ||
| "public static class $stub_name$ extends $AbstractStub$<$stub_name$> {\n"); | ||
| "public static final class $stub_name$ extends $AbstractStub$<$stub_name$> {\n"); |
There was a problem hiding this comment.
Should this also be triggered by the deprecated api flag?
There was a problem hiding this comment.
@ejona86 deprecated stub apis should still be without final keyword as some users are using mockito.
There was a problem hiding this comment.
Oh, I didn't see this was only done if !enable_deprecated
|
@dapengzhang0 LGTM |
|
Hey guys, We had implemented a "RetryableClient" wrapping generated stubs to reconnect dropped connections. Originally we were using java.lang.reflect.Proxy when there were interfaces, and thought we'd do it the mockito way now for the generated classes. Making them final means we can't - but wouldn't want to enable the deprecated API to use this. So I was wondering what is the context for this change? |
|
See #1469 (comment) For your use case, we'd recommend making a |
forgot to make Stub final class...