-----Original Message-----
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Monday, February 11, 2013 10:46 AM
To: Tomcat Developers List
Subject: Re: EL 3.0, HttpSessionIdListener, HttpServletRequest#changeSessionId()

> For WebSocket I automate it a little by using javap on the spec repository 
> and on Tomcat and then fixing the diffs to the public API by hand.

Here's what I did. Tell me if this sounds about right. I may be way off base 
here.

I compiled Tomcat trunk from latest and copied servlet-api.jar and 
javax.servlet-api-3.1-b05.jar (from Maven, updated January 10) into the same 
directory.

I ran the following commands, which gave me an "index" of sorts of the classes 
in the JAR files.

jar -tf servlet-api.jar | grep class | sed 's/.class//g' > servlet-api.jar.index
jar -tf javax.servlet-api-3.1-b05.jar | grep class | sed 's/.class//g' > 
javax.servlet-api-3.1-b05.jar.index

I then re-ordered the files in one of the index files so that they were in the 
same order (the one compiled on my system had sub-directories before files, the 
other one didn't, so that would throw off a compare).

I then ran javap against both JAR files:

javap -classpath servlet-api.jar -s $(cat servlet-api.jar.index) > 
servlet-api.jar.contents
javap -classpath javax.servlet-api-3.1-b05.jar -s $(cat 
javax.servlet-api-3.1-b05.jar.index) > javax.servlet-api-3.1-b05.jar.contents

I then compared servlet-api.jar.contents and 
javax.servlet-api-3.1-b05.jar.contents (I used FileMerge) and came up with this:

javax.servlet.http.HttpServletRequest: changeSessionId() missing in Tomcat
javax.servlet.http.HttpServletRequest: public abstract void 
upgrade(javax.servlet.http.ProtocolHandler) throws IOException in Tomcat should 
be:
        public abstract <T extends javax.servlet.http.HttpUpgradeHandler> T 
upgrade(java.lang.Class<T>) throws IOException
javax.servlet.http.HttpServletRequestWrapper: changeSessionId() missing
javax.servlet.http.HttpServletRequestWrapper: public void 
upgrade(javax.servlet.http.ProtocolHandler) throws IOException in Tomcat should 
be:
        public <T extends javax.servlet.http.HttpUpgradeHandler> T 
upgrade(java.lang.Class<T>) throws IOException
javax.servlet.http.HttpSessionIdListener: missing in Tomcat
javax.servlet.http.HttpUpgradeHandler: missing in Tomcat
javax.servlet.http.NoBodyOutputStream: public boolean canWrite() in Tomcat 
should be:
        public boolean isReady()
javax.servlet.http.NoBodyResponse: overridden method setContentLengthLong(long) 
in Tomcat is not overridden in spec
javax.servlet.http.NoBodyResponse: overridden method setHeader(String, String) 
in Tomcat is not overridden in spec
javax.servlet.http.NoBodyResponse: overridden method addheader(String, String) 
in Tomcat is not overridden in spec
javax.servlet.http.NoBodyResponse: overridden method setIntHeader(String, int) 
in Tomcat is not overridden in spec
javax.servlet.http.NoBodyResponse: overridden method addIntHeader(String, int) 
in Tomcat is not overridden in spec
javax.servlet.http.NoBodyResponse: static initializer in spec not present in 
Tomcat (is this even a problem?)
javax.servlet.http.ProtocolHandler: superfluous Tomcat class does not exist in 
specification
javax.servlet.http.WebConnection: should extend java.lang.AutoCloseable, does 
not in Tomcat
javax.servlet.GenericServlet: static initializer in spec not present in Tomcat 
(is this even a problem?)
javax.servlet.HttpConstraintElement: static initializer in Tomcat not present 
in spec (is this even a problem?)
javax.servlet.HttpMethodConstraintElement: static initializer in Tomcat not 
present in spec (is this even a problem?)
javax.servlet.ServletOutputStream: public boolean canWrite() in Tomcat should 
be:
        public boolean isReady()

A lot of that is WebSocket related, methinks (upgrade, upgrade handler, no body 
response, protocol handler), so those are yours, and I don't think the static 
initializers matter (though I could be wrong). The rest of it (change session 
ID, session ID change listener, WebConnection needing to extend AutoCloseable, 
and the two canWrites needing to be isReady) seem like some pretty simple 
things that I could knock out in one evening, assuming my contributions 
wouldn't be stepping on anyone's toes.

Before I actually do any work on anything I'd love some feedback on my analysis.

Nick

This e-mail may contain privileged or confidential information. If you are not 
the intended recipient: (1) you may not disclose, use, distribute, copy or rely 
upon this message or attachment(s); and (2) please notify the sender by reply 
e-mail, and then delete this message and its attachment(s). Underwriters 
Laboratories Inc. and its affiliates disclaim all liability for any errors, 
omissions, corruption or virus in this message or any attachments.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to