Skip to content

Commit

Permalink
Add missing @deprecated annotations to permit compiling with xlint 'd…
Browse files Browse the repository at this point in the history
…ep-ann'

as an error.
  • Loading branch information
jleyba committed Dec 3, 2013
1 parent ab70e03 commit 62db3a0
Show file tree
Hide file tree
Showing 21 changed files with 65 additions and 18 deletions.
2 changes: 2 additions & 0 deletions java/server/src/org/openqa/jetty/html/Applet.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public Applet setDebug(boolean debug){
* @param alt The alternate element to display
* @deprecated use add
*/
@Deprecated
public Applet setAlternate(Element alt)
{
add(alt);
Expand All @@ -95,6 +96,7 @@ public Applet setAlternate(Element alt)
* @param alt The alternate element to display
* @deprecated use add
*/
@Deprecated
public Applet setAlternate(String alt)
{
add(alt);
Expand Down
1 change: 1 addition & 0 deletions java/server/src/org/openqa/jetty/html/Element.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ public String attributes()
* @param attributes String of HTML attributes to add to the element.
* @return This Element so calls can be chained.
*/
@Deprecated
public Element attributes(String attributes)
{
if (log.isDebugEnabled() && attributes!=null && attributes.indexOf('=')>=0)
Expand Down
1 change: 1 addition & 0 deletions java/server/src/org/openqa/jetty/html/Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ public Block cell()
* threads factory.
* @deprecated Use setNestingFactory or setThreadNestingFactory
*/
@Deprecated
public static void setCellNestingFactory(CompositeFactory factory)
{
if (threadNestingMap==null)
Expand Down
1 change: 1 addition & 0 deletions java/server/src/org/openqa/jetty/html/Text.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
/** A simple block of straight text.
* @deprecated all Composites now take Strings direct.
*/
@Deprecated
public class Text extends Composite
{
/* ----------------------------------------------------------------- */
Expand Down
1 change: 1 addition & 0 deletions java/server/src/org/openqa/jetty/http/HttpRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ public void setTimeStamp(long ts)
/**
* @deprecated use getHttpResponse()
*/
@Deprecated
public HttpResponse getResponse()
{
return getHttpResponse();
Expand Down
1 change: 1 addition & 0 deletions java/server/src/org/openqa/jetty/http/HttpResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ public void reset()
/**
* @deprecated use getHttpRequest()
*/
@Deprecated
public HttpRequest getRequest()
{
return getHttpRequest();
Expand Down
6 changes: 6 additions & 0 deletions java/server/src/org/openqa/jetty/http/HttpServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public static Collection getHttpServers()
/**
* @deprecated User getHttpServers()
*/
@Deprecated
public static List getHttpServerList()
{
return new ArrayList(__roServers);
Expand Down Expand Up @@ -639,6 +640,7 @@ public void setRequestsPerGC(int requestsPerGC)
* @param classes
* @deprecated Use HttpContext
*/
@Deprecated
public void setSystemClasses(String[] classes)
{
_systemClasses=classes;
Expand All @@ -649,6 +651,7 @@ public void setSystemClasses(String[] classes)
* @return A String array with a list of system classes for this instance.
* @deprecated Use HttpContext
*/
@Deprecated
public String[] getSystemClasses()
{
return _systemClasses;
Expand All @@ -659,6 +662,7 @@ public String[] getSystemClasses()
* @param classes
* @deprecated Use HttpContext
*/
@Deprecated
public void setServerClasses(String[] classes)
{
_serverClasses=classes;
Expand All @@ -670,6 +674,7 @@ public void setServerClasses(String[] classes)
* @see #setServerClasses(java.lang.String[])
* @deprecated Use HttpContext
*/
@Deprecated
public String[] getServerClasses()
{
return _serverClasses;
Expand Down Expand Up @@ -814,6 +819,7 @@ public void join()
* @param virtualHost Host name or IP
* @param alias Alias hostname or IP
*/
@Deprecated
public void addHostAlias(String virtualHost, String alias)
{
log.warn("addHostAlias is deprecated. Use HttpContext.addVirtualHost");
Expand Down
1 change: 1 addition & 0 deletions java/server/src/org/openqa/jetty/http/JsseListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
* @author Forge Research Pty Ltd ACN 003 491 576
* @author Jan Hlavatý
*/
@Deprecated
public abstract class JsseListener extends SocketListener
{
private static Log log = LogFactory.getLog(JsseListener.class);
Expand Down
1 change: 1 addition & 0 deletions java/server/src/org/openqa/jetty/http/NCSARequestLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ public void setAppend(boolean a)
/**
* @deprecated ignored
*/
@Deprecated
public void setBuffered(boolean b)
{}

Expand Down
1 change: 1 addition & 0 deletions java/server/src/org/openqa/jetty/http/SunJsseListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
* @author Court Demas ([email protected])
* @author Forge Research Pty Ltd ACN 003 491 576
**/
@Deprecated
public class SunJsseListener extends JsseListener
{
private static Log log = LogFactory.getLog(SunJsseListener.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public AbstractSessionManager(Random random)
* @deprecated use getCrossContextSessionIDs
* session IDs
*/
@Deprecated
public boolean getUseRequestedId()
{
return _crossContextSessionIDs;
Expand All @@ -127,6 +128,7 @@ public boolean getUseRequestedId()
* @deprecated use setCrossContextSessionIDs
* session IDs
*/
@Deprecated
public void setUseRequestedId(boolean useRequestedId)
{
_crossContextSessionIDs = useRequestedId;
Expand Down Expand Up @@ -716,6 +718,7 @@ public int getMaxInactiveInterval()
/**
* @deprecated
*/
@Deprecated
public HttpSessionContext getSessionContext()
throws IllegalStateException
{
Expand Down Expand Up @@ -892,6 +895,7 @@ public synchronized void removeAttribute(String name)
* @deprecated As of Version 2.2, this method is
* replaced by {@link #getAttribute}
*/
@Deprecated
public Object getValue(String name)
throws IllegalStateException
{
Expand All @@ -903,6 +907,7 @@ public Object getValue(String name)
* @deprecated As of Version 2.2, this method is
* replaced by {@link #getAttributeNames}
*/
@Deprecated
public synchronized String[] getValueNames()
throws IllegalStateException
{
Expand All @@ -918,6 +923,7 @@ public synchronized String[] getValueNames()
* @deprecated As of Version 2.2, this method is
* replaced by {@link #setAttribute}
*/
@Deprecated
public void putValue(java.lang.String name,
java.lang.Object value)
throws IllegalStateException
Expand All @@ -930,6 +936,7 @@ public void putValue(java.lang.String name,
* @deprecated As of Version 2.2, this method is
* replaced by {@link #removeAttribute}
*/
@Deprecated
public void removeValue(java.lang.String name)
throws IllegalStateException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,7 @@ public void setStatus(int status)
* @param status the status code
* @param message the status message
*/
@Deprecated
public void setStatus(int status, String message)
{
if (_request._filterType!=Dispatcher.__ERROR && !_include)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ public SessionManager getSessionManager()
/** Set the dynamic servlet path.
* @deprecated Use org.openqa.jetty.jetty.servlet.Invoker
*/
@Deprecated
public void setDynamicServletPathSpec(String dynamicServletPathSpec)
{
log.warn("setDynamicServletPathSpec is Deprecated.");
Expand All @@ -230,6 +231,7 @@ public void setDynamicServletPathSpec(String dynamicServletPathSpec)
/** Set dynamic servlet initial parameters.
* @deprecated Use org.openqa.jetty.jetty.servlet.Invoker
*/
@Deprecated
public void setDynamicInitParams(Map initParams)
{
log.warn("setDynamicInitParams is Deprecated.");
Expand All @@ -239,6 +241,7 @@ public void setDynamicInitParams(Map initParams)
/** Set serving dynamic system servlets.
* @deprecated Use org.openqa.jetty.jetty.servlet.Invoker
*/
@Deprecated
public void setServeDynamicSystemServlets(boolean b)
{
log.warn("setServeDynamicSystemServlets is Deprecated.");
Expand Down Expand Up @@ -1114,6 +1117,7 @@ public RequestDispatcher getNamedDispatcher(String name)
/**
* @deprecated
*/
@Deprecated
public Servlet getServlet(String name)
{
return null;
Expand All @@ -1123,6 +1127,7 @@ public Servlet getServlet(String name)
/**
* @deprecated
*/
@Deprecated
public Enumeration getServlets()
{
return Collections.enumeration(Collections.EMPTY_LIST);
Expand All @@ -1132,6 +1137,7 @@ public Enumeration getServlets()
/**
* @deprecated
*/
@Deprecated
public Enumeration getServletNames()
{
return Collections.enumeration(Collections.EMPTY_LIST);
Expand All @@ -1155,6 +1161,7 @@ public void log(String msg)
* {@link #log(String message, Throwable throwable)}
* instead.
*/
@Deprecated
public void log(Exception e, String msg)
{
_contextLog.warn(msg,e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ public boolean isRequestedSessionIdFromURL()
/**
* @deprecated
*/
@Deprecated
public boolean isRequestedSessionIdFromUrl()
{
return isRequestedSessionIdFromURL();
Expand Down Expand Up @@ -770,6 +771,7 @@ public String getRemoteHost()
* @deprecated As of Version 2.1 of the Java Servlet API,
* use {@link javax.servlet.ServletContext#getRealPath} instead.
*/
@Deprecated
public String getRealPath(String path)
{
return _servletHandler.getServletContext().getRealPath(path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,8 @@ public String encodeRedirectURL(String url)
/**
* @deprecated As of version 2.1, use encodeURL(String url) instead
*/
public String encodeUrl(String url)
@Deprecated
public String encodeUrl(String url)
{
return encodeURL(url);
}
Expand All @@ -362,7 +363,8 @@ public String encodeUrl(String url)
* @deprecated As of version 2.1, use
* encodeRedirectURL(String url) instead
*/
public String encodeRedirectUrl(String url)
@Deprecated
public String encodeRedirectUrl(String url)
{
return encodeRedirectURL(url);
}
Expand Down Expand Up @@ -527,7 +529,8 @@ public void setStatus(int status)
* @param status the status code
* @param message the status message
*/
public void setStatus(int status, String message)
@Deprecated
public void setStatus(int status, String message)
{
setStatus(status);
_httpResponse.setReason(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ private SessionContext(){}
/**
* @deprecated From HttpSessionContext
*/
@Deprecated
public Enumeration getIds()
{
return Collections.enumeration(Collections.EMPTY_LIST);
Expand All @@ -47,6 +48,7 @@ public Enumeration getIds()
/**
* @deprecated From HttpSessionContext
*/
@Deprecated
public HttpSession getSession(String id)
{
return null;
Expand Down
2 changes: 2 additions & 0 deletions java/server/src/org/openqa/jetty/log/OutputStreamLogSink.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public void setLogDateFormat(String logDateFormat)
/**
* @deprecated Use getLogTimeZone()
*/
@Deprecated
public String getLogTimezone()
{
return _logTimezone;
Expand All @@ -126,6 +127,7 @@ public String getLogTimezone()
/**
* @deprecated Use setLogTimeZone(String)
*/
@Deprecated
public void setLogTimezone(String logTimezone)
{
_logTimezone=logTimezone;
Expand Down
1 change: 1 addition & 0 deletions java/server/src/org/openqa/jetty/util/LazyList.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public static Object add(Object list, int index, Object item)
* @return The lazylist created or added to.
* @deprecated Use addCollection
*/
@Deprecated
protected Object add(Object list, Collection collection)
{
Iterator i=collection.iterator();
Expand Down
1 change: 1 addition & 0 deletions java/server/src/org/openqa/jetty/util/Primitive.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* @author Greg Wilkins (gregw)
* @deprecated Use TypeUtil
*/
@Deprecated
public class Primitive extends TypeUtil
{
}
Expand Down
3 changes: 3 additions & 0 deletions java/server/src/org/openqa/jetty/util/ThreadPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ else if (!name.equals(getName()))
/**
* @deprecated use getName()
*/
@Deprecated
public String getPoolName()
{
return getName();
Expand All @@ -129,6 +130,7 @@ public String getPoolName()
/**
* @deprecated use setName(String)
*/
@Deprecated
public void setPoolName(String name)
{
setName(name);
Expand Down Expand Up @@ -294,6 +296,7 @@ public void setThreadsPriority(int priority)
*
* @deprecated maxIdleTime is used instead.
*/
@Deprecated
public void setMaxStopTimeMs(int ms)
{
log.warn("setMaxStopTimeMs is deprecated. No longer required.");
Expand Down
Loading

0 comments on commit 62db3a0

Please sign in to comment.