openwebbeans/openwebbeans-1.2.0-servlet31.patch
2020-08-25 15:05:38 +08:00

544 lines
20 KiB
Diff

diff -Nru openwebbeans-1.2.0/webbeans-test/cditest-owb/src/main/java/org/apache/webbeans/cditest/owb/MockServletContext.java openwebbeans-1.2.0.servlet/webbeans-test/cditest-owb/src/main/java/org/apache/webbeans/cditest/owb/MockServletContext.java
--- openwebbeans-1.2.0/webbeans-test/cditest-owb/src/main/java/org/apache/webbeans/cditest/owb/MockServletContext.java 2013-05-19 07:22:06.000000000 +0200
+++ openwebbeans-1.2.0.servlet/webbeans-test/cditest-owb/src/main/java/org/apache/webbeans/cditest/owb/MockServletContext.java 2015-07-30 19:58:45.571193609 +0200
@@ -198,5 +198,137 @@
{
attributes.put(name, object);
}
+ public void declareRoles(String... roleNames) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public ClassLoader getClassLoader() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.descriptor.JspConfigDescriptor getJspConfigDescriptor() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public <T extends java.util.EventListener> T createListener(Class<T> c) throws ServletException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public void addListener(String className) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public <T extends java.util.EventListener> void addListener(T t) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public void addListener(Class<? extends java.util.EventListener> listenerClass) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public Set<javax.servlet.SessionTrackingMode> getEffectiveSessionTrackingModes() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public Set<javax.servlet.SessionTrackingMode> getDefaultSessionTrackingModes() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public void setSessionTrackingModes(Set<javax.servlet.SessionTrackingMode> sessionTrackingModes) throws IllegalStateException, IllegalArgumentException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.SessionCookieConfig getSessionCookieConfig() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public java.util.Map<String,? extends javax.servlet.FilterRegistration> getFilterRegistrations() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.FilterRegistration getFilterRegistration(String filterName) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+ public <T extends javax.servlet.Filter> T createFilter(Class<T> c) throws ServletException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, Class<? extends javax.servlet.Filter> filterClass) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, javax.servlet.Filter filter) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, String className) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public java.util.Map<String,? extends javax.servlet.ServletRegistration> getServletRegistrations() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.ServletRegistration getServletRegistration(String servletName) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public <T extends Servlet> T createServlet(Class<T> c) throws ServletException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName, Servlet servlet) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName, Class<? extends Servlet> servletClass) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName, String className) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public boolean setInitParameter(String name, String value) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public int getEffectiveMinorVersion() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public int getEffectiveMajorVersion() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public String getVirtualServerName() {
+ throw new RuntimeException("Not implemented");
+ }
}
diff -Nru openwebbeans-1.2.0/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/test/MockServletContext.java openwebbeans-1.2.0.servlet/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/test/MockServletContext.java
--- openwebbeans-1.2.0/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/test/MockServletContext.java 2013-05-19 07:22:06.000000000 +0200
+++ openwebbeans-1.2.0.servlet/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/test/MockServletContext.java 2015-07-30 19:40:48.766671820 +0200
@@ -22,7 +22,9 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Enumeration;
+import java.util.EventListener;
import java.util.Hashtable;
+import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
@@ -290,4 +292,138 @@
}
*/
+
+ public void declareRoles(String... roleNames) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public ClassLoader getClassLoader() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.descriptor.JspConfigDescriptor getJspConfigDescriptor() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public <T extends EventListener> T createListener(Class<T> c) throws ServletException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public void addListener(String className) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public <T extends EventListener> void addListener(T t) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public void addListener(Class<? extends EventListener> listenerClass) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public Set<javax.servlet.SessionTrackingMode> getEffectiveSessionTrackingModes() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public Set<javax.servlet.SessionTrackingMode> getDefaultSessionTrackingModes() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public void setSessionTrackingModes(Set<javax.servlet.SessionTrackingMode> sessionTrackingModes) throws IllegalStateException, IllegalArgumentException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.SessionCookieConfig getSessionCookieConfig() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public Map<String,? extends javax.servlet.FilterRegistration> getFilterRegistrations() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.FilterRegistration getFilterRegistration(String filterName) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public <T extends javax.servlet.Filter> T createFilter(Class<T> c) throws ServletException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, Class<? extends javax.servlet.Filter> filterClass) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, javax.servlet.Filter filter) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, String className) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public Map<String,? extends javax.servlet.ServletRegistration> getServletRegistrations() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.ServletRegistration getServletRegistration(String servletName) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public <T extends Servlet> T createServlet(Class<T> c) throws ServletException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName, Servlet servlet) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName, Class<? extends Servlet> servletClass) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName, String className) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public boolean setInitParameter(String name, String value) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public int getEffectiveMinorVersion() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public int getEffectiveMajorVersion() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public String getVirtualServerName() {
+ throw new RuntimeException("Not implemented");
+ }
}
diff -Nru openwebbeans-1.2.0/webbeans-web/src/test/java/org/apache/webbeans/web/tests/MockServletContext.java openwebbeans-1.2.0.servlet/webbeans-web/src/test/java/org/apache/webbeans/web/tests/MockServletContext.java
--- openwebbeans-1.2.0/webbeans-web/src/test/java/org/apache/webbeans/web/tests/MockServletContext.java 2013-05-19 07:22:06.000000000 +0200
+++ openwebbeans-1.2.0.servlet/webbeans-web/src/test/java/org/apache/webbeans/web/tests/MockServletContext.java 2015-07-30 19:45:11.315876450 +0200
@@ -26,6 +26,8 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Enumeration;
+import java.util.EventListener;
+import java.util.Map;
import java.util.Set;
/**
@@ -177,4 +179,138 @@
{
return null;
}
+
+ public void declareRoles(String... roleNames) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public ClassLoader getClassLoader() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.descriptor.JspConfigDescriptor getJspConfigDescriptor() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public <T extends EventListener> T createListener(Class<T> c) throws ServletException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public void addListener(String className) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public <T extends EventListener> void addListener(T t) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public void addListener(Class<? extends EventListener> listenerClass) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public Set<javax.servlet.SessionTrackingMode> getEffectiveSessionTrackingModes() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public Set<javax.servlet.SessionTrackingMode> getDefaultSessionTrackingModes() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public void setSessionTrackingModes(Set<javax.servlet.SessionTrackingMode> sessionTrackingModes) throws IllegalStateException, IllegalArgumentException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.SessionCookieConfig getSessionCookieConfig() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public Map<String,? extends javax.servlet.FilterRegistration> getFilterRegistrations() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.FilterRegistration getFilterRegistration(String filterName) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public <T extends javax.servlet.Filter> T createFilter(Class<T> c) throws ServletException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, Class<? extends javax.servlet.Filter> filterClass) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, javax.servlet.Filter filter) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, String className) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public Map<String,? extends javax.servlet.ServletRegistration> getServletRegistrations() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.ServletRegistration getServletRegistration(String servletName) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public <T extends Servlet> T createServlet(Class<T> c) throws ServletException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName, Servlet servlet) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName, Class<? extends Servlet> servletClass) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName, String className) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public boolean setInitParameter(String name, String value) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public int getEffectiveMinorVersion() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public int getEffectiveMajorVersion() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public String getVirtualServerName() {
+ throw new RuntimeException("Not implemented");
+ }
}
diff -Nru openwebbeans-1.2.0/webbeans-web/src/test/java/org/apache/webbeans/web/tests/MockServletRequest.java openwebbeans-1.2.0.servlet/webbeans-web/src/test/java/org/apache/webbeans/web/tests/MockServletRequest.java
--- openwebbeans-1.2.0/webbeans-web/src/test/java/org/apache/webbeans/web/tests/MockServletRequest.java 2013-05-19 07:22:06.000000000 +0200
+++ openwebbeans-1.2.0.servlet/webbeans-web/src/test/java/org/apache/webbeans/web/tests/MockServletRequest.java 2015-07-30 19:54:37.302293027 +0200
@@ -19,10 +19,13 @@
package org.apache.webbeans.web.tests;
import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
import javax.servlet.ServletInputStream;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpUpgradeHandler;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
@@ -357,4 +360,81 @@
{
return false;
}
+
+ public String getRemoteName() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.http.Part getPart(String name) throws IOException, IllegalStateException, javax.servlet.ServletException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public java.util.Collection<javax.servlet.http.Part> getParts() throws IOException, IllegalStateException, javax.servlet.ServletException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public void logout() throws javax.servlet.ServletException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public void login(String username, String password) throws javax.servlet.ServletException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public boolean authenticate(javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.DispatcherType getDispatcherType() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.AsyncContext getAsyncContext() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public boolean isAsyncSupported() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public boolean isAsyncStarted() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.AsyncContext startAsync(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse) {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.AsyncContext startAsync() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public javax.servlet.ServletContext getServletContext() {
+ // TODO
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ public <T extends HttpUpgradeHandler> T upgrade(Class<T> arg0) throws IOException, ServletException {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public String changeSessionId() {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public long getContentLengthLong() {
+ throw new RuntimeException("Not implemented");
+ }
}