CPD Results
The following document contains the results of PMD's CPD 4.3.
Duplications
File | Line |
---|
com/googlecode/t7mp/BootstrapHolder.java | 85 |
com/googlecode/t7mp/TomcatShutdownHook.java | 46 |
@Override
public void addScanner(Scanner scanner) {
this.scanners.add(scanner);
}
@Override
public void run() {
log.info("Stopping Tomcat ...");
stopScanners();
if (bootstrap != null) {
try {
bootstrap.stop();
bootstrap = null;
log.info("Tomcat stopped");
Thread.sleep(SLEEPTIME);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
if (catalinaOutPrintStream != null) {
catalinaOutPrintStream.flush();
catalinaOutPrintStream.close();
System.setErr(catalinaOutPrintStream.getOriginalSystemErr());
}
}
@Override
public void stopScanners() {
for (Scanner scanner : scanners) {
scanner.stop();
}
}
} |
File | Line |
---|
com/googlecode/t7mp/ForkedTomcatShutdownHook.java | 47 |
com/googlecode/t7mp/StopForkedMojo.java | 64 |
Process p = processBuilder.directory(this.binDirectory).start();
InputStream is = p.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line;
while ((line = br.readLine()) != null) {
log.info(line);
}
exitValue = p.waitFor();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
try {
Thread.sleep(SLEEPTIME);
} catch (InterruptedException e) {
log.error(e.getMessage(), e);
}
log.debug("Exit-Value ForkedTomcatShutdownHook " + exitValue); |