MethodMatcher can't match external jar function

Greetings, I meet some problem while writing sonaqube java custom rules in version 9.5.0.56709

Log4j fuction can’t get its class name(MISSING) meanwhile SQL function can get its class
so i can’t use MethodMatchers to match this fuction logger.debug("debug to console"); even with ofAnyType

CLASS_METHOD = MethodMatchers.create()
                    //.ofTypes(disallowedClass)
                    .ofAnyType()
                    .names("debug")
                    .withAnyParameters()
                    .build();



Does the class have to be built-in to the JDK ?

The same goes for fastjson

i got it
sonar-project.properties add
sonar.java.libraries=lib/.jar
sonar.java.test.libraries=lib/
.jar

it works

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