-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: split parsing peers into multiple steps #994
base: next
Are you sure you want to change the base?
refactor: split parsing peers into multiple steps #994
Conversation
The previous code nested too much error handling even though many parts are independent.
5414fca
to
13c71cb
Compare
src/freenet/node/PeerManager.java
Outdated
// read the peers file | ||
try { | ||
while (true) { | ||
peerEntries.add(new SimpleFieldSet(br, false, true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You’re mixing different kinds of whitespace here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resisting the urge to do a full file whitespace cleanup that would cause merging issues
} | ||
} | ||
|
||
for (PeerNode pn : createdNodes) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if this whole block is only copied, please add braces for all parts of if
statements. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Braces and spaces added (and some tabify) ☺
ready to be merged, as discussed with Bombe in FLIP. |
The previous code nested too much error handling even though many parts are independent.
This is a cleanup as sideeffect of trying to multi-thread the peer initialization. That multi-threading turned out to be unnecessary, but the cleanup is nice without it.