Add Accessors for Two Member Fields Used in PeerNodeStatus#1075
Conversation
bertm
left a comment
There was a problem hiding this comment.
Could the accessors (and the fields that they access) be package-private to reduce the size of the public API?
Hmm, they probably could… depends on whether these methods need to be mocked by something outside of Fred. I don’t think there’s too much stuff using actual |
That's always possible, at least in theory. But most plugins would not have a business tracking peer nodes. Even then, these particular fields are pretty niche. I cannot imagine legitimate reasons for plugins to meddle with the peer backoff statistics. |
I mean, it doesn’t even matter, because the original fields are still public. 😄 |
1c112d2 to
8e7b81c
Compare
Oof, I really need to learn to read better. 😄 Yeah, I’ll make the fields |
Also, make the originally exposed fields private, as they are only used in their own class and in aforementioned PeerNodeStatus, anyway.
8e7b81c to
58545eb
Compare
Once again, I am blocked in writing Tests for Fred by the presence of fields that I cannot mock using Mockito. Have some accessors instead!