Ramaram Shankar

Greenhorn
+ Follow
since Nov 08, 2023
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ramaram Shankar

Thanks for pointing it out. Updated original post.
1 year ago
Thank you Carey.

But, the suggested revised code doesn't print the non-matching lines, which is a requirement.
1 year ago
Below is a simple method which compares contents of two excel files ignoring the line order. Also needs to print the mismatched lines in a logger.
This method is working as expected.
But, one of my peers in their code review mentioned that initializing and using 4 sets for this might not be the best way performance/memory-consumption wise and that the code can be optimized by using lesser number of sets.
I can't figure out how to reduce the number of sets though, to achieve the same functionality.

Any clue/suggestions? Thank you.

Code:

1 year ago
Can you tear my code apart with code review comments? Below is a simple method which reads an XLSX file and does some stuff with it. I use FileInputStream and XSSFWorkbook to do the processing. The code block which I am concerned about is the exception handling (I have been told that it's buggy/not ideal).

Note: I am not allowed to use try-with-resources for some reasons.

Code:


1 year ago