Skip to content

Commit

Permalink
Forward compatibility with Servlet 4.0: getTrailerFields() (jenkins…
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Jul 12, 2022
1 parent 8949274 commit 76481f4
Showing 1 changed file with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
import com.gargoylesoftware.htmlunit.util.NameValuePair;
import java.io.IOException;
import java.net.URL;
import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletException;
Expand Down Expand Up @@ -498,8 +496,6 @@ public static class TestNewRulesNotOkSpecialCases extends AbstractUnprotectedRoo

public void doWithResponseImpl(ResponseImpl response) { replyOk(); }

public void doWithRequestAndResponse(RequestAndResponse requestAndResponse) { replyOk(); }

// special case to keep Groovy parameter name, but does not seem to indicate it's automatically a web method
@CapturedParameterNames("req")
public void doAnnotatedResponseSuccess(Object req) { replyOk(); }
Expand All @@ -509,21 +505,6 @@ public static class TestNewRulesNotOkSpecialCases extends AbstractUnprotectedRoo
// public void doAnnotatedJsonOutputFilter() { replyOk(); }
}

public abstract static class RequestAndResponse implements StaplerRequest, StaplerResponse {
@Override
public CollectionAndEnumeration getHeaderNames() {
return null;
}

@Override
public CollectionAndEnumeration getHeaders(String name) {
return null;
}

public abstract static class CollectionAndEnumeration implements Collection, Enumeration {
}
}

@Test
public void testNotOkSpecialCases_withServletRequest() throws Exception {
assertNotReachable("testNewRulesNotOkSpecialCases/withServletRequest/");
Expand All @@ -548,12 +529,6 @@ public void testNotOkSpecialCases_withResponseImpl() throws Exception {
assertDoActionRequestWasBlockedAndResetFlag();
}

@Test
public void testNotOkSpecialCases_withRequestAndResponse() throws Exception {
assertNotReachable("testNewRulesNotOkSpecialCases/withRequestAndResponse/");
assertDoActionRequestWasBlockedAndResetFlag();
}

@Test
public void testNotOkSpecialCases_annotatedResponseSuccess() throws Exception {
assertNotReachable("testNewRulesNotOkSpecialCases/annotatedResponseSuccess/");
Expand Down

0 comments on commit 76481f4

Please sign in to comment.