@Test public void testPut_Closed() throws Exception { transporter.close(); try { transporter.put( new PutTask( URI.create( "repo/missing.txt" ) ) ); fail( "Expected error" ); } catch ( IllegalStateException e ) { assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) ); } }
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 );  }