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

Multiple data structures getting created while adding notifications #1157

Open
bharathappali opened this issue Apr 11, 2024 · 0 comments
Open

Comments

@bharathappali
Copy link
Member

In src/main/java/com/autotune/analyser/recommendations/engine/RecommendationEngine.java we have a function populateRecommendation which is receiving a notification object and yet creating a new arraylist with name engineNotifications

// build the engine level notifications here
ArrayList<RecommendationNotification> engineNotifications = new ArrayList<>();

These engineNotifications are added to recommendationModel object

// set the engine level notifications here
for (RecommendationNotification recommendationNotification : engineNotifications) {
    recommendationModel.addNotification(recommendationNotification);
}

While the PR #1156 adds the mechanism to add notifications in the notifications to recommendationModel I feel the notifications added to engineNotifications can be added to notifications object as they are getting added to recommendationModel in the end.

@dinogun @msvinaykumar @khansaad Please let me know your views on this. Thanks in advance!

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

No branches or pull requests

1 participant