Check Method is calling to service class


SonarQube v7.7

Is there any way to check whether the method makes call to service class or implementation class?

eg: repository.findall()

I have to check whether findall() is defined and called to service class or it is calling directly the implementation class.


No, SonarJava is not able to follow which implementation class is going to be used at runtime. Therefore and as of today, it’s not possible to write a rule which would identify such calls.


Okay… Thanks…

and I didn’t get any response for the below query. Could you please he me in the same.