You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current FederationServer is a bit weird in the sense that you create an instance every time you want to validate a single address.
I propose to make this a bit less convoluted as follows:
FederationAddressResolver that has a resolve method that returns the response and a constructor injected okhttpclient. There should be no need to have separate resolvers for each domain.
separate the address parsing into a separate static method so that we can test this without needing a mock http server.
Likewise mocking a remote server to verify that we can deserialize a json response is not something that needs unit testing. At best we need a simple test that verifies that given a valid response, the deserialization works.
get rid of the static https variable and the static method for creating an okhttp instance; doing this per address is a bad idea. Global variables should not exist in production code.
I think it's safe to do this as obviously not a lot of people are aware this even exists or they would have complained ;-). Happy to do the work if people like this.
The text was updated successfully, but these errors were encountered:
The current FederationServer is a bit weird in the sense that you create an instance every time you want to validate a single address.
I propose to make this a bit less convoluted as follows:
I think it's safe to do this as obviously not a lot of people are aware this even exists or they would have complained ;-). Happy to do the work if people like this.
The text was updated successfully, but these errors were encountered: