From: markt Date: Fri, 11 Dec 2009 12:14:05 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48370 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f6629693b9eb8c0071b22977b99020084205348b;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48370 Remove some unused imports git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@889585 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/bayeux/java/org/apache/tomcat/bayeux/request/PublishRequest.java b/modules/bayeux/java/org/apache/tomcat/bayeux/request/PublishRequest.java index b714d11de..04ee3ff79 100644 --- a/modules/bayeux/java/org/apache/tomcat/bayeux/request/PublishRequest.java +++ b/modules/bayeux/java/org/apache/tomcat/bayeux/request/PublishRequest.java @@ -23,18 +23,16 @@ import javax.servlet.ServletException; import org.apache.catalina.comet.CometEvent; import org.apache.tomcat.bayeux.HttpError; import org.apache.tomcat.bayeux.BayeuxException; -import org.apache.tomcat.bayeux.BayeuxRequest; import org.apache.tomcat.bayeux.ChannelImpl; import org.apache.tomcat.bayeux.ClientImpl; import org.apache.tomcat.bayeux.MessageImpl; +import org.apache.tomcat.bayeux.RequestBase; import org.apache.tomcat.bayeux.TomcatBayeux; import org.json.JSONException; import org.json.JSONObject; import org.apache.cometd.bayeux.Bayeux; -import java.util.List; -import org.apache.cometd.bayeux.Message; -import java.util.Iterator; -import org.apache.tomcat.bayeux.*; +import org.apache.juli.logging.Log; +import org.apache.juli.logging.LogFactory; /****************************************************************************** * Handshake request Bayeux message. @@ -44,10 +42,10 @@ import org.apache.tomcat.bayeux.*; * @version 1.0 * */ -public class PublishRequest extends RequestBase implements BayeuxRequest { - - JSONObject msgData = null; +public class PublishRequest extends RequestBase { + private static final Log log = LogFactory.getLog(RequestBase.class); + protected static HashMap responseTemplate = new HashMap(); static { @@ -55,6 +53,8 @@ public class PublishRequest extends RequestBase implements BayeuxRequest { responseTemplate.put(Bayeux.ADVICE_FIELD, new HashMap()); } + JSONObject msgData = null; + public PublishRequest(TomcatBayeux tb, CometEvent event, JSONObject jsReq) throws JSONException { super(tb, event, jsReq); } @@ -69,6 +69,7 @@ public class PublishRequest extends RequestBase implements BayeuxRequest { * * @return HttpError This method returns null if no errors were found */ + @Override public HttpError validate() { if(channel==null|| (!this.getTomcatBayeux().hasChannel(channel))) return new HttpError(400,"Channel Id not valid.", null); @@ -87,6 +88,7 @@ public class PublishRequest extends RequestBase implements BayeuxRequest { /** * Send the event message to all registered subscribers. */ + @Override public int process(int prevops) throws BayeuxException { super.process(prevops); response = (HashMap)responseTemplate.clone();