remove NOPMD
This commit is contained in:
parent
125847d5f7
commit
05e1a65267
5 changed files with 10 additions and 14 deletions
|
@ -151,9 +151,8 @@ public class Crawler implements Serializable {
|
|||
try {
|
||||
parser.parseArgument(args);
|
||||
} catch (final CmdLineException e) {
|
||||
System.err.println(e.getMessage()); // NOPMD
|
||||
System.err.println("java " + Crawler.class.getCanonicalName() // NOPMD
|
||||
+ " [options...] arguments...");
|
||||
System.err.println(e.getMessage());
|
||||
System.err.println("java " + Crawler.class.getCanonicalName() + " [options...] arguments...");
|
||||
parser.printUsage(System.err);
|
||||
return;
|
||||
}
|
||||
|
@ -184,7 +183,7 @@ public class Crawler implements Serializable {
|
|||
Runtime.getRuntime().addShutdownHook(shutdownCallback);
|
||||
|
||||
exitCode = process(options);
|
||||
} catch (final Throwable t) { // NOPMD
|
||||
} catch (final Throwable t) {
|
||||
logger.error("Crawler does not work correctly.", t);
|
||||
exitCode = Constants.EXIT_FAIL;
|
||||
} finally {
|
||||
|
@ -398,7 +397,7 @@ public class Crawler implements Serializable {
|
|||
completed = true;
|
||||
|
||||
return exitCode;
|
||||
} catch (final Throwable t) { // NOPMD
|
||||
} catch (final Throwable t) {
|
||||
logger.warn("An exception occurs on the crawl task.", t);
|
||||
return Constants.EXIT_FAIL;
|
||||
} finally {
|
||||
|
|
|
@ -69,9 +69,8 @@ public class SuggestCreator implements Serializable {
|
|||
try {
|
||||
parser.parseArgument(args);
|
||||
} catch (final CmdLineException e) {
|
||||
System.err.println(e.getMessage()); // NOPMD
|
||||
System.err.println("java " + Crawler.class.getCanonicalName() // NOPMD
|
||||
+ " [options...] arguments...");
|
||||
System.err.println(e.getMessage());
|
||||
System.err.println("java " + Crawler.class.getCanonicalName() + " [options...] arguments...");
|
||||
parser.printUsage(System.err);
|
||||
return;
|
||||
}
|
||||
|
@ -101,7 +100,7 @@ public class SuggestCreator implements Serializable {
|
|||
};
|
||||
Runtime.getRuntime().addShutdownHook(shutdownCallback);
|
||||
exitCode = process(options);
|
||||
} catch (final Throwable t) { // NOPMD
|
||||
} catch (final Throwable t) {
|
||||
logger.error("Suggest creator does not work correctly.", t);
|
||||
exitCode = Constants.EXIT_FAIL;
|
||||
} finally {
|
||||
|
|
|
@ -28,8 +28,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class CrawlerLogHelper extends LogHelperImpl {
|
||||
private static final Logger logger = LoggerFactory // NOPMD
|
||||
.getLogger(CrawlerLogHelper.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(CrawlerLogHelper.class);
|
||||
|
||||
@Override
|
||||
public void log(final LogType key, final Object... objs) {
|
||||
|
|
|
@ -36,8 +36,7 @@ import org.slf4j.LoggerFactory;
|
|||
*
|
||||
*/
|
||||
public class OpenSearchHelper {
|
||||
private static final Logger logger = LoggerFactory // NOPMD
|
||||
.getLogger(OpenSearchHelper.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(OpenSearchHelper.class);
|
||||
|
||||
public String osddPath;
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ public class IndexUpdater extends Thread {
|
|||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Finished indexUpdater.");
|
||||
}
|
||||
} catch (final Throwable t) { // NOPMD
|
||||
} catch (final Throwable t) {
|
||||
logger.error("IndexUpdater is terminated.", t);
|
||||
forceStop();
|
||||
} finally {
|
||||
|
|
Loading…
Add table
Reference in a new issue