Request availability of JUtils

Would it possible to expose some of the behavior in org.sonar.java.model.JUtils in the official API (under org.sonar.plugins.java.api, as I understand) in a future release? There appears to be some very useful utility methods in here we would like to use rather than having to re-create ourselves in a custom plugin. The method superTypes(Symbol.TypeSymbol) is what we are trying to use ATM, but there appears to be lots of other goodies I expect we and others could use in the future.

Using current LTS version 8.9, with API version 8.9.0.43852 and java API version 6.15.1.26025.

Regards

Hey @rsc ,

First, thank you for the long wait. I finally took the time to review our internal usages of JUtils in the Sonar-Java rules themselves. I feel that indeed, many of these methods are now regularly used in our rules and should be moved to the API so other users can benefit from them. superTypes(Symbol.TypeSymbol) should be part of them.

Here is the ticket to track the change: SONARJAVA-4576

It’s unfortunately too late for SQ LTS 9.9, but normally this should make its way in our code to be part of the next LTS 10.X :slight_smile:

Cheers,
Michael

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.