Open Myolnir opened 8 years ago
The DefaultOAuth2ExceptionRenderer
class is providing a default behavior. It's not meant to be a base class for building new renderers.
That said, the writeWithMessageConverters looks like it could be reusable. It might make sense to pull writeWithMessageConverters
to an AbstractOAuth2ExceptionRenderer
as a protected method and have DefaultOAuth2ExceptionRenderer
extend that.
It was long time ago from this thread;)
I agree with you.
I think the best approach could be create an abstract class and the DefaultOAuth2ExceptionRenderer extends that
In a recent integration with IFTTT platform I have to create my own ExceptionRenderer but my renderer is basically the same that this DefaultOAuth2ExceptionRenderer I only need modify the public method handleHttpEntityResponse but, despite that the other methods of the default renderer are not protected i am not able to extends and I have to create my renderer with some duplicated code.
Don't you think it would be better made this methods protected or create an abstract parent method?