I used reflection to invoke the private constructor of the class to solve the lack of branch problem shown in the sonar scan report. This is a snippet of my code that I worked:
In the above code, the critical sonar scan problem has been resolved. But unfortunately, fortify now shows a problem with processing the Access specifier in the following line:
c.setAccessible(true);
How can I solve problems with strengthening and sonar? Any help would be greatly appreciated.
source share