hashmapinc / hashmapinc/Drillflow

DEV:LOG:validateGetFromStore - bug in coding

Open
#557 0 comments 0 reactions 1 assignee Claimed by @sukhendumukherjee View on GitHub
API bug Deliverable
Dominant language
Java
Stars
21
Forks
13
PR merge metrics
No merged PRs in 30d

Description

While merging code to unblock my cards, I notice the following code:

if (optionsMap.size() > 2)
return -427;
// there must not be another optionIn present
if (optionsMap.size() >= 2 && !optionsMap.containsKey("returnElements")) {
return -427;
}

This code makes no sense because with the first "if", you are checking if the optionsMap.size() is > 2 and then the next if is checking the same thing again (only also catching if the optionsMap.size == 2). Plus, the comment is nonsense.

Let's discuss what you are really trying to do here, Sukhe, and rewrite this code. As it stands, it is allowing 2 options in the map, where 1 of them must be "returnElements". Is this true?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.