for (Iterator<String> iter = keys.iterator(); iter.hasNext();) {
String key = iter.next();
Object value = data.get(key);
- OpenType type = compositeType.getType(key);
+ OpenType<?> type = compositeType.getType(key);
if (type instanceof SimpleType) {
setProperty(propertyPrefix + "." + key, value);
} else {
Object key1 = iter1.next();
CompositeData valuedata = data.get(new Object[] { key1 });
Object value = valuedata.get("value");
- OpenType type = valuedata.getCompositeType().getType(
+ OpenType<?> type = valuedata.getCompositeType().getType(
"value");
if (type instanceof SimpleType) {
setProperty(propertyPrefix + "." + key1, value);
/**
* Return the names of all defined request parameters for this request.
*/
- public Enumeration getParameterNames() {
+ public Enumeration<String> getParameterNames() {
if (!parametersParsed)
parseParameters();
*
* @param name Name of the requested header
*/
- public Enumeration getHeaders(String name) {
+ public Enumeration<String> getHeaders(String name) {
return coyoteRequest.getMimeHeaders().values(name);
}
/**
* Return the names of all headers received with this request.
*/
- public Enumeration getHeaderNames() {
+ public Enumeration<String> getHeaderNames() {
return coyoteRequest.getMimeHeaders().names();
}
}
- public Enumeration getAttributeNames() {
+ public Enumeration<String> getAttributeNames() {
if (request == null) {
throw new IllegalStateException(
}
- public Enumeration getParameterNames() {
+ public Enumeration<String> getParameterNames() {
if (request == null) {
throw new IllegalStateException(
}
- public Map getParameterMap() {
+ public Map<String,String[]> getParameterMap() {
if (request == null) {
throw new IllegalStateException(
}
- public Enumeration getLocales() {
+ public Enumeration<Locale> getLocales() {
if (request == null) {
throw new IllegalStateException(
}
- public Enumeration getHeaders(String name) {
+ public Enumeration<String> getHeaders(String name) {
if (request == null) {
throw new IllegalStateException(
}
- public Enumeration getHeaderNames() {
+ public Enumeration<String> getHeaderNames() {
if (request == null) {
throw new IllegalStateException(
/**
- * Empty collection to serve as the basis for empty enumerations.
+ * Empty String collection to serve as the basis for empty enumerations.
* <strong>DO NOT ADD ANY ELEMENTS TO THIS COLLECTION!</strong>
*/
- private static final ArrayList<Object> empty = new ArrayList<Object>();
+ private static final ArrayList<String> emptyString =
+ new ArrayList<String>();
+
+ /**
+ * Empty Servlet collection to serve as the basis for empty enumerations.
+ * <strong>DO NOT ADD ANY ELEMENTS TO THIS COLLECTION!</strong>
+ */
+ private static final ArrayList<Servlet> emptyServlet =
+ new ArrayList<Servlet>();
/**
* Return an enumeration of the names of the context attributes
* associated with this context.
*/
- public Enumeration getAttributeNames() {
+ public Enumeration<String> getAttributeNames() {
return new Enumerator<String>(attributes.keySet(), true);
* Return the names of the context's initialization parameters, or an
* empty enumeration if the context has no initialization parameters.
*/
- public Enumeration getInitParameterNames() {
+ public Enumeration<String> getInitParameterNames() {
mergeParameters();
return (new Enumerator<String>(parameters.keySet()));
*
* @param path Collection path
*/
- public Set getResourcePaths(String path) {
+ public Set<String> getResourcePaths(String path) {
// Validate the path argument
if (path == null) {
/**
* @deprecated As of Java Servlet API 2.1, with no direct replacement.
*/
- public Enumeration getServletNames() {
- return (new Enumerator<Object>(empty));
+ public Enumeration<String> getServletNames() {
+ return (new Enumerator<String>(emptyString));
}
/**
* @deprecated As of Java Servlet API 2.1, with no direct replacement.
*/
- public Enumeration getServlets() {
- return (new Enumerator<Object>(empty));
+ public Enumeration<Servlet> getServlets() {
+ return (new Enumerator<Servlet>(emptyServlet));
}
}
- public Set getResourcePaths(String path) {
+ public Set<String> getResourcePaths(String path) {
if (SecurityUtil.isPackageProtectionEnabled()){
- return (Set)doPrivileged("getResourcePaths", new Object[]{path});
+ return (Set<String>)doPrivileged("getResourcePaths",
+ new Object[]{path});
} else {
return context.getResourcePaths(path);
}
}
+ /**
+ * @deprecated
+ */
public Servlet getServlet(String name)
throws ServletException {
if (SecurityUtil.isPackageProtectionEnabled()) {
}
- public Enumeration getServlets() {
+ /**
+ * @deprecated
+ */
+ public Enumeration<Servlet> getServlets() {
if (SecurityUtil.isPackageProtectionEnabled()) {
- return (Enumeration) doPrivileged("getServlets", null);
+ return (Enumeration<Servlet>) doPrivileged("getServlets", null);
} else {
return context.getServlets();
}
}
- public Enumeration getServletNames() {
+ /**
+ * @deprecated
+ */
+ public Enumeration<String> getServletNames() {
if (SecurityUtil.isPackageProtectionEnabled()) {
- return (Enumeration) doPrivileged("getServletNames", null);
+ return (Enumeration<String>) doPrivileged("getServletNames", null);
} else {
return context.getServletNames();
}
}
+ /**
+ * @deprecated
+ */
public void log(Exception exception, String msg) {
if (SecurityUtil.isPackageProtectionEnabled()) {
doPrivileged("log", new Class[]{Exception.class, String.class},
}
- public Enumeration getInitParameterNames() {
+ public Enumeration<String> getInitParameterNames() {
if (SecurityUtil.isPackageProtectionEnabled()) {
- return (Enumeration) doPrivileged("getInitParameterNames", null);
+ return (Enumeration<String>) doPrivileged(
+ "getInitParameterNames", null);
} else {
return context.getInitParameterNames();
}
}
- public Enumeration getAttributeNames() {
+ public Enumeration<String> getAttributeNames() {
if (SecurityUtil.isPackageProtectionEnabled()) {
- return (Enumeration) doPrivileged("getAttributeNames", null);
+ return (Enumeration<String>) doPrivileged(
+ "getAttributeNames", null);
} else {
return context.getAttributeNames();
}
* Return an <code>Enumeration</code> of the names of the initialization
* parameters for this Filter.
*/
- public Enumeration getInitParameterNames() {
+ public Enumeration<String> getInitParameterNames() {
Map<String,String> map = filterDef.getParameterMap();
if (map == null)
* Override the <code>getAttributeNames()</code> method of the wrapped
* request.
*/
- public Enumeration getAttributeNames() {
+ public Enumeration<String> getAttributeNames() {
return (new AttributeNamesEnumerator());
}
*
* @param sc The new status code
* @param msg The new message
+ * @deprecated
*/
public void setStatus(int sc, String msg) {
protected FilterChain filterChain = null;
- private static Enumeration<Object> dummyEnum = new Enumeration<Object>(){
+ private static Enumeration<String> dummyEnum = new Enumeration<String>(){
public boolean hasMoreElements(){
return false;
}
- public Object nextElement(){
+ public String nextElement(){
return null;
}
};
public void setServerName(String name) {}
public void setServerPort(int port) {}
public Object getAttribute(String name) { return null; }
- public Enumeration getAttributeNames() { return null; }
+ public Enumeration<String> getAttributeNames() { return null; }
public String getCharacterEncoding() { return null; }
public int getContentLength() { return -1; }
public void setContentLength(int length) {}
return null;
}
public Locale getLocale() { return null; }
- public Enumeration getLocales() { return null; }
+ public Enumeration<Locale> getLocales() { return null; }
public String getProtocol() { return null; }
public BufferedReader getReader() throws IOException { return null; }
+ /** @deprecated */
public String getRealPath(String path) { return null; }
public String getRemoteAddr() { return null; }
public String getRemoteHost() { return null; }
public void setSecure(boolean secure) {}
public void setUserPrincipal(Principal principal) {}
public String getParameter(String name) { return null; }
- public Map getParameterMap() { return null; }
- public Enumeration getParameterNames() { return dummyEnum; }
+ public Map<String,String[]> getParameterMap() { return null; }
+ public Enumeration<String> getParameterNames() { return dummyEnum; }
public String[] getParameterValues(String name) { return null; }
public RequestDispatcher getRequestDispatcher(String path) {
return null;
public Cookie[] getCookies() { return null; }
public long getDateHeader(String name) { return -1; }
public String getHeader(String name) { return null; }
- public Enumeration getHeaders(String name) { return null; }
- public Enumeration getHeaderNames() { return null; }
+ public Enumeration<String> getHeaders(String name) { return null; }
+ public Enumeration<String> getHeaderNames() { return null; }
public int getIntHeader(String name) { return -1; }
public String getMethod() { return null; }
public String getPathTranslated() { return null; }
public HttpSession getSession(boolean create) { return null; }
public boolean isRequestedSessionIdFromCookie() { return false; }
public boolean isRequestedSessionIdFromURL() { return false; }
+ /** @deprecated */
public boolean isRequestedSessionIdFromUrl() { return false; }
public boolean isRequestedSessionIdValid() { return false; }
public boolean isUserInRole(String role) { return false; }
public void addIntHeader(String name, int value) {}
public boolean containsHeader(String name) { return false; }
public String encodeRedirectURL(String url) { return null; }
+ /** @deprecated */
public String encodeRedirectUrl(String url) { return null; }
public String encodeURL(String url) { return null; }
+ /** @deprecated */
public String encodeUrl(String url) { return null; }
public void sendAcknowledgement() throws IOException {}
public void sendError(int status) throws IOException {}
public void setHeader(String name, String value) {}
public void setIntHeader(String name, int value) {}
public void setStatus(int status) {}
+ /** @deprecated */
public void setStatus(int status, String message) {}
}
- public Enumeration getInitParameterNames() {
+ public Enumeration<String> getInitParameterNames() {
return config.getInitParameterNames();
}
public static MBeanServer getMBeanServer() throws Exception {
if (mbeanServer == null) {
if (MBeanServerFactory.findMBeanServer(null).size() > 0) {
- mbeanServer = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);
+ mbeanServer = MBeanServerFactory.findMBeanServer(null).get(0);
} else {
mbeanServer = MBeanServerFactory.createMBeanServer();
}
final class StandardSessionContext
implements HttpSessionContext {
- private HashMap dummy = new HashMap();
+ private HashMap<?,String> dummy = new HashMap<String,String>();
/**
* Return the session identifiers of all sessions defined within this
* must return an empty <code>Enumeration</code> and will be
* removed in a future version of the API.
*/
- public Enumeration getIds() {
- return (new Enumerator(dummy));
+ public Enumeration<String> getIds() {
+ return (new Enumerator<String>(dummy));
}
/**
final class StandardSessionContext implements HttpSessionContext {
- protected HashMap dummy = new HashMap();
+ protected HashMap<?,String> dummy = new HashMap<String,String>();
/**
* Return the session identifiers of all sessions defined
* This method must return an empty <code>Enumeration</code>
* and will be removed in a future version of the API.
*/
- public Enumeration getIds() {
+ public Enumeration<String> getIds() {
- return (new Enumerator(dummy));
+ return (new Enumerator<String>(dummy));
}
}
- public Enumeration getAttributeNames() {
+ public Enumeration<String> getAttributeNames() {
return session.getAttributeNames();
}