Skip to content
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

Refactored code to improve readability and understand complex logic #1934

Closed
wants to merge 7 commits into from

Conversation

si-ndhu
Copy link

@si-ndhu si-ndhu commented Apr 7, 2023

No description provided.


private ConstrainableInputStream(InputStream in, int bufferSize, int maxSize) {
super(in, bufferSize);
Validate.isTrue(maxSize >= 0);
this.maxSize = maxSize;
remaining = maxSize;
capped = maxSize != 0;
startTime = System.nanoTime();
this.timeoutManager = timeoutManager;

Check failure

Code scanning / CodeQL

Self assignment Error

This expression assigns timeoutManager to itself.
@@ -50,39 +64,68 @@
XmlTreeBuilder newInstance() {
return new XmlTreeBuilder();
}

abstract class TokenProcessor {

Check notice

Code scanning / CodeQL

Inner class could be static Note

TokenProcessor should be made static, since the enclosing instance is not used.
}
}

public class EofProcessor extends TokenProcessor {

Check notice

Code scanning / CodeQL

Inner class could be static Note

EofProcessor should be made static, since the enclosing instance is not used.
@jhy
Copy link
Owner

jhy commented Apr 24, 2023

Thanks, but I don't see any particular improvement here.

@jhy jhy closed this Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants