jeudi 20 mai 2021

How to forbid specific methods (from external lib) in Java?

I could not find much resources on my question so I guess this is not an easy resolution.

We use JodaTime in our codebase and I wish to forbid (or at least warn) using some methods from this library as they are prone to errors (around timezone management).

I tried the reflections library already, without success due to a non released issue. We used to have a custom sonar rule to handle this but it is not supported by sonarcloud so I looking for another way.

Do you have any lead to handle this?





Aucun commentaire:

Enregistrer un commentaire