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: compare string using equals instead of == for Reader class #4480

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

gssbzn
Copy link
Contributor

@gssbzn gssbzn commented Sep 18, 2023

found a case where there's a string comparison using == instead of equals, took also the oportunity to try and reduce some warning on the class

@@ -730,10 +728,10 @@ protected void applyPathParamsPatterns(Operation operation, Map<String, String>
.filter(p -> p.getSchema() != null)
.filter(p -> StringUtils.isBlank(p.getSchema().getPattern()))
.filter(p -> !Parameter.StyleEnum.MATRIX.equals(p.getStyle()))
.filter(p -> "string" == p.getSchema().getType() || (p.getSchema().getTypes() != null && p.getSchema().getTypes().contains("string")))
.filter(p -> "string".equals(p.getSchema().getType()) || (p.getSchema().getTypes() != null && p.getSchema().getTypes().contains("string")))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the main fix

@frantuma frantuma merged commit 9048843 into swagger-api:master Sep 21, 2023
5 checks passed
@frantuma
Copy link
Member

Thanks!

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