MCPcopy
hub / github.com/zaproxy/zaproxy / run

Method run

zap/src/main/java/org/parosproxy/paros/control/Control.java:296–325  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

294 new Thread(
295 new Runnable() {
296 @Override
297 public void run() {
298 // ZAP: Changed to use the option compact database.
299 try {
300 control.shutdown(
301 Model.getSingleton()
302 .getOptionsParam()
303 .getDatabaseParam()
304 .isCompactDatabase());
305 LOGGER.info("{} terminated.", Constant.PROGRAM_TITLE);
306
307 if (openOnExit != null && Desktop.isDesktopSupported()) {
308 try {
309 LOGGER.info(
310 "Opening file {}",
311 openOnExit.getAbsolutePath());
312 Desktop.getDesktop().open(openOnExit);
313 } catch (IOException e) {
314 LOGGER.error(
315 "Failed to open file {}",
316 openOnExit.getAbsolutePath(),
317 e);
318 }
319 }
320 } catch (Throwable e) {
321 LOGGER.error("An error occurred while shutting down:", e);
322 } finally {
323 System.exit(exitStatus);
324 }
325 }
326 },
327 "ZAP-Shutdown");
328

Callers

nothing calls this directly

Calls 15

getSingletonMethod · 0.95
isCompactDatabaseMethod · 0.80
getDatabaseParamMethod · 0.80
infoMethod · 0.80
getAbsolutePathMethod · 0.80
getSiteTreeMethod · 0.80
reloadContextTreeMethod · 0.80
openMethod · 0.65
getSiteTreePanelMethod · 0.65
clearMethod · 0.65
getOutputPanelMethod · 0.65
shutdownMethod · 0.45

Tested by

no test coverage detected