@Test public void pathNullShouldNotBeAccepted() throws IOException { JacocoScannerPlugin plugin = new JacocoScannerPlugin(); String path = null; final boolean accepted = plugin.accepts(null, path, null); assertFalse("Path NULL should not be accepted", accepted); }
@Override public boolean accepts(final FileResource item, String path, Scope scope) { try { boolean accepted = acceptsPath(path); if(accepted) { LOGGER.info("Jacoco plugin accepted "+path); } return accepted; } catch (NullPointerException e) { return false; } catch (Exception e) { LOGGER.error("Error while checking path: "+e, e); return false; } }
JacocoScannerPlugin extends AbstractScannerPlugin<FileResource,JacocoReportDescriptor> { @Override public boolean accepts(final FileResource item, String path, Scope scope) { try { boolean accepted = acceptsPath(path); if(accepted) { LOGGER.info("Jacoco plugin accepted "+path); } return accepted; } catch (NullPointerException e) { return false; } catch (Exception e) { LOGGER.error("Error while checking path: "+e, e); return false; } } }
JacocoScannerPlugin extends AbstractScannerPlugin<FileResource,JacocoReportDescriptor> { @Override public boolean accepts(final FileResource item, String path, Scope scope) { try { boolean accepted = acceptsPath(path); if(accepted) { LOGGER.info("Jacoco plugin accepted "+path); } return accepted; } catch (NullPointerException e) { return false; } catch (Exception e) { LOGGER.error("Error while checking path: "+e, e); return false; } } JacocoScannerPlugin(); }
JacocoScannerPlugin extends AbstractScannerPlugin<FileResource,JacocoReportDescriptor> { @Override public boolean accepts(final FileResource item, String path, Scope scope) { try { boolean accepted = acceptsPath(path); if(accepted) { LOGGER.info("Jacoco plugin accepted "+path); } return accepted; } catch (NullPointerException e) { return false; } catch (Exception e) { LOGGER.error("Error while checking path: "+e, e); return false; } } JacocoScannerPlugin(); @Override boolean accepts(final FileResource item, String path, Scope scope); @Override JacocoReportDescriptor scan(final FileResource file, String path, Scope scope, Scanner scanner); }
JacocoScannerPlugin extends AbstractScannerPlugin<FileResource,JacocoReportDescriptor> { @Override public boolean accepts(final FileResource item, String path, Scope scope) { try { boolean accepted = acceptsPath(path); if(accepted) { LOGGER.info("Jacoco plugin accepted "+path); } return accepted; } catch (NullPointerException e) { return false; } catch (Exception e) { LOGGER.error("Error while checking path: "+e, e); return false; } } JacocoScannerPlugin(); @Override boolean accepts(final FileResource item, String path, Scope scope); @Override JacocoReportDescriptor scan(final FileResource file, String path, Scope scope, Scanner scanner); static final String JQASSISTANT_PLUGIN_JACOCO_FILENAME; static final String JQASSISTANT_PLUGIN_JACOCO_DIRNAME; }