Skip to content

Conversation

@rozza
Copy link
Member

@rozza rozza commented Apr 28, 2025

@rozza rozza requested review from a team and NathanQingyangXu and removed request for a team April 28, 2025 16:03
if (expectedTypes.isString()) {
types = singletonList(expectedTypes.asString().getValue());
String expectedType = expectedTypes.asString().getValue();
if (expectedType.equals("number")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Discussion only. Nothing needs to be done.

I know in this specific case, expectedfType can't be null, but generally speaking, it is a good practice to put string constant to the left hand side of equals() method to avoid NPE.

if ("number".equals(expectedType)) { 

Not a big deal for sure.

@NathanQingyangXu
Copy link
Contributor

LGTM. Tested successfully locally.

@rozza rozza merged commit bd30e83 into mongodb:main Apr 29, 2025
2 of 3 checks passed
@rozza rozza deleted the JAVA-5682 branch April 29, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants