Spotbug issue in PortfolioManagerimpl

Program does’nt compile because of this
protected PortfolioManagerImpl(RestTemplate restTemplate) {
this.restTemplate = restTemplate;
So in order to fix this i added a public field restTemplate which fixed the above problem but results in spotbug because the field i created is never read. Any ideas for fixing this?

Hey, there is a potential FAQ for resolving spotbugs -

Go through this FAQ, it will hopefully help you. Good Luck :slight_smile:

Well actually this tells me to remove the unused field and if i did that the program wont compile.

You can use the created field during the call to API. That’s where it’s supposed to be utilised.


Thanks bro I dont know how i missed a thing as trivial as this.

1 Like