Milestone 2 contradiction

  1. Modify the PortfolioManagerImpl constructor and PortfolioManagerFactory to accomodate StockQuoteService as a parameter.

Didnt understand what to do with this.
In PortfolioManagerImpl, its written that “Caution: Do not delete or modify the constructor, or else your build will
// break!
// This is absolutely necessary for backward compatibility”.

So we have to modify or not?

just use @Deprecated annotation above all the previous constructors and build new one as per TODO’s.

In module 4 function you were using to return Instance of Portfoliomanager modify it and return it by using StockQuoteService as parameter instead of parsing RestTemplate as parameter.

In that case, we also have to change PortfolioManagerApplication where we are calling getPortfolioManager. Now we have to hardcode “tiingo” there? Right? @amanagar

You can try changing getPortfolioManager and let us know if that worked or not.

All the tests and build passes. But when I run the spring boot application, it gives the NULL Pointer application. So we dont have to have to hardcode there? @Saurav_Crio.Do

Follow TODO’s correctly and make sure you have followed and read instructions correctly
it’s saying make getPortfoliomanager deprecated and create another method getPortfoliomanager which takes string and stockquoteservice as parameter so plan your function according to this.

@ajraj27 It’s been 1 day but we haven’t heard any response from you after replying to your query, I;m closing this topic. If you think one the above reply is a solution to your issue, please mark that reply as a solution. If your issue is still not resolved please create a new topic and paste this topic’s link in the description of the new topic.

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, please feel free to create a new topic and post this question as a reference link in the description of the new topic.