SONARJAVA-211 Fix the NPE by supporting generic constructors and methods