@Test public void testClassify() { assertEquals( Transporter.ERROR_OTHER, transporter.classify( new FileNotFoundException() ) ); assertEquals( Transporter.ERROR_OTHER, transporter.classify( new HttpResponseException( 403, "Forbidden" ) ) ); assertEquals( Transporter.ERROR_NOT_FOUND, transporter.classify( new HttpResponseException( 404, "Not Found" ) ) ); }
public int classify( Throwable error ) { if ( error instanceof HttpResponseException && ( (HttpResponseException) error ).getStatusCode() == HttpStatus.SC_NOT_FOUND ) { return ERROR_NOT_FOUND; } return ERROR_OTHER; }
HttpTransporter extends AbstractTransporter { public int classify( Throwable error ) { if ( error instanceof HttpResponseException && ( (HttpResponseException) error ).getStatusCode() == HttpStatus.SC_NOT_FOUND ) { return ERROR_NOT_FOUND; } return ERROR_OTHER; } }
HttpTransporter extends AbstractTransporter { public int classify( Throwable error ) { if ( error instanceof HttpResponseException && ( (HttpResponseException) error ).getStatusCode() == HttpStatus.SC_NOT_FOUND ) { return ERROR_NOT_FOUND; } return ERROR_OTHER; } HttpTransporter( RemoteRepository repository, RepositorySystemSession session, Logger logger ); }
HttpTransporter extends AbstractTransporter { public int classify( Throwable error ) { if ( error instanceof HttpResponseException && ( (HttpResponseException) error ).getStatusCode() == HttpStatus.SC_NOT_FOUND ) { return ERROR_NOT_FOUND; } return ERROR_OTHER; } HttpTransporter( RemoteRepository repository, RepositorySystemSession session, Logger logger ); int classify( Throwable error ); }
HttpTransporter extends AbstractTransporter { public int classify( Throwable error ) { if ( error instanceof HttpResponseException && ( (HttpResponseException) error ).getStatusCode() == HttpStatus.SC_NOT_FOUND ) { return ERROR_NOT_FOUND; } return ERROR_OTHER; } HttpTransporter( RemoteRepository repository, RepositorySystemSession session, Logger logger ); int classify( Throwable error );  }