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

OdmExtractDAO - fetchItemGroupMetaData - unnecessary sql execution #235

Closed
toskrip opened this issue Jul 12, 2021 · 0 comments · Fixed by #237
Closed

OdmExtractDAO - fetchItemGroupMetaData - unnecessary sql execution #235

toskrip opened this issue Jul 12, 2021 · 0 comments · Fixed by #237
Assignees
Labels
bug Something isn't working

Comments

@toskrip
Copy link
Collaborator

toskrip commented Jul 12, 2021

In OdmExtraDAO fetchItemGroupMetaData method there is a sql statement that is executed but results are never used and further prior execution of sql the return resultset types are not preset which may result in exception while parsing the results (discovered by accident while printing of some specific CRF (not all) is triggered leading to hanging page).

ArrayList<HashMap<String, Object>> rows = select(this.getItemDataMaxLengths(cvIds));

Note: does not seem to be regression, this sql was also there before refactoring of DAO but it is completely unecessary as results have been directly wiped:

rows.clear();

I am proposing to remove this part because it may produce exceptions also elsewhere.

@toskrip toskrip added the bug Something isn't working label Jul 12, 2021
@toskrip toskrip added this to the LibreClinica-1.1 milestone Jul 12, 2021
@toskrip toskrip self-assigned this Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant