Implemented equals method like shown in the faq ,but error still persists

@Suyash
FAQ to the rescue!

@nabhanpv as I have mentioned in the title.
I have referrred the faq and implemented it.
I get this error afterwards.
How do I overcome this?

Have you tried using comparator?

Hey just see this stackoverflow question and try is this your solution

I tried all of the above methods.
But unfortunately I am unable to overcome this.

Just click on
image

these tabs one by one and the lines number will be shown in a description where you’re getting these error. It will help you easily understand where you’re getting error and why.

I did read the errors.
I have overriden the equals function.
But it is not used anywhere in my comparator function so I dont know why the warning is still showing.

Hey you do not have to use the TotalReturnsDTO for this module, you can continue with your TiingoCandle.
I think that’s why you are getting this error, can you check again ?
You only have to use Tiingo Candle, can you please check the reference given below the taskboard for sorting through the arrayList.

You have to use the compareTo() function in any one POJO where you are sorting the closingValue.

This FAQ here:

is for the POJO where you are implementing the compareTo() function

@Rahul-Crio.do I am aware it isnt required but I am using it for sorting among the symbol values in ascending order.


This is the code,
Please let me know how to rectify it.

you haven’t completed your logic in portfolioManagerApplication.java, can you complete that :slight_smile:

Sir I have ,All the test cases have passed .

Your portfolioManagerApplication is showing an error, as far as I can see

Yes ,was trying to make changes.
Didnt work.
Put back the working one now.

All test cases working.
Implemented code shown in the faq.
Despite that the error is persisting.
Please help

As far as I can see it shows a build success?

Hey guys,found the solution finally! :grin:
Would first like to thank all those who gave me suggestions.
Thank you for trying to help solve my issue.
On close analysis I realised that I was overriding the java.langs equal method.
But I am actually not overriding it.
I tried to act smart by replacing Object with the My Class name as the object type itself and hence the problem.
Once again thank you all for the suggestions.
#LearnItByDoing :metal: