checkstyle/findbugs/pmd corrections

Former-commit-id: 7e1758362e3e3da13678e5e2a8bffa28b8ad5a87
This commit is contained in:
Jeremy Long
2015-06-22 05:53:11 -04:00
parent 13db27854b
commit 2494fec2a7
14 changed files with 314 additions and 262 deletions

View File

@@ -351,22 +351,27 @@ public class App {
}
}
/**
* Creates a file appender and adds it to logback.
*
* @param verboseLog the path to the verbose log file
*/
private void prepareLogger(String verboseLog) {
StaticLoggerBinder loggerBinder = StaticLoggerBinder.getSingleton();
LoggerContext context = (LoggerContext) loggerBinder.getLoggerFactory();
final StaticLoggerBinder loggerBinder = StaticLoggerBinder.getSingleton();
final LoggerContext context = (LoggerContext) loggerBinder.getLoggerFactory();
final PatternLayoutEncoder encoder = new PatternLayoutEncoder();
encoder.setPattern("%d %C:%L%n%-5level - %msg%n");
encoder.setContext(context);
encoder.start();
FileAppender fa = new FileAppender();
final FileAppender fa = new FileAppender();
fa.setAppend(true);
fa.setEncoder(encoder);
fa.setContext(context);
fa.setFile(verboseLog);
final File f = new File(verboseLog);
String name = f.getName();
int i = name.lastIndexOf('.');
final int i = name.lastIndexOf('.');
if (i > 1) {
name = name.substring(0, i);
}

View File

@@ -497,9 +497,9 @@ public final class CliParser {
*
* @return true if the disableAutoconf command line argument was specified; otherwise false
*/
public boolean isAutoconfDisabled() {
public boolean isAutoconfDisabled() {
return (line != null) && line.hasOption(ARGUMENT.DISABLE_AUTOCONF);
}
}
/**
* Returns true if the disableNexus command line argument was specified.