Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Commit

Permalink
comment out respondNoContent
Browse files Browse the repository at this point in the history
  • Loading branch information
PJ committed Oct 31, 2014
1 parent ac074e6 commit e955236
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/com/google/enterprise/adaptor/DocumentHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,8 @@ public void respondNotFound() throws IOException {
}
state = State.NOT_FOUND;
}


/*
@Override
public void respondNoContent() throws IOException{
if (state != State.SETUP) {
Expand All @@ -624,6 +625,7 @@ public void respondNoContent() throws IOException{
state = State.NO_CONTENT;
startSending(false);
}
*/

@Override
public OutputStream getOutputStream() throws IOException {
Expand Down
2 changes: 1 addition & 1 deletion src/com/google/enterprise/adaptor/Response.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public interface Response {
* this method, for the rest of the processing, exceptions may no longer be
* communicated to the clients cleanly.
*/
public void respondNoContent() throws IOException;
/* public void respondNoContent() throws IOException; */

/**
* Get stream to write document contents to. There is no need to flush or
Expand Down
8 changes: 6 additions & 2 deletions src/com/google/enterprise/adaptor/WrapperAdaptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,13 @@ public void respondNotModified() throws IOException {
public void respondNotFound() throws IOException {
response.respondNotFound();
}


/*
@Override
public void respondNoContent() throws IOException {
response.respondNoContent();
}
*/

@Override
public OutputStream getOutputStream() throws IOException {
Expand Down Expand Up @@ -254,11 +256,13 @@ public void respondNotModified() {
public void respondNotFound() {
notFound = true;
}


/*
@Override
public void respondNoContent() {
noContent = true;
}
*/

@Override
public OutputStream getOutputStream() {
Expand Down
8 changes: 6 additions & 2 deletions test/com/google/enterprise/adaptor/DocumentHandlerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,8 @@ public void getDocContent(Request request, Response response)
thrown.expect(RuntimeException.class);
handler.handle(ex);
}


/*
@Test
public void testNoContent() throws Exception {
MockAdaptor adaptor = new MockAdaptor() {
Expand Down Expand Up @@ -574,6 +575,7 @@ public void getDocContent(Request request, Response response)
thrown.expect(RuntimeException.class);
handler.handle(ex);
}
*/

@Test
public void testOutputStreamThenNotModified() throws Exception {
Expand All @@ -589,7 +591,8 @@ public void getDocContent(Request request, Response response)
thrown.expect(RuntimeException.class);
handler.handle(ex);
}


/*
@Test
public void testOutputStreamThenNoContent() throws Exception {
MockAdaptor adaptor = new MockAdaptor() {
Expand All @@ -610,6 +613,7 @@ public void getDocContent(Request request, Response response)
thrown.expect(RuntimeException.class);
handler.handle(ex);
}
*/

@Test
public void testOutputStreamTwice() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,13 @@ public void respondNotModified() {
public void respondNotFound() {
notFound = true;
}


/*
@Override
public void respondNoContent() throws IOException {
noContent = true;
}
*/

@Override
public OutputStream getOutputStream() {
Expand Down

0 comments on commit e955236

Please sign in to comment.