Decouple Client-Specific Dependencies in a Java Web Service Handling Multiple Clients

I have a Java web service hosting a method called getInfo(), which communicates with various external APIs and a database. Upon receiving a request, this method returns “OK” and then calls the corresponding client’s API method SetInfo(). The “Info” generated contains sensitive data along with dynamically generated text based on each client’s configuration.

Use deprecated library or copy the code I need from it into my codebase?

I need some code from some deprecated libraries, one small class (150 lines) and two functions (24 lines). The libraries are part of larger set that we use a couple of but both are being deprecated. The packages are still up on the registry but they are removed from the GitHub and not going to worked on or included in future updates.