-
Notifications
You must be signed in to change notification settings - Fork 73
Fixing thread leaks #567
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
base: master
Are you sure you want to change the base?
Fixing thread leaks #567
Conversation
| public Set<ObjectName> queryNames(ObjectName name) throws IOException { | ||
| String scope = (name != null) ? name.toString() : "*:*"; | ||
| public Set<ObjectName> queryNames(final ObjectName name) throws IOException { | ||
| final String scope = (name != null) ? name.toString() : "*:*"; |
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.
| private Socket socket = null; | ||
| private boolean shouldClose = false; | ||
|
|
||
| private volatile Exception exception = null; |
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.
🟠 Code Quality Violation
| private volatile Exception exception = null; | |
| private volatile Exception exception; |
Remove initialization, this is already the default value. (...read more)
When initializing fields, prevent initializing fields to the default value. Any additional initialization means more bytecode instructions, and allocating many of these objects may impact your application performance.
If you initialize to a default value, remove the initialization.
| private boolean shouldClose = false; | ||
|
|
||
| private volatile Exception exception = null; | ||
| private volatile Socket socket = null; |
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.
🟠 Code Quality Violation
| private volatile Socket socket = null; | |
| private volatile Socket socket; |
Remove initialization, this is already the default value. (...read more)
When initializing fields, prevent initializing fields to the default value. Any additional initialization means more bytecode instructions, and allocating many of these objects may impact your application performance.
If you initialize to a default value, remove the initialization.
|
|
||
| private volatile Exception exception = null; | ||
| private volatile Socket socket = null; | ||
| private volatile boolean shouldClose = false; |
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.
🟠 Code Quality Violation
| private volatile boolean shouldClose = false; | |
| private volatile boolean shouldClose; |
Remove initialization, this is already the default value. (...read more)
When initializing fields, prevent initializing fields to the default value. Any additional initialization means more bytecode instructions, and allocating many of these objects may impact your application performance.
If you initialize to a default value, remove the initialization.
bd24e79 to
e130317
Compare
No description provided.