fix Nullpointer Exception when using -l jsp
This commit is contained in:
parent
b6c6899741
commit
00e27b4a37
@ -118,7 +118,11 @@ public class PMDParameters {
|
||||
configuration.setSuppressMarker(params.getSuppressmarker());
|
||||
configuration.setThreads(params.getThreads());
|
||||
for ( LanguageVersion language : LanguageVersion.findVersionsForLanguageTerseName( params.getLanguage() ) ) {
|
||||
configuration.getLanguageVersionDiscoverer().setDefaultLanguageVersion(language.getLanguage().getVersion(params.getVersion()));
|
||||
LanguageVersion languageVersion = language.getLanguage().getVersion(params.getVersion());
|
||||
if (languageVersion == null) {
|
||||
languageVersion = language.getLanguage().getDefaultVersion();
|
||||
}
|
||||
configuration.getLanguageVersionDiscoverer().setDefaultLanguageVersion(languageVersion);
|
||||
}
|
||||
try {
|
||||
configuration.prependClasspath(params.getAuxclasspath());
|
||||
|
Loading…
x
Reference in New Issue
Block a user