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

optimisation: group requests to filter server #55

Merged

Conversation

jamal-khey
Copy link
Contributor

No description provided.

@jamal-khey jamal-khey self-assigned this Dec 13, 2023
@jamal-khey jamal-khey changed the title optimisation group quequests to filter server optimisation group requests to filter server Dec 13, 2023
@jamal-khey jamal-khey changed the title optimisation group requests to filter server optimisation: group requests to filter server Dec 14, 2023
@Mathieu-Deharbe Mathieu-Deharbe self-requested a review December 14, 2023 15:29
@AAJELLAL AAJELLAL self-requested a review December 15, 2023 10:28
@jamal-khey jamal-khey requested a review from AAJELLAL December 15, 2023 10:59
Comment on lines 170 to 171
List<String> containerNamesList = filters.stream().map(EquipmentsContainer::getContainerName).toList();
String containerNames = Arrays.toString(containerNamesList.toArray());

Choose a reason for hiding this comment

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

You can refactor this part to avoid code duplication since it's commonly used with getIdentifiablesFromContainer
Proposition:

 private String getContainerNames(List<EquipmentsContainer> filters) {
        List<String> containerNamesList = filters.stream().map(EquipmentsContainer::getContainerName).toList();
        return Arrays.toString(containerNamesList.toArray());
    }

Then use it here:
.withValue("name", getContainerNames(filters))

@Mathieu-Deharbe
Copy link
Contributor

I found a problem during a test and reported it but I didn't reproduce it with Jamal yet. Will check back on it monday with Jamal before any approval.

@jamal-khey jamal-khey requested a review from AAJELLAL December 18, 2023 10:45
@jamal-khey
Copy link
Contributor Author

I found a problem during a test and reported it but I didn't reproduce it with Jamal yet. Will check back on it monday with Jamal before any approval.

Probleme found , i did a fix and added few tests to detect the issue

Copy link

Copy link
Contributor

@Mathieu-Deharbe Mathieu-Deharbe left a comment

Choose a reason for hiding this comment

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

Crash fixed. Good for me.

@jamal-khey jamal-khey merged commit fcbbcb0 into main Dec 21, 2023
3 checks passed
@jamal-khey jamal-khey deleted the jamal-khey/optimisation-group-quequests-to-filter-server branch December 21, 2023 08:26
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.

3 participants