The BoxApiConnection class has a protected method modifyHttpClientBuilder that allows to modify the underlying okHttpClient by overriding the method from a subclass. This is useful for a variety of reasons (i.e. on our particular case to add some logging interceptors to debug what is going on at different stages of an http request).
When trying to extend the BoxDeveloperEditionAPIConnection subclass to preserve behavior we want to use one of the getAppEnterpriseConnection methods that internally using a private method tryRestoreUsingAccessTokenCache. However we cannot call this method unless using reflection.
A nicer solution would be to have that method as public or protected.
The BoxApiConnection class has a protected method modifyHttpClientBuilder that allows to modify the underlying okHttpClient by overriding the method from a subclass. This is useful for a variety of reasons (i.e. on our particular case to add some logging interceptors to debug what is going on at different stages of an http request).
When trying to extend the BoxDeveloperEditionAPIConnection subclass to preserve behavior we want to use one of the getAppEnterpriseConnection methods that internally using a private method tryRestoreUsingAccessTokenCache. However we cannot call this method unless using reflection.
A nicer solution would be to have that method as public or protected.