private static Throwable getCause( CollectResult result ) { Throwable cause = null; if ( result != null && !result.getExceptions().isEmpty() ) { cause = result.getExceptions().get( 0 ); } return cause; }
private static Throwable getCause( CollectResult result ) { Throwable cause = null; if ( result != null && !result.getExceptions().isEmpty() ) { cause = result.getExceptions().get( 0 ); } return cause; }
private static Throwable getCause( CollectResult result ) { Throwable cause = null; if ( result != null && !result.getExceptions().isEmpty() ) { cause = result.getExceptions().get( 0 ); } return cause; }
@Override public List<Exception> getCollectorExceptions() { return dce.getResult().getExceptions(); } };
private void addException( CollectResult result, Exception e ) { if ( result.getExceptions().size() < 100 ) { result.addException( e ); } }
private void addException( CollectResult result, Exception e ) { if ( result.getExceptions().size() < 100 ) { result.addException( e ); } }
@Override public CollectResult collectDependencies(RepositorySystemSession session, CollectRequest request) throws DependencyCollectionException { DefaultRepositorySystemSession cloned = new DefaultRepositorySystemSession(session); DependencyGraphTransformer transformer = session.getDependencyGraphTransformer(); //need to reset the transformer to prevent the transformation to happen and to it below separately. cloned.setDependencyGraphTransformer(null); CollectResult res = super.collectDependencies(cloned, request); CloningDependencyVisitor vis = new CloningDependencyVisitor(); res.getRoot().accept(vis); //this part copied from DefaultDependencyCollector try { DefaultDependencyGraphTransformationContext context = new DefaultDependencyGraphTransformationContext(session); res.setRoot(transformer.transformGraph(res.getRoot(), context)); } catch (RepositoryException e) { res.addException(e); } if (!res.getExceptions().isEmpty()) { throw new DependencyCollectionException(res); } res.getRoot().setData("NB_TEST", vis.getRootNode()); return res; }
result.setCollectExceptions( collectResult.getExceptions() );
result.setCollectExceptions( collectResult.getExceptions() );
if ( !result.getExceptions().isEmpty() )
if ( !result.getExceptions().isEmpty() )