String typeString = null;
String chapString = null;
String target = null;
- String readerTypeString = null;
- MainAction action = null;
+ MainAction action = MainAction.HELP;
Boolean plusInfo = null;
boolean noMoreActions = false;
exitCode = 255;
break;
case SET_READER:
- if (readerTypeString == null) {
- readerTypeString = args[i];
- } else {
- exitCode = 255;
- }
+ exitCode = setReaderType(args[i]);
break;
}
}
exitCode = 0;
break;
case SET_READER:
- exitCode = setReaderType(readerTypeString);
break;
}
}
*/
private static int setReaderType(String readerTypeString) {
try {
- ReaderType readerType = ReaderType.valueOf(readerTypeString);
+ ReaderType readerType = ReaderType.valueOf(readerTypeString
+ .toUpperCase());
BasicReader.setDefaultReaderType(readerType);
return 0;
} catch (IllegalArgumentException e) {