Unable to save issues in SonarQube 7.9.1

This line fails in SonarQube 7.9.1:
Issuable issuable = resourcePerspectives.as(Issuable.class, sonarFile);

Firstly, Issuable doesn’t exists in it. Secondly, for ‘as’ method call, it gives below error -
The method as(Class

, InputPath) in the type ResourcePerspectives is not applicable for the arguments (Class, InputFile)

Any advice/help/suggestions?

Hi,

As mentioned in the Javadoc, ResourcePerspectives is deprecated since 5.6. You should use methods on SensorContext to create issues from a Sensor.

Hi Julien,
Thank you for your reply. Is it possible to give me a code example?

Regards,
Amey

Here you are :slight_smile:

2 Likes