Re: svn commit: r1500062 - bug55198.jsp
On Jul 5, 2013, at 9:33 AM, ma...@apache.org wrote: > +http://java.sun.com/JSP/Page"; version="2.0"> > + > + > + foo > + bar > + > + > + I believe, strictly, can't have a sub-element like . Wouldn't the test case still hold if the was removed? - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55166] schemaLocation references between servlet and jsp XSDs are invalid
https://issues.apache.org/bugzilla/show_bug.cgi?id=55166 --- Comment #9 from Jeremy Boynes --- (In reply to Konstantin Kolinko from comment #8) > a) You have to configure a resolver to be able to locate schemas. > I should not need to use a resolver for this case. The base location of the schema file is known in the call to newSchema(url) and all the references from that file (its includes) are relative URIs. You can see that if you provide a LSResourceResolver to the schemaFactory where it gets called with type = http://www.w3.org/2001/XMLSchema namespaceURI = http://java.sun.com/xml/ns/javaee publicId = null systemId = jsp_2_2.xsd baseURI = jar:file:/Users/jeremy/apache/apache-tomcat-7.0.41/lib/servlet-api.jar!/javax/servlet/resources/web-common_3_0.xsd Resolving the relative URI of the systemId against the base gives an absolute local URI for the resource being included. This works fine for all the XSDs used by the Servlet specification (for example, the include from web-app to web-common) but fails for the JSPs XSD as it is not in the same relative location as the spec assumes. > Tomcat uses org.apache.catalina.util.SchemaResolver as configured by > org.apache.catalina.startup.DigesterFactory. > See DigesterFactory#registerLocalSchema(). In the Digester code registerLocalSchema(), the local resources are being registered with the filename as the publicId. I don't believe that is correct for the XmlSchema resources - the publicIds are there DTD-based resources with a . For XSD-based documents, xsi:schemaLocation is used to provide the *systemId* for the schema i.e. "http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; and the resolver should be using that to map to the local cached copy. It works because SchemaResolver uses a single lookup table for both publicId and systemId and because (on line 112) it strips the systemId down to just the basename. This stripping down is not actually needed if you see what systemId the EntityResolver is being called with: http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd (returns jar:file:/Users/jeremy/apache/tomcat/trunk/output/build/lib/servlet-api.jar!/javax/servlet/resources/web-app_3_1.xsd) jar:file:/Users/jeremy/apache/tomcat/trunk/output/build/lib/servlet-api.jar!/javax/servlet/resources/web-common_3_1.xsd jar:file:/Users/jeremy/apache/tomcat/trunk/output/build/lib/servlet-api.jar!/javax/servlet/resources/javaee_7.xsd http://www.w3.org/2001/xml.xsd ... jar:file:/Users/jeremy/apache/tomcat/trunk/output/build/lib/servlet-api.jar!/javax/servlet/resources/jsp_2_3.xsd As you can see, the parser is resolving the as a URI relative to the containing document resulting in a systemId for the "jsp_2_3.xsd" relative URI that is in the same place as the containing ".../web-common_3_1.xsd" document. SchemaResolver's implementation works by stripping that down to "jsp_2_3.xsd" and mapping that to the JSP jar. This works but would not be needed if the XSDs were in the same location relative to each other as they are at http://xmlns.jcp.org/xml/ns/javaee/ This could simplify the Digester as its SchemaResolver would only need to be configured with the systemIds that are documented by the specifications (e.g. http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd) for use in deployment descriptors, or with other external schemas (e.g. http://www.w3.org/2001/xml.xsd). It would not need to be configured with the internal references that are not defined by the specifications (e.g. web-common_3_1.xsd, jsp_2_3.xsd and so on). I'll put together a patch to see how much of a difference it makes. > > b) You can use SchemaFactory.newSchema(Source[]). I do not know whether it > helps in your case (maybe it does not help with includes), but it is a way > to pass several schema files to a SchemaFactory. It does not help with the includes as they are using the relative URI references between schema documents. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1500111 - in /tomcat/site/trunk/docs/tomcat-7.0-doc: ./ api/ api/org/apache/catalina/ api/org/apache/catalina/ant/ api/org/apache/catalina/ant/jmx/ api/org/apache/catalina/authenticator/
Author: markt Date: Fri Jul 5 19:37:10 2013 New Revision: 1500111 URL: http://svn.apache.org/r1500111 Log: Update docs for Apache Tomcat 7.0.42 release. [This commit notification would consist of 52 parts, which exceeds the limit of 50 ones, so it was shortened to the summary.] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1500109 - in /tomcat/site/trunk: ./ docs/ xdocs/
Author: markt Date: Fri Jul 5 19:27:29 2013 New Revision: 1500109 URL: http://svn.apache.org/r1500109 Log: Updates (excluding docs) for 7.0.42 release Modified: tomcat/site/trunk/build.properties.default tomcat/site/trunk/docs/doap_Tomcat.rdf tomcat/site/trunk/docs/download-70.html tomcat/site/trunk/docs/index.html tomcat/site/trunk/docs/migration-7.html tomcat/site/trunk/docs/oldnews.html tomcat/site/trunk/docs/whichversion.html tomcat/site/trunk/xdocs/doap_Tomcat.rdf tomcat/site/trunk/xdocs/download-70.xml tomcat/site/trunk/xdocs/index.xml tomcat/site/trunk/xdocs/migration-7.xml tomcat/site/trunk/xdocs/oldnews.xml tomcat/site/trunk/xdocs/whichversion.xml Modified: tomcat/site/trunk/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/site/trunk/build.properties.default?rev=1500109&r1=1500108&r2=1500109&view=diff == --- tomcat/site/trunk/build.properties.default (original) +++ tomcat/site/trunk/build.properties.default Fri Jul 5 19:27:29 2013 @@ -37,7 +37,7 @@ tomcat.loc=http://www.apache.org/dist/to # - Tomcat versions - tomcat60=6.0.36 -tomcat70=7.0.41 +tomcat70=7.0.42 # - Download destination - Modified: tomcat/site/trunk/docs/doap_Tomcat.rdf URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/doap_Tomcat.rdf?rev=1500109&r1=1500108&r2=1500109&view=diff == --- tomcat/site/trunk/docs/doap_Tomcat.rdf (original) +++ tomcat/site/trunk/docs/doap_Tomcat.rdf Fri Jul 5 19:27:29 2013 @@ -57,8 +57,8 @@ Latest Stable 7.0.x Release -2013-06-10 -7.0.41 +2013-07-05 +7.0.42 Modified: tomcat/site/trunk/docs/download-70.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-70.html?rev=1500109&r1=1500108&r2=1500109&view=diff == --- tomcat/site/trunk/docs/download-70.html (original) +++ tomcat/site/trunk/docs/download-70.html Fri Jul 5 19:27:29 2013 @@ -212,8 +212,8 @@ http://www.apache.org/dist/tomcat/tomcat-7/KEYS";>KEYS | -7.0.41 | -Browse | +7.0.42 | +Browse | http://archive.apache.org/dist/tomcat/tomcat-7";>Archives @@ -301,7 +301,7 @@ -7.0.41 +7.0.42 @@ -310,8 +310,8 @@ -Please see the - README +Please see the + README file for packaging information. It explains what every distribution contains. @@ -332,44 +332,44 @@ -zip -(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.41/bin/apache-tomcat-7.0.41.zip.asc";>pgp, -http://www.apache.org/dist/tomcat/tomcat-7/v7.0.41/bin/apache-tomcat-7.0.41.zip.md5";>md5) +zip +(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42.zip.asc";>pgp, +http://www.apache.org/dist/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42.zip.md5";>md5) -tar.gz -(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.41/bin/apache-tomcat-7.0.41.tar.gz.asc";>pgp, -http://www.apache.org/dist/tomcat/tomcat-7/v7.0.41/bin/apache-tomcat-7.0.41.tar.gz.md5";>md5) +tar.gz +(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42.tar.gz.asc";>pgp, +http://www.apache.org/dist/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42.tar.gz.md5";>md5) -32-bit Windows zip -(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.41/bin/apache-tomcat-7.0.41-windows-x86.zip.asc";>pgp, -http://www.apache.org/dist/tomcat/tomcat-7/v7.0.41/bin/apache-tomcat-7.0.41-windows-x86.zip.md5";>md5) +32-bit Windows zip +(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42-windows-x86.zip.asc";>pgp, +http://www.apache.org/dist/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42-windows-x86.zip.md5";>md5) -64-bit Windows zip -(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.41/bin/apache-tomcat-7.0.41-windows-x64.zip.asc";>pgp, -http://www.apache.org/dist/tomcat/tomcat-7/v7.0.41/bin/apache-tomcat-7.0.41-windows-x64.zip.md5";>md5) +64-bit Windows zip +(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42-windows-x64.zip.asc";>pgp, +http://www.apache.org/dist/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42-windows-x64.zip.md5";>md5) -64-bit Itanium Windows zip -(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.41/bin/apache-tomcat-7.0.41-windows-i64.zip.asc";>pgp, -http://www.apache.org/dist/tomcat/tomcat-
svn commit: r1500105 - in /tomcat/tc7.0.x/trunk: ./ java/javax/el/ELContext.java test/javax/el/TestELContext.java test/javax/el/TesterELContext.java webapps/docs/changelog.xml
Author: violetagg Date: Fri Jul 5 19:09:16 2013 New Revision: 1500105 URL: http://svn.apache.org/r1500105 Log: Merged revision 1499953 from tomcat/trunk: According EL javadoc ELContext.getContext must throw NPE when the provided class is NULL. Added: tomcat/tc7.0.x/trunk/test/javax/el/TestELContext.java - copied unchanged from r1499953, tomcat/trunk/test/javax/el/TestELContext.java tomcat/tc7.0.x/trunk/test/javax/el/TesterELContext.java - copied unchanged from r1499953, tomcat/trunk/test/javax/el/TesterELContext.java Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/javax/el/ELContext.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1499953 Modified: tomcat/tc7.0.x/trunk/java/javax/el/ELContext.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/javax/el/ELContext.java?rev=1500105&r1=1500104&r2=1500105&view=diff == --- tomcat/tc7.0.x/trunk/java/javax/el/ELContext.java (original) +++ tomcat/tc7.0.x/trunk/java/javax/el/ELContext.java Fri Jul 5 19:09:16 2013 @@ -40,7 +40,14 @@ public abstract class ELContext { } // Can't use Class because API needs to match specification +/** + * @throws NullPointerException + * If the provided key is null + */ public Object getContext(@SuppressWarnings("rawtypes") Class key) { +if (key == null) { +throw new NullPointerException(); +} if (this.map == null) { return null; } Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1500105&r1=1500104&r2=1500105&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Jul 5 19:09:16 2013 @@ -70,6 +70,11 @@ 55198: Ensure attribute values in tagx files that include EL and quoted XML characters are correctly quoted in the output. (markt) + +Ensure that javax.el.ELContext.getContext(Class) will +throw NullPointerException when the provided class is +null. (violetagg) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1500094 - in /tomcat/tc7.0.x/trunk: build.properties.default res/maven/mvn.properties.default
Author: markt Date: Fri Jul 5 18:41:32 2013 New Revision: 1500094 URL: http://svn.apache.org/r1500094 Log: Prep for next version Modified: tomcat/tc7.0.x/trunk/build.properties.default tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default Modified: tomcat/tc7.0.x/trunk/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.properties.default?rev=1500094&r1=1500093&r2=1500094&view=diff == --- tomcat/tc7.0.x/trunk/build.properties.default (original) +++ tomcat/tc7.0.x/trunk/build.properties.default Fri Jul 5 18:41:32 2013 @@ -27,7 +27,7 @@ # - Version Control Flags - version.major=7 version.minor=0 -version.build=42 +version.build=43 version.patch=0 version.suffix=-dev Modified: tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default?rev=1500094&r1=1500093&r2=1500094&view=diff == --- tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default (original) +++ tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default Fri Jul 5 18:41:32 2013 @@ -35,7 +35,7 @@ maven.asf.release.repo.url=https://repos maven.asf.release.repo.repositoryId=apache.releases # Release version info -maven.asf.release.deploy.version=7.0.42 +maven.asf.release.deploy.version=7.0.43 #Where do we load the libraries from tomcat.lib.path=../../output/build/lib - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55170] [websocket][jsr 356]Thread falls in endless cycle when connection is reset
https://issues.apache.org/bugzilla/show_bug.cgi?id=55170 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Mark Thomas --- Thanks for doing the extra digging. I can't see how a BufferOverflow is ever recoverable in those circumstances since there is no way to make any more space in the destination buffer. I've modified trunk to throw an exception in this case. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1500093 - in /tomcat/trunk/java/org/apache/tomcat/websocket: AsyncChannelWrapperSecure.java LocalStrings.properties
Author: markt Date: Fri Jul 5 18:37:01 2013 New Revision: 1500093 URL: http://svn.apache.org/r1500093 Log: Buffer overflow is fatal on read Modified: tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java?rev=1500093&r1=1500092&r2=1500093&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java Fri Jul 5 18:37:01 2013 @@ -277,9 +277,9 @@ public class AsyncChannelWrapperSecure i read += r.bytesProduced(); Status s = r.getStatus(); -if (s == Status.OK || s == Status.BUFFER_OVERFLOW) { +if (s == Status.OK) { // Bytes available for reading and there may be -// sufficientNeed data in the socketReadBuffer to +// sufficient data in the socketReadBuffer to // support further reads without reading from the // socket } else if (s == Status.BUFFER_UNDERFLOW) { @@ -291,6 +291,13 @@ public class AsyncChannelWrapperSecure i } // else return the data we have and deal with the // partial data on the next read +} else if (s == Status.BUFFER_OVERFLOW) { +// Not enough space in the destination buffer to +// store all of the data +throw new IOException(sm.getString( +"asyncChannelWrapperSecure.readOverflow", +Integer.valueOf(dest.limit()), +Integer.valueOf(dest.position(; } else { // Status.CLOSED - unexpected throw new IllegalStateException(sm.getString( Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties?rev=1500093&r1=1500092&r2=1500093&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Fri Jul 5 18:37:01 2013 @@ -17,6 +17,7 @@ asyncChannelWrapperSecure.closeFail=Fail asyncChannelWrapperSecure.concurrentRead=Concurrent read operations are not permitted asyncChannelWrapperSecure.concurrentWrite=Concurrent write operations are not permitted asyncChannelWrapperSecure.eof=Unexpected end of stream +asyncChannelWrapperSecure.readOverflow=Unable to complete read due to destination buffer overflow. Destination is [{0}] bytes in size and currently contains [{1}] bytes. asyncChannelWrapperSecure.statusUnwrap=Unexpected Status of SSLEngineResult after an unwrap() operation asyncChannelWrapperSecure.statusWrap=Unexpected Status of SSLEngineResult after a wrap() operation asyncChannelWrapperSecure.tooBig=The result [{0}] is too big to be expressed as an Integer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55200] [websocket] Problem writing many subsequent binary messages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55200 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Mark Thomas --- Thanks for the report. I agree with your analysis. I can't reproduce this but I have implemented what I believe is an appropriate fix in trunk. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1500075 - in /tomcat/trunk/java/org/apache/tomcat/websocket: AsyncChannelWrapperSecure.java LocalStrings.properties
Author: markt Date: Fri Jul 5 17:22:06 2013 New Revision: 1500075 URL: http://svn.apache.org/r1500075 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55200 It is possible that more than one write will be required to empty the buffer. Modified: tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java?rev=1500075&r1=1500074&r2=1500075&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java Fri Jul 5 17:22:06 2013 @@ -214,13 +214,12 @@ public class AsyncChannelWrapperSecure i socketWriteBuffer.flip(); // Do the write -Future f = socketChannel.write(socketWriteBuffer); -Integer socketWrite = f.get(); -if (socketWrite.intValue() != r.bytesProduced()) { -throw new IOException(sm.getString( -"asyncChannelWrapperSecure.writeFail", -Integer.valueOf(socketWrite.intValue()), -Integer.valueOf(r.bytesProduced(; +int toWrite = r.bytesProduced(); +while (toWrite > 0) { +Future f = +socketChannel.write(socketWriteBuffer); +Integer socketWrite = f.get(); +toWrite -= socketWrite.intValue(); } } } Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties?rev=1500075&r1=1500074&r2=1500075&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Fri Jul 5 17:22:06 2013 @@ -22,7 +22,6 @@ asyncChannelWrapperSecure.statusWrap=Une asyncChannelWrapperSecure.tooBig=The result [{0}] is too big to be expressed as an Integer asyncChannelWrapperSecure.wrongStateRead=Flag that indicates a read is in progress was found to be false (it should have been true) when trying to complete a read operation asyncChannelWrapperSecure.wrongStateWrite=Flag that indicates a write is in progress was found to be false (it should have been true) when trying to complete a write operation -asyncChannelWrapperSecure.writeFail=Only wrote [{0}] of [{1}] bytes backgroundProcessManager.processFailed=A background process failed - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55198] Quote entity in html element attribute evaluated in tagx if attribute contains EL expression
https://issues.apache.org/bugzilla/show_bug.cgi?id=55198 Mark Thomas changed: What|Removed |Added Component|Servlet & JSP API |Jasper Version|7.0.41 |6.0.37 Product|Tomcat 7|Tomcat 6 Target Milestone|--- |default OS||All --- Comment #1 from Mark Thomas --- Fixed in trunk and 7.0.x and will be included in 7.0.43 onwards. Since you are using 6.0.x, I have moved this to 6.0.x and proposed the fix for back-porting. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1500067 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Fri Jul 5 16:49:29 2013 New Revision: 1500067 URL: http://svn.apache.org/r1500067 Log: Proposal Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1500067&r1=1500066&r2=1500067&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Jul 5 16:49:29 2013 @@ -75,7 +75,7 @@ PATCHES PROPOSED TO BACKPORT: +1: kkolinko -1: -* Update Maven Cental location used to download dependencies at build time +* Update Maven Central location used to download dependencies at build time to be repo.maven.apache.org. (This was suggested by Olivier Lamy in Re:r1307146, http://markmail.org/message/6q2yfkqvic7bcpib ) @@ -83,6 +83,12 @@ PATCHES PROPOSED TO BACKPORT: +1: kkolinko -1: +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55198 + Correctly escape XML output from tagx files. + http://svn.apache.org/r1500065 (excluding tests) + +1: markt + -1: + PATCHES/ISSUES THAT ARE STALLED - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1500065 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/Generator.java test/org/apache/jasper/compiler/TestParser.java test/webapp-3.0/WEB-INF/tags/bug55198.tagx test/webap
Author: markt Date: Fri Jul 5 16:47:09 2013 New Revision: 1500065 URL: http://svn.apache.org/r1500065 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55198 ELInterpreter needs to know if page was originally in XML Added: tomcat/tc7.0.x/trunk/test/webapp-3.0/WEB-INF/tags/bug55198.tagx - copied unchanged from r1500062, tomcat/trunk/test/webapp/WEB-INF/tags/bug55198.tagx tomcat/tc7.0.x/trunk/test/webapp-3.0/bug5/bug55198.jsp - copied unchanged from r1500062, tomcat/trunk/test/webapp/bug5/bug55198.jsp Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Generator.java tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestParser.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1500062 Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Generator.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Generator.java?rev=1500065&r1=1500064&r2=1500065&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Generator.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Generator.java Fri Jul 5 16:47:09 2013 @@ -821,7 +821,7 @@ class Generator { *attributes that aren't EL expressions) */ private String attributeValue(Node.JspAttribute attr, boolean encode, -Class expectedType) { +Class expectedType, boolean isXml) { String v = attr.getValue(); if (!attr.isNamedAttribute() && (v == null)) return ""; @@ -834,7 +834,7 @@ class Generator { return v; } else if (attr.isELInterpreterInput()) { v = elInterpreter.interpreterCall(ctxt, this.isTagFile, v, -expectedType, attr.getEL().getMapName(), false); +expectedType, attr.getEL().getMapName(), isXml); if (encode) { return "org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode(" + v + ", request.getCharacterEncoding())"; @@ -879,7 +879,8 @@ class Generator { + "URLEncode(" + quote(n.getTextAttribute("name")) + ", request.getCharacterEncoding())"); out.print("+ \"=\" + "); -out.print(attributeValue(n.getValue(), true, String.class)); +out.print(attributeValue(n.getValue(), true, String.class, +n.getRoot().isXmlSyntax())); // The separator is '&' after the second use separator = "\"&\""; @@ -950,7 +951,8 @@ class Generator { pageParam = generateNamedAttributeValue(page .getNamedAttributeNode()); } else { -pageParam = attributeValue(page, false, String.class); +pageParam = attributeValue(page, false, String.class, +n.getRoot().isXmlSyntax()); } // If any of the params have their values specified by @@ -1036,7 +1038,8 @@ class Generator { pageParam = generateNamedAttributeValue(page .getNamedAttributeNode()); } else { -pageParam = attributeValue(page, false, String.class); +pageParam = attributeValue(page, false, String.class, +n.getRoot().isXmlSyntax()); } // If any of the params have their values specified by @@ -1143,7 +1146,8 @@ class Generator { + "_jspx_page_context.findAttribute(\"" + name + "\"), \"" + property + "\","); -out.print(attributeValue(value, false, null)); +out.print(attributeValue(value, false, null, +n.getRoot().isXmlSyntax())); out.println(");"); } else if (value.isELInterpreterInput()) { // We've got to resolve the very call to the interpreter @@ -1188,7 +1192,8 @@ class Generator { + "_jspx_page_context.findAttribute(\"" + name + "\"), \"" + property + "\", "); -out.print(attributeValue(value, false, null)); +out.print(attributeValue(value, false, null, +n.getRoot().isXmlSyntax())); out.println(", null, null, false);"); } @@ -1320,7 +1325,7 @@ class Generator { .getNamedAttributeNode()); } else {
svn commit: r1500062 - in /tomcat/trunk: java/org/apache/jasper/compiler/Generator.java test/org/apache/jasper/compiler/TestParser.java test/webapp/WEB-INF/tags/bug55198.tagx test/webapp/bug5nnnn/bug5
Author: markt Date: Fri Jul 5 16:33:06 2013 New Revision: 1500062 URL: http://svn.apache.org/r1500062 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55198 ELInterpreter needs to know if page was originally in XML Added: tomcat/trunk/test/webapp/WEB-INF/tags/bug55198.tagx tomcat/trunk/test/webapp/bug5/bug55198.jsp (with props) Modified: tomcat/trunk/java/org/apache/jasper/compiler/Generator.java tomcat/trunk/test/org/apache/jasper/compiler/TestParser.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/Generator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Generator.java?rev=1500062&r1=1500061&r2=1500062&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/Generator.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Generator.java Fri Jul 5 16:33:06 2013 @@ -820,7 +820,7 @@ class Generator { *attributes that aren't EL expressions) */ private String attributeValue(Node.JspAttribute attr, boolean encode, -Class expectedType) { +Class expectedType, boolean isXml) { String v = attr.getValue(); if (!attr.isNamedAttribute() && (v == null)) return ""; @@ -833,7 +833,7 @@ class Generator { return v; } else if (attr.isELInterpreterInput()) { v = elInterpreter.interpreterCall(ctxt, this.isTagFile, v, -expectedType, attr.getEL().getMapName(), false); +expectedType, attr.getEL().getMapName(), isXml); if (encode) { return "org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode(" + v + ", request.getCharacterEncoding())"; @@ -878,7 +878,8 @@ class Generator { + "URLEncode(" + quote(n.getTextAttribute("name")) + ", request.getCharacterEncoding())"); out.print("+ \"=\" + "); -out.print(attributeValue(n.getValue(), true, String.class)); +out.print(attributeValue(n.getValue(), true, String.class, +n.getRoot().isXmlSyntax())); // The separator is '&' after the second use separator = "\"&\""; @@ -949,7 +950,8 @@ class Generator { pageParam = generateNamedAttributeValue(page .getNamedAttributeNode()); } else { -pageParam = attributeValue(page, false, String.class); +pageParam = attributeValue(page, false, String.class, +n.getRoot().isXmlSyntax()); } // If any of the params have their values specified by @@ -1035,7 +1037,8 @@ class Generator { pageParam = generateNamedAttributeValue(page .getNamedAttributeNode()); } else { -pageParam = attributeValue(page, false, String.class); +pageParam = attributeValue(page, false, String.class, +n.getRoot().isXmlSyntax()); } // If any of the params have their values specified by @@ -1142,7 +1145,8 @@ class Generator { + "_jspx_page_context.findAttribute(\"" + name + "\"), \"" + property + "\","); -out.print(attributeValue(value, false, null)); +out.print(attributeValue(value, false, null, +n.getRoot().isXmlSyntax())); out.println(");"); } else if (value.isELInterpreterInput()) { // We've got to resolve the very call to the interpreter @@ -1187,7 +1191,8 @@ class Generator { + "_jspx_page_context.findAttribute(\"" + name + "\"), \"" + property + "\", "); -out.print(attributeValue(value, false, null)); +out.print(attributeValue(value, false, null, +n.getRoot().isXmlSyntax())); out.println(", null, null, false);"); } @@ -1319,7 +1324,7 @@ class Generator { .getNamedAttributeNode()); } else { binaryName = attributeValue(beanName, false, -String.class); +String.class, n.getRoot().isXmlSyntax()); } } else { // Implies klass is not null @@ -1428,20 +1433,24 @@ class Generator { // We want something of the form // out.println( "" ); -out.printil(
buildbot success in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a restored build on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1282 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1500019 Blamelist: markt Build succeeded! sincerely, -The Buildbot
[Bug 55170] [websocket][jsr 356]Thread falls in endless cycle when connection is reset
https://issues.apache.org/bugzilla/show_bug.cgi?id=55170 Stoyan Boshev changed: What|Removed |Added Status|NEEDINFO|NEW --- Comment #2 from Stoyan Boshev --- I am using JDK 7 (build 1.7.0_21-b11). I did some debugging on this problem. It seems the code in AsyncChannelWrapperSecure$ReadTask.run() falls into endless cycle because the returned SSLEngineResult at line 276 is with status Status.BUFFER_OVERFLOW. Also the call to bytesProduced() returns 0 which results in read variable staying with value 0. This leads to endless cycle in method AsyncChannelWrapperSecure$ReadTask.run(). -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1500019 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Author: markt Date: Fri Jul 5 14:28:13 2013 New Revision: 1500019 URL: http://svn.apache.org/r1500019 Log: Add missing quote Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1500019&r1=1500018&r2=1500019&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Jul 5 14:28:13 2013 @@ -77,7 +77,7 @@ - - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55200] New: [websocket] Problem writing many subsequent binary messages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55200 Bug ID: 55200 Summary: [websocket] Problem writing many subsequent binary messages Product: Tomcat 8 Version: trunk Hardware: Other OS: Linux Status: NEW Severity: major Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: s.bos...@gmail.com I see sometimes failing connections due to IOException (see below). This happens when trying to send thousands of binary messages (1024 bytes each) without any delay between the subsequent messages. Having look at the code in AsyncChannelWrapperSecure$WriteTask.run(219), I think it is not correct to assume that if not all of the bytes in the buffer are written, this shall produce IOException. I think in this case, there shall be an attempt to write the rest of the bytes in a cycle. Here one exception I got during the test: Exception is :java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: Only wrote [460] of [1,098] bytes at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessageBlock(WsRemoteEndpointImplBase.java:204) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendBytes(WsRemoteEndpointImplBase.java:113) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendBinary(WsRemoteEndpointBasic.java:43) at WebsocketsTestManager$TestThread.run(WebsocketsTestManager.java:271) Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Only wrote [460] of [1,098] bytes at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$FutureToSendHandler.get(WsRemoteEndpointImplBase.java:729) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessageBlock(WsRemoteEndpointImplBase.java:202) ... 3 more Caused by: java.io.IOException: Only wrote [460] of [1,098] bytes at org.apache.tomcat.websocket.AsyncChannelWrapperSecure$WriteTask.run(AsyncChannelWrapperSecure.java:220) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:789) -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a new failure on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1281 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 158 Blamelist: markt BUILD FAILED: failed compile sincerely, -The Buildbot
svn commit: r1500008 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Author: markt Date: Fri Jul 5 13:46:20 2013 New Revision: 158 URL: http://svn.apache.org/r158 Log: Add release date for 7.0.42 Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=158&r1=157&r2=158&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Jul 5 13:46:20 2013 @@ -77,7 +77,7 @@ - + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r2363 - /dev/tomcat/tomcat-7/v7.0.42/ /release/tomcat/tomcat-7/v7.0.42/
Author: markt Date: Fri Jul 5 13:44:40 2013 New Revision: 2363 Log: Release Apache Tomcat 7.0.42 Added: release/tomcat/tomcat-7/v7.0.42/ - copied from r2362, dev/tomcat/tomcat-7/v7.0.42/ Removed: dev/tomcat/tomcat-7/v7.0.42/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r2363 - /dev/tomcat/tomcat-7/v7.0.42/ /release/tomcat/tomcat-7/v7.0.42/
Author: markt Date: Fri Jul 5 13:44:40 2013 New Revision: 2363 Log: Release Apache Tomcat 7.0.42 Added: release/tomcat/tomcat-7/v7.0.42/ - copied from r2362, dev/tomcat/tomcat-7/v7.0.42/ Removed: dev/tomcat/tomcat-7/v7.0.42/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[RESULT][VOTE] Release Apache Tomcat 7.0.42
+1 (binding): hgomez, yoavs, rjung, kfujino, olamy, markt +1 (non-binding): violetagg, Ognjen Blagojevic, Brian Burch, Tony Chemit No other voters were cast. The vote has passed. I'll do the release shortly and announce it once the mirrors catch up. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55186] useIPVHosts=true , incorrect to get Request.localName
https://issues.apache.org/bugzilla/show_bug.cgi?id=55186 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Mark Thomas --- Thanks for the report. This has been fixed in trunk and 7.0.x and will be included in 7.0.43 onwards. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 7.0.42
On 02/07/2013 10:18, Mark Thomas wrote: > The proposed Apache Tomcat 7.0.42 release is now available for voting. > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.42/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-098/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_42/ > > The proposed 7.0.42 release is: > [ ] Broken - do not release > [X] Stable - go ahead and release as 7.0.42 Stable Unit tests pass on 64-bit Windows and 64-bit Linux EL TCK passes JSP TCK passes with HTTP (direct) BIO, NIO & APR/native (1.1.27) Servlet TCK passes with - HTTP (direct) BIO, NIO & APR/native (1.1.27) - HTTP (mod_proxy_http) BIO, NIO & APR/native (1.1.27) - AJP (mod_jk) BIO, NIO & APR/native (1.1.27) - AJP (mod_proxy_ajp) BIO, NIO & APR/native (1.1.27) All TCK tests run on 64-bit Linux with a security manager Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1500006 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/Request.java webapps/docs/changelog.xml
Author: markt Date: Fri Jul 5 13:36:55 2013 New Revision: 156 URL: http://svn.apache.org/r156 Log: Ensure local name is recycled between requests so IP virtual hosting works correctly. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r153 Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java?rev=156&r1=155&r2=156&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java Fri Jul 5 13:36:55 2013 @@ -486,6 +486,7 @@ public final class Request { headers.recycle(); serverNameMB.recycle(); serverPort=-1; +localNameMB.recycle(); localPort = -1; remotePort = -1; available = 0; Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=156&r1=155&r2=156&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Jul 5 13:36:55 2013 @@ -56,6 +56,14 @@ issues to not "pop up" wrt. others). --> + + + +55186: Ensure local name is recycled between requests so IP +virtual hosting works correctly. (markt) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1500003 - /tomcat/trunk/java/org/apache/coyote/Request.java
Author: markt Date: Fri Jul 5 13:34:16 2013 New Revision: 153 URL: http://svn.apache.org/r153 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55186 Ensure local name is recycled between requests so IP virtual hosting works correctly. Modified: tomcat/trunk/java/org/apache/coyote/Request.java Modified: tomcat/trunk/java/org/apache/coyote/Request.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Request.java?rev=153&r1=152&r2=153&view=diff == --- tomcat/trunk/java/org/apache/coyote/Request.java (original) +++ tomcat/trunk/java/org/apache/coyote/Request.java Fri Jul 5 13:34:16 2013 @@ -516,6 +516,7 @@ public final class Request { headers.recycle(); serverNameMB.recycle(); serverPort=-1; +localNameMB.recycle(); localPort = -1; remotePort = -1; available = 0; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55166] schemaLocation references between servlet and jsp XSDs are invalid
https://issues.apache.org/bugzilla/show_bug.cgi?id=55166 --- Comment #8 from Konstantin Kolinko --- You are doing it wrong. a) You have to configure a resolver to be able to locate schemas. Tomcat uses org.apache.catalina.util.SchemaResolver as configured by org.apache.catalina.startup.DigesterFactory. See DigesterFactory#registerLocalSchema(). b) You can use SchemaFactory.newSchema(Source[]). I do not know whether it helps in your case (maybe it does not help with includes), but it is a way to pass several schema files to a SchemaFactory. c) You can bundle and redistribute schema files on your own, without relying on ones used internally by Tomcat. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1499953 - in /tomcat/trunk: java/javax/el/ELContext.java test/javax/el/TestELContext.java test/javax/el/TesterELContext.java
Author: violetagg Date: Fri Jul 5 09:11:24 2013 New Revision: 1499953 URL: http://svn.apache.org/r1499953 Log: Since EL 2.2 javadoc ELContext.getContext must throw NPE when the key that is provided in NULL. Added: tomcat/trunk/test/javax/el/TestELContext.java (with props) tomcat/trunk/test/javax/el/TesterELContext.java (with props) Modified: tomcat/trunk/java/javax/el/ELContext.java Modified: tomcat/trunk/java/javax/el/ELContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ELContext.java?rev=1499953&r1=1499952&r2=1499953&view=diff == --- tomcat/trunk/java/javax/el/ELContext.java (original) +++ tomcat/trunk/java/javax/el/ELContext.java Fri Jul 5 09:11:24 2013 @@ -77,7 +77,14 @@ public abstract class ELContext { } // Can't use Class because API needs to match specification +/** + * @throws NullPointerException + * If the key is null + */ public Object getContext(@SuppressWarnings("rawtypes") Class key) { +if (key == null) { +throw new NullPointerException(); +} if (this.map == null) { return null; } Added: tomcat/trunk/test/javax/el/TestELContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TestELContext.java?rev=1499953&view=auto == --- tomcat/trunk/test/javax/el/TestELContext.java (added) +++ tomcat/trunk/test/javax/el/TestELContext.java Fri Jul 5 09:11:24 2013 @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package javax.el; + +import org.junit.Test; + +public class TestELContext { + +/** + * Tests that a null key results in an NPE as per EL Javadoc. + */ +@Test(expected = NullPointerException.class) +public void testGetContext() { +ELContext elContext = new TesterELContext(); +elContext.getContext(null); +} + +} Propchange: tomcat/trunk/test/javax/el/TestELContext.java -- svn:eol-style = native Added: tomcat/trunk/test/javax/el/TesterELContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TesterELContext.java?rev=1499953&view=auto == --- tomcat/trunk/test/javax/el/TesterELContext.java (added) +++ tomcat/trunk/test/javax/el/TesterELContext.java Fri Jul 5 09:11:24 2013 @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package javax.el; + +public class TesterELContext extends ELContext { + +@Override +public ELResolver getELResolver() { +return null; +} + +@Override +public FunctionMapper getFunctionMapper() { +return null; +} + +@Override +public VariableMapper getVariableMapper() { +return null; +} + +} Propchange: tomcat/trunk/test/javax/el/TesterELContext.java -- svn:eol-style = native - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55171] [jsr 356] All server threads become blocked after some websocket testing
https://issues.apache.org/bugzilla/show_bug.cgi?id=55171 --- Comment #6 from Mark Thomas --- (In reply to Niki Dokovski from comment #5) > Should we try to have the "future" get version with the timeout? Sending > close as a result of an exception is an error situation anyway. That is certainly worth looking at. Looking at the code, I wonder if there is a wider problem with blocking writes. As I can't reproduce this issue at the moment, it would be very helpful if the original reporter (Stoyan Boshev) could do find out (e.g. with a debugger) the value of SocketProcessor.status for those threads that are blocked at line 1542 of NioEndpoint. I suspect that they will show Tomcat is trying to close the connection but can't because of the lock. If that is the case I need to do some more thinking on how the blocking writes are handled. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1499932 - /tomcat/trunk/test/javax/el/TestBeanNameELResolver.java
Author: markt Date: Fri Jul 5 08:19:17 2013 New Revision: 1499932 URL: http://svn.apache.org/r1499932 Log: More unit tests for BeanNameELResolver Add tests for remaining methods Modified: tomcat/trunk/test/javax/el/TestBeanNameELResolver.java Modified: tomcat/trunk/test/javax/el/TestBeanNameELResolver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TestBeanNameELResolver.java?rev=1499932&r1=1499931&r2=1499932&view=diff == --- tomcat/trunk/test/javax/el/TestBeanNameELResolver.java (original) +++ tomcat/trunk/test/javax/el/TestBeanNameELResolver.java Fri Jul 5 08:19:17 2013 @@ -468,6 +468,60 @@ public class TestBeanNameELResolver { } +/** + * Confirm it returns null for 'valid' input. + */ +public void testGetFeatureDescriptors01() { +BeanNameELResolver resolver = createBeanNameELResolver(); +ELContext context = +new StandardELContext(ELManager.getExpressionFactory()); + +Object result = resolver.getFeatureDescriptors(context, null); + +Assert.assertNull(result); +Assert.assertFalse(context.isPropertyResolved()); +} + + +/** + * Confirm it returns null for invalid input. + */ +public void testGetFeatureDescriptors02() { +BeanNameELResolver resolver = createBeanNameELResolver(); + +Object result = resolver.getFeatureDescriptors(null, new Object()); + +Assert.assertNull(result); +} + + +/** + * Confirm it returns String.class for 'valid' input. + */ +public void testGetCommonPropertyType01() { +BeanNameELResolver resolver = createBeanNameELResolver(); +ELContext context = +new StandardELContext(ELManager.getExpressionFactory()); + +Object result = resolver.getCommonPropertyType(context, null); + +Assert.assertNull(result); +Assert.assertFalse(context.isPropertyResolved()); +} + + +/** + * Confirm it returns String.class for invalid input. + */ +public void testGetCommonPropertyType02() { +BeanNameELResolver resolver = createBeanNameELResolver(); + +Object result = resolver.getCommonPropertyType(null, new Object()); + +Assert.assertNull(result); +} + + private void doThrowableTest(String trigger, MethodUnderTest method) { BeanNameELResolver resolver = createBeanNameELResolver(); ELContext context = - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1499928 - in /tomcat/trunk: java/javax/el/BeanNameELResolver.java test/javax/el/TestBeanNameELResolver.java test/javax/el/TesterBeanNameResolver.java
Author: markt Date: Fri Jul 5 08:13:06 2013 New Revision: 1499928 URL: http://svn.apache.org/r1499928 Log: More unit tests for BeanNameELResolver Fix several bugs - add missing exception handling to isReadOnly() - correct exception handling in setValue() Modified: tomcat/trunk/java/javax/el/BeanNameELResolver.java tomcat/trunk/test/javax/el/TestBeanNameELResolver.java tomcat/trunk/test/javax/el/TesterBeanNameResolver.java Modified: tomcat/trunk/java/javax/el/BeanNameELResolver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/BeanNameELResolver.java?rev=1499928&r1=1499927&r2=1499928&view=diff == --- tomcat/trunk/java/javax/el/BeanNameELResolver.java (original) +++ tomcat/trunk/java/javax/el/BeanNameELResolver.java Fri Jul 5 08:13:06 2013 @@ -70,11 +70,21 @@ public class BeanNameELResolver extends String beanName = (String) property; boolean isResolved = context.isPropertyResolved(); -if (isReadOnly(context, base, property)) { + +boolean isReadOnly; +try { +isReadOnly = isReadOnly(context, base, property); +} catch (Throwable t) { +Util.handleThrowable(t); +throw new ELException(t); +} finally { +context.setPropertyResolved(isResolved); +} + +if (isReadOnly) { throw new PropertyNotWritableException(Util.message(context, "beanNameELResolver.beanReadOnly", beanName)); } -context.setPropertyResolved(isResolved); if (beanNameResolver.isNameResolved(beanName) || beanNameResolver.canCreateBean(beanName)) { @@ -128,8 +138,15 @@ public class BeanNameELResolver extends String beanName = (String) property; if (beanNameResolver.isNameResolved(beanName)) { +boolean result; +try { +result = beanNameResolver.isReadOnly(beanName); +} catch (Throwable t) { +Util.handleThrowable(t); +throw new ELException(t); +} context.setPropertyResolved(true); -return beanNameResolver.isReadOnly(beanName); +return result; } // Return value undefined Modified: tomcat/trunk/test/javax/el/TestBeanNameELResolver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TestBeanNameELResolver.java?rev=1499928&r1=1499927&r2=1499928&view=diff == --- tomcat/trunk/test/javax/el/TestBeanNameELResolver.java (original) +++ tomcat/trunk/test/javax/el/TestBeanNameELResolver.java Fri Jul 5 08:13:06 2013 @@ -347,6 +347,127 @@ public class TestBeanNameELResolver { } +/** + * Tests that a null context results in an NPE as per EL Javadoc. + */ +@Test(expected=NullPointerException.class) +public void testIsReadOnly01() { +BeanNameELResolver resolver = createBeanNameELResolver(); +resolver.isReadOnly(null, new Object(), new Object()); +} + + +/** + * Tests that a writable bean is reported as writable. + */ +@Test +public void testIsReadOnly02() { + +BeanNameELResolver resolver = createBeanNameELResolver(); +ELContext context = +new StandardELContext(ELManager.getExpressionFactory()); + +boolean result = resolver.isReadOnly(context, null, BEAN01_NAME); + +Assert.assertFalse(result); +Assert.assertTrue(context.isPropertyResolved()); +} + + +/** + * Tests that a read-only bean is reported as not writable. + */ +@Test +public void testIsReadOnly03() { + +BeanNameELResolver resolver = createBeanNameELResolver(); +ELContext context = +new StandardELContext(ELManager.getExpressionFactory()); + +boolean result = resolver.isReadOnly(context, null, +TesterBeanNameResolver.READ_ONLY_NAME); + +Assert.assertTrue(result); +Assert.assertTrue(context.isPropertyResolved()); +} + + +/** + * Tests that a valid bean is not resolved if base is non-null. + */ +@Test +public void testIsReadOnly04() { + +BeanNameELResolver resolver = createBeanNameELResolver(); +ELContext context = +new StandardELContext(ELManager.getExpressionFactory()); + +resolver.isReadOnly(context, new Object(), BEAN01_NAME); + +Assert.assertFalse(context.isPropertyResolved()); +} + + +/** + * Tests that a valid bean is not resolved if property is not a String even + * if it can be coerced to a valid bean name. + */ +@Test +public void testIsReadOnly05() { + +BeanNameELResolver resolver = createBeanNameELResolver(); +ELContext context = +new StandardELContext(ELManager.getExpressionFactory()); + +