Oops, forget something ...²

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6455 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Romain Pelisse
2008-09-07 00:12:56 +00:00
parent 58b243e830
commit 832c0c8401

View File

@ -175,11 +175,11 @@ public class CommandLineOptions {
throw new IllegalArgumentException("language '" + languageSpecified + "' is not recognized. Availaible language are : " + Language.getCommaSeparatedOfAllSupportedLanguages());
}
else {
if ( args.length < (optionsIndex + LANG_VERSION_INDEX) ) {
if ( args.length > (optionsIndex + LANG_VERSION_INDEX) ) {
String specifiedVersion = args[optionsIndex + LANG_VERSION_INDEX];
List<LanguageVersion> versions = LanguageVersion.findVersionsForLanguageTerseName(language.getTerseName());
// If there is versions for this language, it should be a valid one...
if ( versions.size() == 0 ) {
if ( versions.size() != 0 ) {
for (LanguageVersion version : versions ) {
if ( specifiedVersion.equals( version.getVersion() ) ) {
this.version = version;