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

Fix issues identified with static code analysis #5351

Merged

Conversation

gwenneg
Copy link
Member

@gwenneg gwenneg commented Nov 9, 2019

As stated in the title, I fixed some issues identified during static code analysis.

@gwenneg
Copy link
Member Author

gwenneg commented Nov 9, 2019

Please note that the package of AmazonLambdaHttpProcessor was fixed. It doesn’t look breaking to me, but I’d like a second opinion on that change.

Actually, the only thing that changed is the folder, from .../io/quarkus/amazon/lambda.http/deployment/AmazonLambdaHttpProcessor.java to .../io/quarkus/amazon/lambda/http/deployment/AmazonLambdaHttpProcessor.java.

The package remained the same, so it's a non-breaking change for sure.

@gwenneg gwenneg changed the title Clean code after static code analysis Fix issues identified with static code analysis Nov 9, 2019
@geoand
Copy link
Contributor

geoand commented Nov 9, 2019

Thanks for this!

Although the changes do look good and seem perfectly reasonable (when looking at them quickly), perhaps they are bit too broad?

@gwenneg
Copy link
Member Author

gwenneg commented Nov 9, 2019

You're right, I'll narrow it down to the essential changes and leave the minor fixes aside.

@gwenneg gwenneg force-pushed the clean-code-after-static-code-analysis branch from f081078 to d0db97f Compare November 9, 2019 22:40
@gwenneg gwenneg force-pushed the clean-code-after-static-code-analysis branch from d0db97f to 920325f Compare November 9, 2019 22:52
@@ -115,7 +115,7 @@ public Result parse(MethodInfo methodInfo) {
boolean allIgnoreCase = false;
if (afterByPart.contains(ALL_IGNORE_CASE)) {
allIgnoreCase = true;
afterByPart = afterByPart.replaceAll(ALL_IGNORE_CASE, "");
afterByPart = afterByPart.replace(ALL_IGNORE_CASE, "");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prevents a regex pattern compilation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting!

@gwenneg
Copy link
Member Author

gwenneg commented Nov 9, 2019

Done! This PR is mostly about unclosed InputStreams now.

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gwenneg!

@geoand geoand merged commit d3bedb5 into quarkusio:master Nov 10, 2019
@geoand geoand added this to the 1.1.0 milestone Nov 10, 2019
@gwenneg gwenneg deleted the clean-code-after-static-code-analysis branch November 10, 2019 12:28
@gwenneg
Copy link
Member Author

gwenneg commented Nov 10, 2019

Thanks for reviewing this :)

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.

2 participants