[GUMP@vmgump]: Project tomcat-trunk-test-apr (in module tomcat-trunk) failed

2014-10-29 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-trunk-test-apr has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 2 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test-apr :  Tomcat 8.x, a web server implementing the Java 
Servlet 3.1,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-apr/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/logs-APR
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-APR/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-apr/gump_work/build_tomcat-trunk_tomcat-trunk-test-apr.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-apr (Type: Build)
Work ended in a state of : Failed
Elapsed: 25 mins 26 secs
Command Line: /usr/lib/jvm/java-7-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.12-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.2-SNAPSHOT.jar
 -Dtest.reports=output/logs-APR 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20141030-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/P20140317-1600/ecj-P20140317-1600.jar
 -Dtest.apr.loc=/srv/gump/public/workspace/tomcat-native/dest-20141030/lib 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20141030.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20141030-native-src.tar.gz
 -Dtest.temp=output/test-tmp-APR -Dtest.accesslog=true -Dexecute.test.nio=false
  
-Dtest.openssl.path=/srv/gump/public/workspace/openssl/dest-20141030/bin/openssl
 -Dexecute.test.apr=true -Dexecute.test.bio=false -Dexecute.test.nio2=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.3-SNAPSHOT.jar
 
-Dhamcrest.jar=/srv/gump/public/workspace/hamcrest/build/hamcrest-all-20141030.jar
 -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-7-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-j

[GUMP@vmgump]: Project tomcat-trunk-test-nio (in module tomcat-trunk) failed

2014-10-29 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-trunk-test-nio has an issue affecting its community integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test-nio :  Tomcat 8.x, a web server implementing the Java 
Servlet 3.1,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/logs-NIO
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-NIO/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio/gump_work/build_tomcat-trunk_tomcat-trunk-test-nio.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-nio (Type: Build)
Work ended in a state of : Failed
Elapsed: 24 mins 50 secs
Command Line: /usr/lib/jvm/java-7-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.12-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.2-SNAPSHOT.jar
 -Dtest.reports=output/logs-NIO 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20141030-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/P20140317-1600/ecj-P20140317-1600.jar
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20141030.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20141030-native-src.tar.gz
 -Dtest.temp=output/test-tmp-NIO -Dtest.accesslog=true -Dexecute.test.nio=true 
-Dtest.openssl.path=/srv/gump/public/workspace/openssl/dest-20141030/bin/o
 penssl -Dexecute.test.apr=false -Dexecute.test.bio=false 
-Dexecute.test.nio2=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.3-SNAPSHOT.jar
 
-Dhamcrest.jar=/srv/gump/public/workspace/hamcrest/build/hamcrest-all-20141030.jar
 -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-7-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-trunk/output/bu
 
ild/lib/tomcat-spdy.jar:/srv/gump/public/workspace/to

[GUMP@vmgump]: Project tomcat-trunk-test-nio2 (in module tomcat-trunk) failed

2014-10-29 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-trunk-test-nio2 has an issue affecting its community integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test-nio2 :  Tomcat 8.x, a web server implementing the Java 
Servlet 3.1,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio2/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/logs-NIO2
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-NIO2/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio2/gump_work/build_tomcat-trunk_tomcat-trunk-test-nio2.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-nio2 (Type: Build)
Work ended in a state of : Failed
Elapsed: 25 mins 49 secs
Command Line: /usr/lib/jvm/java-7-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.12-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.2-SNAPSHOT.jar
 -Dtest.reports=output/logs-NIO2 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20141030-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/P20140317-1600/ecj-P20140317-1600.jar
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20141030.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20141030-native-src.tar.gz
 -Dtest.temp=output/test-tmp-NIO2 -Dtest.accesslog=true 
-Dexecute.test.nio=false 
-Dtest.openssl.path=/srv/gump/public/workspace/openssl/dest-20141030/bi
 n/openssl -Dexecute.test.apr=false -Dexecute.test.bio=false 
-Dexecute.test.nio2=true 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.3-SNAPSHOT.jar
 
-Dhamcrest.jar=/srv/gump/public/workspace/hamcrest/build/hamcrest-all-20141030.jar
 -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-7-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-trunk/output/bu
 
ild/lib/tomcat-spdy.jar:/srv/gump/public/w

[GUMP@vmgump]: Project tomcat-trunk-test-bio (in module tomcat-trunk) failed

2014-10-29 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-trunk-test-bio has an issue affecting its community integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test-bio :  Tomcat 8.x, a web server implementing the Java 
Servlet 3.1,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-bio/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/logs-BIO
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-BIO/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-bio/gump_work/build_tomcat-trunk_tomcat-trunk-test-bio.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-bio (Type: Build)
Work ended in a state of : Failed
Elapsed: 23 mins 41 secs
Command Line: /usr/lib/jvm/java-7-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.12-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.2-SNAPSHOT.jar
 -Dtest.reports=output/logs-BIO 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20141030-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/P20140317-1600/ecj-P20140317-1600.jar
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20141030.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20141030-native-src.tar.gz
 -Dtest.temp=output/test-tmp-BIO -Dtest.accesslog=true -Dexecute.test.nio=false 
-Dtest.openssl.path=/srv/gump/public/workspace/openssl/dest-20141030/bin/
 openssl -Dexecute.test.apr=false -Dexecute.test.bio=true 
-Dexecute.test.nio2=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.3-SNAPSHOT.jar
 
-Dhamcrest.jar=/srv/gump/public/workspace/hamcrest/build/hamcrest-all-20141030.jar
 -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-7-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-trunk/output/bu
 
ild/lib/tomcat-spdy.jar:/srv/gump/public/workspace/to

Re: svn commit: r1635154 - in /tomcat/trunk: java/org/apache/tomcat/util/scan/StandardJarScanner.java test/org/apache/catalina/filters/TesterServletContext.java test/org/apache/tomcat/util/scan/TestSt

2014-10-29 Thread Konstantin Kolinko
2014-10-29 17:42 GMT+03:00  :
> Author: markt
> Date: Wed Oct 29 14:42:01 2014
> New Revision: 1635154
>
> URL: http://svn.apache.org/r1635154
> Log:
> URLs may be added directly to the web application's class path. ensure that 
> they are scanned if a StandardJarScanner is configured to scan the class path.
>
> Added:
> tomcat/trunk/test/org/apache/tomcat/util/scan/TestStandardJarScanner.java 
>   (with props)
> Modified:
> tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
> tomcat/trunk/test/org/apache/catalina/filters/TesterServletContext.java
> tomcat/trunk/webapps/docs/changelog.xml
>

(It was a fix for
https://issues.apache.org/bugzilla/show_bug.cgi?id=57153
)


I suspect that this change is the trigger for breakage of
org.apache.jasper.servlet.TestTldScanner test.


The logs are:

http://ci.apache.org/projects/tomcat/tomcat8/logs/1635250/TEST-org.apache.jasper.servlet.TestTldScanner.NIO2.txt

[[[
Caused by: java.lang.IllegalArgumentException: The resource path
[null/META-INF/bug55807.tld] is not valid
at org.apache.catalina.webresources.StandardRoot.validate(StandardRoot.java:250)
at 
org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:212)
at 
org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:206)
at 
org.apache.catalina.core.ApplicationContext.getResource(ApplicationContext.java:533)
at 
org.apache.catalina.core.ApplicationContextFacade.getResource(ApplicationContextFacade.java:199)
at org.apache.jasper.compiler.TldCache.getLastModified(TldCache.java:128)
at org.apache.jasper.compiler.TldCache.(TldCache.java:70)
at 
org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:113)
at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5185)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
]]]


I debugged with breakpoint at "TldResourcePath(URL url, String
webappPath, String entryName)" constructor  (TldResourcePath: line 65)

It is called with the following arguments:
- url: file:/<...>trunk/test/webapp/WEB-INF/classes/META-INF/bug55807.tld
- webappPath: null/META-INF/bug55807.tld
- entryName: null

Stacktrace at constructor call:
[[[
Daemon Thread [localhost-startStop-1] (Suspended (breakpoint at line
65 in TldResourcePath))
owns: StandardContext  (id=33)
TldResourcePath.(URL, String, String) line: 65
TldResourcePath.(URL, String) line: 54
TldScanner$TldScannerCallback$1.visitFile(Path,
BasicFileAttributes) line: 342
TldScanner$TldScannerCallback$1.visitFile(Object,
BasicFileAttributes) line: 1
FileTreeWalker.walk(Path, int, List) line: 135
FileTreeWalker.walk(Path, int, List) line: 199
FileTreeWalker.walk(Path) line: 69
Files.walkFileTree(Path, Set, int,
FileVisitor) line: 2602
Files.walkFileTree(Path, FileVisitor) line: 2635
TldScanner$TldScannerCallback.scan(File, String, boolean) line: 323
StandardJarScanner.process(JarScanType, JarScannerCallback, URL,
String, boolean) line: 315
StandardJarScanner.scan(JarScanType, ServletContext,
JarScannerCallback) line: 227
TldScanner.scanJars() line: 240
TldScanner.scan() line: 99
JasperInitializer.onStartup(Set>, ServletContext) line: 103
StandardContext.startInternal() line: 5185
StandardContext(LifecycleBase).start() line: 150
ContainerBase$StartChild.call() line: 1409
ContainerBase$StartChild.call() line: 1
FutureTask.run() line: 262
ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1145
ThreadPoolExecutor$Worker.run() line: 615
Thread.run() line: 745
]]]

Note the following lines in stacktrace:

TldScanner$TldScannerCallback.scan(File, String, boolean) line: 323
StandardJarScanner.process(JarScanType, JarScannerCallback, URL,
String, boolean) line: 315
StandardJarScanner.scan(JarScanType, ServletContext,
JarScannerCallback) line: 227

At StandardJarScanner line 227 it is:
[[[
   process(scanType, callback, urls[i], null, isWebapp);
]]]

where "null" is explicitly passed as the value of "webappPath".
The "null" value is passed into StandardJarScanner.process() and
further into TldScanner$TldScannerCallback.scan(), see the above 3
lines of stacktrace.

TldScanner line 338:
String resourcePath = webappPath + "/" + subPath;

results in "null/" prefix.



Note 2: At that point in time when the above stacktrace etc. happens,
it is the second time when TldResourcePath() constructor is called for
bug55807.tld file.

At some earlier time TldResourcePath(URL url, String webappPath,
String entryName) is called with correct webappPath value,

/WEB-INF/classes/META-INF/bug55807.tld

I think that the second call with null//META-INF/bug55807.tld is a
result of this commit.


It may be that this bug did exist before, but that code path in
StandardJarScanner just was not executed.

Best regards,
Konstantin Kolinko

-
T

svn commit: r1635335 - in /tomcat/trunk/webapps/docs: changelog.xml config/manager.xml

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 23:20:24 2014
New Revision: 1635335

URL: http://svn.apache.org/r1635335
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57147
JDBC Store corrections
- add missing properties
- note defaults
- remove required status from attributes that have defaults
- note example DDL does not use default names

Modified:
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/manager.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1635335&r1=1635334&r2=1635335&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Oct 29 23:20:24 2014
@@ -353,6 +353,11 @@
   
 Suppress timestamp comments in Javadoc. (kkolinko)
   
+  
+57147: Various corrections to the JDBC Store section of the
+session manager configuration page of the documentation web 
application.
+(markt)
+  
 
   
   

Modified: tomcat/trunk/webapps/docs/config/manager.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/manager.xml?rev=1635335&r1=1635334&r2=1635335&view=diff
==
--- tomcat/trunk/webapps/docs/config/manager.xml (original)
+++ tomcat/trunk/webapps/docs/config/manager.xml Wed Oct 29 23:20:24 2014
@@ -359,6 +359,16 @@
   to use this implementation.
 
 
+
+  The user name that will be handed to the configured JDBC driver to
+  establish a connection to the database containing the session table.
+
+
+
+  The password that will be handed to the configured JDBC driver to
+  establish a connection to the database containing the session table.
+
+
 
   The connection URL that will be handed to the configured JDBC
   driver to establish a connection to the database containing our
@@ -368,8 +378,9 @@
 
   Name of the JNDI resource for a JDBC DataSource-factory. If this 
option
   is given and a valid JDBC resource can be found, it will be used and any
-  direct configuration of a JDBC connection via connectionURL
-  and driverName will be ignored. Since this code uses 
prepared
+  direct configuration of a JDBC connection via connectionURL,
+  connectionName, connectionPassword and
+  driverName will be ignored. Since this code uses prepared
   statements, you might want to configure pooled prepared statements as
   shown in the JNDI resources
   HOW-TO.
@@ -379,52 +390,57 @@
   Java class name of the JDBC driver to be used.
 
 
-
-  Name of the database column, contained in the specified session
-  table, that contains the Engine, Host, and Web Application Context
-  name in the format /Engine/Host/Context.
-
-
-
-  Name of the database column, contained in the specified
-  session table, that contains the serialized form of all session
-  attributes for a swapped out session.  The column type must accept
-  a binary object (typically called a BLOB).
-
-
-
-  Name of the database column, contained in the specified
-  session table, that contains the session identifier of the
-  swapped out session.  The column type must accept character
-  string data of at least as many characters as are contained
-  in session identifiers created by Tomcat (typically 32).
-
-
-
-  Name of the database column, contained in the specified
-  session table, that contains the lastAccessedTime
-  property of this session.  The column type must accept a
-  Java long (64 bits).
-
-
-
-  Name of the database column, contained in the specified
-  session table, that contains the maxInactiveInterval
-  property of this session.  The column type must accept a
-  Java integer (32 bits).
-
-
-
-  Name of the database table to be used for storing swapped out
-  sessions.  This table must contain (at least) the database columns
-  that are configured by the other attributes of this element.
-
-
-
-  Name of the database column, contained in the specified
-  session table, that contains a flag indicating whether this
-  swapped out session is still valid or not.  The column type
-  must accept a single character.
+
+  Name of the database column, contained in the specified session table,
+  that contains the Engine, Host, and Web Application Context name in the
+  format /Engine/Host/Context. If not specified the default
+  value of app will be used.
+
+
+
+  Name of the database column, contained in the specified session table,
+  that contains the serialized form of all session attributes for a swapped
+  out session. The column type must accept a binary object

[Bug 57147] Fixes to Documentation of JDBC-Based Store

2014-10-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57147

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Mark Thomas  ---
Fixed in 8.0.x for 8.0.15 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



[Bug 57148] EL type conversion of empty string when there is a PropertyEditor (ELSupport.coerceToType())

2014-10-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57148

Mark Thomas  changed:

   What|Removed |Added

  Component|EL  |Jasper
Version|8.0.14  |trunk
Product|Tomcat 8|Tomcat 7
   Target Milestone||---
 OS||All

--- Comment #2 from Mark Thomas  ---
Added some unit tests that confirm the patch is correct and applied to 8.0.x
for 8.0.15 owards.

This needs to be back-ported so changing version.

-- 
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: r1635328 - in /tomcat/trunk: java/org/apache/el/lang/ test/org/apache/el/lang/ webapps/docs/

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 23:02:44 2014
New Revision: 1635328

URL: http://svn.apache.org/r1635328
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57148
When coercing an object to a given type and a PropertyEditor has been 
registered for the type correctly coerce the empty string to null if the 
PropertyEditor throws an exception.
Patch by kkolinko
Unit tests by markt

Added:
tomcat/trunk/test/org/apache/el/lang/TesterBean.java   (with props)
tomcat/trunk/test/org/apache/el/lang/TesterType.java   (with props)
tomcat/trunk/test/org/apache/el/lang/TesterTypeEditorBase.java   (with 
props)
tomcat/trunk/test/org/apache/el/lang/TesterTypeEditorError.java   (with 
props)
tomcat/trunk/test/org/apache/el/lang/TesterTypeEditorNoError.java   (with 
props)
Modified:
tomcat/trunk/java/org/apache/el/lang/ELSupport.java
tomcat/trunk/test/org/apache/el/lang/TestELSupport.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/el/lang/ELSupport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/lang/ELSupport.java?rev=1635328&r1=1635327&r2=1635328&view=diff
==
--- tomcat/trunk/java/org/apache/el/lang/ELSupport.java (original)
+++ tomcat/trunk/java/org/apache/el/lang/ELSupport.java Wed Oct 29 23:02:44 2014
@@ -465,12 +465,24 @@ public class ELSupport {
 if (obj == null)
 return null;
 if (obj instanceof String) {
-if ("".equals(obj))
-return null;
 PropertyEditor editor = PropertyEditorManager.findEditor(type);
-if (editor != null) {
-editor.setAsText((String) obj);
-return editor.getValue();
+if (editor == null) {
+if ("".equals(obj)) {
+return null;
+}
+throw new ELException(MessageFactory.get("error.convert", obj,
+obj.getClass(), type));
+} else {
+try {
+editor.setAsText((String) obj);
+return editor.getValue();
+} catch (RuntimeException e) {
+if ("".equals(obj)) {
+return null;
+}
+throw new ELException(MessageFactory.get("error.convert",
+obj, obj.getClass(), type), e);
+}
 }
 }
 

Modified: tomcat/trunk/test/org/apache/el/lang/TestELSupport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/lang/TestELSupport.java?rev=1635328&r1=1635327&r2=1635328&view=diff
==
--- tomcat/trunk/test/org/apache/el/lang/TestELSupport.java (original)
+++ tomcat/trunk/test/org/apache/el/lang/TestELSupport.java Wed Oct 29 23:02:44 
2014
@@ -16,6 +16,7 @@
  */
 package org.apache.el.lang;
 
+import java.beans.PropertyEditorManager;
 import java.math.BigDecimal;
 import java.math.BigInteger;
 
@@ -207,6 +208,39 @@ public class TestELSupport {
 }
 
 @Test
+public void testCoerceToType13() {
+Object result = ELManager.getExpressionFactory().coerceToType(
+"", TesterType.class);
+Assert.assertNull(result);
+}
+
+@Test
+public void testCoerceToType14() {
+PropertyEditorManager.registerEditor(TesterType.class, 
TesterTypeEditorNoError.class);
+Object result = ELManager.getExpressionFactory().coerceToType(
+"Foo", TesterType.class);
+Assert.assertTrue(result instanceof TesterType);
+Assert.assertEquals("Foo", ((TesterType) result).getValue());
+}
+
+@Test(expected=ELException.class)
+public void testCoerceToType15() {
+PropertyEditorManager.registerEditor(TesterType.class, 
TesterTypeEditorError.class);
+Object result = ELManager.getExpressionFactory().coerceToType(
+"Foo", TesterType.class);
+Assert.assertTrue(result instanceof TesterType);
+Assert.assertEquals("Foo", ((TesterType) result).getValue());
+}
+
+@Test
+public void testCoerceToType16() {
+PropertyEditorManager.registerEditor(TesterType.class, 
TesterTypeEditorError.class);
+Object result = ELManager.getExpressionFactory().coerceToType(
+"", TesterType.class);
+Assert.assertNull(result);
+}
+
+@Test
 public void testCoerceToNumber01() {
 Object result = ELSupport.coerceToNumber(
 (Object) null, Integer.class);

Added: tomcat/trunk/test/org/apache/el/lang/TesterBean.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/lang/TesterBean.java?rev=1635328&view=auto
==
--- tomcat/trunk/test/org/apache/el/lang/TesterBean.java (added)
+++ tomca

Re: svn commit: r1635215 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread Rémy Maucherat
2014-10-29 22:28 GMT+01:00 Mark Thomas :

>
> Thanks. I've just removed it :)
>
> Adding the isCompleting() code and using it in the ErrorReportValve
> appears to have fixed all the issues with the unit tests apart from the
> ISE issues with get[Request|Response]() which are just issues with the
> tests. I'll work on those next.
>
> Very nice !

Rémy


[Bug 57155] Allow Context without real docbase in embedded Tomcat

2014-10-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57155

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Mark Thomas  ---
I don't see a need to change ContextConfig. That is not intended for use in
embedding. If it was used it would only be used when there was a docBase on the
filesystem.

This has been fixed in 8.0.x for 8.0.15 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



[Bug 57154] Failure of TestWsWebSocketContainer when directory %TEMP%\test exists

2014-10-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57154

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Mark Thomas  ---
Fixed with the fixes for bug 57155.

-- 
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



[GUMP@vmgump]: Project tomcat-trunk-test-apr (in module tomcat-trunk) failed

2014-10-29 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-trunk-test-apr has an issue affecting its community integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test-apr :  Tomcat 8.x, a web server implementing the Java 
Servlet 3.1,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-apr/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/logs-APR
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-APR/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-apr/gump_work/build_tomcat-trunk_tomcat-trunk-test-apr.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-apr (Type: Build)
Work ended in a state of : Failed
Elapsed: 25 mins 40 secs
Command Line: /usr/lib/jvm/java-7-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.12-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.2-SNAPSHOT.jar
 -Dtest.reports=output/logs-APR 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20141029-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/P20140317-1600/ecj-P20140317-1600.jar
 -Dtest.apr.loc=/srv/gump/public/workspace/tomcat-native/dest-20141029/lib 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20141029.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20141029-native-src.tar.gz
 -Dtest.temp=output/test-tmp-APR -Dtest.accesslog=true -Dexecute.test.nio=false
  
-Dtest.openssl.path=/srv/gump/public/workspace/openssl/dest-20141029/bin/openssl
 -Dexecute.test.apr=true -Dexecute.test.bio=false -Dexecute.test.nio2=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.3-SNAPSHOT.jar
 
-Dhamcrest.jar=/srv/gump/public/workspace/hamcrest/build/hamcrest-all-20141029.jar
 -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-7-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/g

svn commit: r1635313 - /tomcat/trunk/java/org/apache/catalina/Globals.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 21:59:25 2014
New Revision: 1635313

URL: http://svn.apache.org/r1635313
Log:
Remove pointless Javadoc block

Modified:
tomcat/trunk/java/org/apache/catalina/Globals.java

Modified: tomcat/trunk/java/org/apache/catalina/Globals.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Globals.java?rev=1635313&r1=1635312&r2=1635313&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Globals.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Globals.java Wed Oct 29 21:59:25 2014
@@ -232,9 +232,6 @@ public final class Globals {
 org.apache.coyote.Constants.REMOTE_ADDR_ATTRIBUTE;
 
 
-/**
- *
- */
 public static final String ASYNC_SUPPORTED_ATTR =
 "org.apache.catalina.ASYNC_SUPPORTED";
 



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



svn commit: r1635312 - /tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 21:59:06 2014
New Revision: 1635312

URL: http://svn.apache.org/r1635312
Log:
Remove the temporary STRICT_SERVLET_COMPLIANCE tests

Modified:
tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java

Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1635312&r1=1635311&r2=1635312&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Wed Oct 29 
21:59:06 2014
@@ -84,9 +84,6 @@ public class AsyncContextImpl implements
 }
 check();
 request.getCoyoteRequest().action(ActionCode.ASYNC_COMPLETE, null);
-if (!Globals.STRICT_SERVLET_COMPLIANCE) {
-clearServletRequestResponse();
-}
 }
 
 @Override
@@ -106,9 +103,7 @@ public class AsyncContextImpl implements
 }
 }
 } finally {
-if (Globals.STRICT_SERVLET_COMPLIANCE) {
-clearServletRequestResponse();
-}
+clearServletRequestResponse();
 context.unbind(Globals.IS_SECURITY_ENABLED, oldCL);
 }
 



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



svn commit: r1635310 - /tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 21:44:13 2014
New Revision: 1635310

URL: http://svn.apache.org/r1635310
Log:
Fix and re-enable remaining tests broken by changes to 
AsyncContextImpl.isStarted()

Modified:
tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java

Modified: tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java?rev=1635310&r1=1635309&r2=1635310&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java Wed 
Oct 29 21:44:13 2014
@@ -47,7 +47,6 @@ import static org.junit.Assert.assertNot
 import static org.junit.Assert.assertTrue;
 
 import org.junit.Assert;
-import org.junit.Ignore;
 import org.junit.Test;
 
 import org.apache.catalina.Context;
@@ -1843,16 +1842,12 @@ public class TestAsyncContextImpl extend
 
 
 @Test
-@Ignore // Test is broken. It needs to be adjusted to check for the ISE
-// once complete has taken effect
 public void testGetRequestISE() throws Exception {
 doTestAsyncISE(true);
 }
 
 
 @Test
-@Ignore // Test is broken. It needs to be adjusted to check for the ISE
-// once complete has taken effect
 public void testGetResponseISE() throws Exception {
 doTestAsyncISE(false);
 }
@@ -1865,8 +1860,9 @@ public class TestAsyncContextImpl extend
 // No file system docBase required
 Context ctx = tomcat.addContext("", null);
 
-Wrapper w = Tomcat.addServlet(ctx, "AsyncISEServlet",
-new AsyncISEServlet(useGetRequest));
+AsyncISEServlet servlet = new AsyncISEServlet();
+
+Wrapper w = Tomcat.addServlet(ctx, "AsyncISEServlet", servlet);
 w.setAsyncSupported(true);
 ctx.addServletMapping("/test", "AsyncISEServlet");
 
@@ -1877,44 +1873,51 @@ public class TestAsyncContextImpl extend
 null);
 
 Assert.assertEquals(HttpServletResponse.SC_OK, rc);
-Assert.assertEquals("OK", response.toString());
+
+boolean hasIse = false;
+try {
+if (useGetRequest) {
+servlet.getAsyncContext().getRequest();
+} else {
+servlet.getAsyncContext().getResponse();
+}
+} catch (IllegalStateException ise) {
+hasIse = true;
+}
+
+Assert.assertTrue(hasIse);
 }
 
 
+/**
+ * Accessing the AsyncContext in this way is an ugly hack that should never
+ * be used in a real application since it is not thread safe. That said, it
+ * is this sort of hack that the ISE is meant to be preventing.
+ *
+ */
 private static class AsyncISEServlet extends HttpServlet {
 
 private static final long serialVersionUID = 1L;
 
-private boolean useGetRequest = false;
-
-public AsyncISEServlet(boolean useGetRequest) {
-this.useGetRequest = useGetRequest;
-}
+private AsyncContext asyncContext;
 
 @Override
 protected void doGet(HttpServletRequest req, HttpServletResponse resp)
 throws ServletException, IOException {
 
 resp.setContentType("text/plain;UTF-8");
-PrintWriter pw = resp.getWriter();
 
-AsyncContext async = req.startAsync();
+asyncContext = req.startAsync();
 // This will commit the response
-async.complete();
+asyncContext.complete();
+}
 
-try {
-if (useGetRequest) {
-async.getRequest();
-} else {
-async.getResponse();
-}
-pw.print("FAIL");
-} catch (IllegalStateException ise) {
-pw.print("OK");
-}
+public AsyncContext getAsyncContext() {
+return asyncContext;
 }
 }
 
+
 @Test
 public void testDispatchWithCustomRequestResponse() throws Exception {
 prepareApplicationWithGenericServlet("");



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



Re: svn commit: r1635215 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread Mark Thomas
On 29/10/2014 20:03, Rémy Maucherat wrote:
> 2014-10-29 20:27 GMT+01:00 Mark Thomas :
> 
>> OK. Lets leave it in place until the issues with the tests are fixed.
>>
>> The started flag being true for the MUST_COMPLETE state is causing
>> problems too. It breaks code like this:
>>
>> if (request.isAsyncStarted()) {
>> request.getAsyncContext().complete();
>> }
>>
>> While you could make the "effects of complete have to be delayed..."
>> argument, I don't think it holds in this case as the ability to test if
>> complete() needs to be called is more important.
>>
>> What do you think about reverting that particular change?
>>
>> It's the same thing, the started flag should be true until the end of the
> processing of complete, which means for example for code like:
> ac.complete();
> println("" + ac.isAsyncStarted());
> 
> It should display "true" rather than "false".
> 
> I'll add the strict flag as well for that.

Thanks. I've just removed it :)

Adding the isCompleting() code and using it in the ErrorReportValve
appears to have fixed all the issues with the unit tests apart from the
ISE issues with get[Request|Response]() which are just issues with the
tests. I'll work on those next.

Mark

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



svn commit: r1635308 - in /tomcat/trunk/java/org/apache: catalina/connector/ catalina/valves/ coyote/ coyote/ajp/ coyote/http11/

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 21:25:33 2014
New Revision: 1635308

URL: http://svn.apache.org/r1635308
Log:
Follow-up to 1635301
Use isCompleting to align with isDispatching
Fix the implementation for HTTP and AJP

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Request.java
tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
tomcat/trunk/java/org/apache/coyote/ActionCode.java
tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1635308&r1=1635307&r2=1635308&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Wed Oct 29 
21:25:33 2014
@@ -1634,13 +1634,13 @@ public class Request
 return result.get();
 }
 
-public boolean canAsyncComplete() {
+public boolean isAsyncCompleting() {
 if (asyncContext == null) {
 return false;
 }
 
 AtomicBoolean result = new AtomicBoolean(false);
-coyoteRequest.action(ActionCode.ASYNC_CAN_COMPLETE, result);
+coyoteRequest.action(ActionCode.ASYNC_IS_COMPLETING, result);
 return result.get();
 }
 

Modified: tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?rev=1635308&r1=1635307&r2=1635308&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java Wed Oct 
29 21:25:33 2014
@@ -123,7 +123,8 @@ public class ErrorReportValve extends Va
 ExceptionUtils.handleThrowable(tt);
 }
 
-if (request.canAsyncComplete()) {
+if (request.isAsyncStarted() && !request.isAsyncCompleting() &&
+!request.isAsyncDispatching()) {
 request.getAsyncContext().complete();
 }
 }

Modified: tomcat/trunk/java/org/apache/coyote/ActionCode.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ActionCode.java?rev=1635308&r1=1635307&r2=1635308&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ActionCode.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ActionCode.java Wed Oct 29 21:25:33 2014
@@ -110,17 +110,17 @@ public enum ActionCode {
 REQ_SET_BODY_REPLAY,
 
 /**
- * Callback for begin Comet processing
+ * Callback for begin Comet processing.
  */
 COMET_BEGIN,
 
 /**
- * Callback for end Comet processing
+ * Callback for end Comet processing.
  */
 COMET_END,
 
 /**
- * Callback for getting the amount of available bytes
+ * Callback for getting the amount of available bytes.
  */
 AVAILABLE,
 
@@ -135,13 +135,13 @@ public enum ActionCode {
 COMET_SETTIMEOUT,
 
 /**
- * Callback for an async request
+ * Callback for an async request.
  */
 ASYNC_START,
 
 /**
  * Callback for an async call to
- * {@link javax.servlet.AsyncContext#dispatch()}
+ * {@link javax.servlet.AsyncContext#dispatch()}.
  */
 ASYNC_DISPATCH,
 
@@ -153,29 +153,23 @@ public enum ActionCode {
 
 /**
  * Callback for an async call to
- * {@link javax.servlet.AsyncContext#start(Runnable)}
+ * {@link javax.servlet.AsyncContext#start(Runnable)}.
  */
 ASYNC_RUN,
 
 /**
- * Call back to see if it is currently possible to call
- * {@link javax.servlet.AsyncContext#complete()} without error.
- */
-ASYNC_CAN_COMPLETE,
-
-/**
  * Callback for an async call to
- * {@link javax.servlet.AsyncContext#complete()}
+ * {@link javax.servlet.AsyncContext#complete()}.
  */
 ASYNC_COMPLETE,
 
 /**
- * Callback to trigger the processing of an async timeout
+ * Callback to trigger the processing of an async timeout.
  */
 ASYNC_TIMEOUT,
 
 /**
- * Callback to trigger the error processing
+ * Callback to trigger the error processing.
  */
 ASYNC_ERROR,
 
@@ -186,27 +180,32 @@ public enum ActionCode {
 ASYNC_SETTIMEOUT,
 
 /**
- * Callback to determine if async processing is in progress
+ * Callback to determine if async processing is in progress.
  */
 ASYNC_IS_ASYNC,
 
 /**
- * Callback to determine if async dispatch is in progress
+ * Callback to determine if async dispatch is in progress.
  */
 ASYNC_IS_START

svn commit: r1635301 - in /tomcat/trunk/java/org/apache: catalina/connector/Request.java catalina/valves/ErrorReportValve.java coyote/ActionCode.java coyote/AsyncStateMachine.java coyote/ajp/AbstractA

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 21:01:06 2014
New Revision: 1635301

URL: http://svn.apache.org/r1635301
Log:
With the changes to the behaviour AsyncContext.isStarted() this method can no 
longer be used to determine if complete needs to be called to add a new method 
that can provide this information.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Request.java
tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
tomcat/trunk/java/org/apache/coyote/ActionCode.java
tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1635301&r1=1635300&r2=1635301&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Wed Oct 29 
21:01:06 2014
@@ -1634,6 +1634,16 @@ public class Request
 return result.get();
 }
 
+public boolean canAsyncComplete() {
+if (asyncContext == null) {
+return false;
+}
+
+AtomicBoolean result = new AtomicBoolean(false);
+coyoteRequest.action(ActionCode.ASYNC_CAN_COMPLETE, result);
+return result.get();
+}
+
 public boolean isAsync() {
 if (asyncContext == null) {
 return false;

Modified: tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?rev=1635301&r1=1635300&r2=1635301&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java Wed Oct 
29 21:01:06 2014
@@ -123,7 +123,7 @@ public class ErrorReportValve extends Va
 ExceptionUtils.handleThrowable(tt);
 }
 
-if (request.isAsyncStarted()) {
+if (request.canAsyncComplete()) {
 request.getAsyncContext().complete();
 }
 }

Modified: tomcat/trunk/java/org/apache/coyote/ActionCode.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ActionCode.java?rev=1635301&r1=1635300&r2=1635301&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ActionCode.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ActionCode.java Wed Oct 29 21:01:06 2014
@@ -158,6 +158,12 @@ public enum ActionCode {
 ASYNC_RUN,
 
 /**
+ * Call back to see if it is currently possible to call
+ * {@link javax.servlet.AsyncContext#complete()} without error.
+ */
+ASYNC_CAN_COMPLETE,
+
+/**
  * Callback for an async call to
  * {@link javax.servlet.AsyncContext#complete()}
  */

Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1635301&r1=1635300&r2=1635301&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] 
(original)
+++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Wed Oct 
29 21:01:06 2014
@@ -19,7 +19,6 @@ package org.apache.coyote;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
-import org.apache.catalina.Globals;
 import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
 import org.apache.tomcat.util.res.StringManager;
 import org.apache.tomcat.util.security.PrivilegedGetTccl;
@@ -107,38 +106,44 @@ public class AsyncStateMachine {
 StringManager.getManager(Constants.Package);
 
 private static enum AsyncState {
-DISPATCHED(false, false, false),
-STARTING(true, true, false),
-STARTED(true, true, false),
-MUST_COMPLETE(true, Globals.STRICT_SERVLET_COMPLIANCE, false),
-COMPLETING(true, false, false),
-TIMING_OUT(true, false, false),
-MUST_DISPATCH(true, true, true),
-DISPATCHING(true, false, true),
-READ_WRITE_OP(true,true,false),
-ERROR(true,false,false);
-
-private boolean isAsync;
-private boolean isStarted;
-private boolean isDispatching;
+DISPATCHED(false, false, false, false),
+STARTING(true, true, true, false),
+STARTED(true, true, true, false),
+MUST_COMPLETE(true, true, false, false),
+COMPLETING(true, false, false, false),
+TIMING_OUT(true, false, false, false),
+MUST_DISPATCH(true, true, false, true),
+DISPATCHING(true, false, false, true),
+READ_WRITE_OP(true

svn commit: r1635297 - /tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 20:42:09 2014
New Revision: 1635297

URL: http://svn.apache.org/r1635297
Log:
Whitespace

Modified:
tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java

Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1635297&r1=1635296&r2=1635297&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] 
(original)
+++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Wed Oct 
29 20:42:09 2014
@@ -249,7 +249,6 @@ public class AsyncStateMachine {
 throw new IllegalStateException(
 sm.getString("asyncStateMachine.invalidAsyncState",
 "asyncComplete()", state));
-
 }
 return doComplete;
 }



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



svn commit: r1635292 - in /tomcat/trunk/test/org/apache/tomcat: util/net/ websocket/

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 20:16:52 2014
New Revision: 1635292

URL: http://svn.apache.org/r1635292
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java
tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java

tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsSubprotocols.java
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
tomcat/trunk/test/org/apache/tomcat/websocket/TesterConnectionLimit.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java?rev=1635292&r1=1635291&r2=1635292&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java Wed Oct 29 
20:16:52 2014
@@ -145,9 +145,8 @@ public final class TesterSupport {
 TesterSupport.initSsl(tomcat);
 
 // Need a web application with a protected and unprotected URL
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, "simple", new SimpleServlet());
 ctx.addServletMapping("/unprotected", "simple");

Modified: 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java?rev=1635292&r1=1635291&r2=1635292&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java 
Wed Oct 29 20:16:52 2014
@@ -42,9 +42,8 @@ public class TestWebSocketFrameClient ex
 public void testConnectToServerEndpoint() throws Exception {
 
 Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
ctx.addApplicationListener(TesterFirehoseServer.Config.class.getName());
 Tomcat.addServlet(ctx, "default", new DefaultServlet());
 ctx.addServletMapping("/", "default");

Modified: 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java?rev=1635292&r1=1635291&r2=1635292&view=diff
==
--- 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java 
(original)
+++ 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java 
Wed Oct 29 20:16:52 2014
@@ -46,9 +46,8 @@ public class TestWebSocketFrameClientSSL
 @Test
 public void testConnectToServerEndpoint() throws Exception {
 Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
ctx.addApplicationListener(TesterFirehoseServer.Config.class.getName());
 Tomcat.addServlet(ctx, "default", new DefaultServlet());
 ctx.addServletMapping("/", "default");
@@ -101,9 +100,8 @@ public class TestWebSocketFrameClientSSL
 .equals("org.apache.coyote.http11.Http11Protocol"));
 
 Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
ctx.addApplicationListener(TesterFirehoseServer.Config.class.getName());
 Tomcat.addServlet(ctx, "default", new DefaultServlet());
 ctx.addServletMapping("/", "default");

Modified: 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java?rev=1635292&r1=1635291&r2=1635292&view=diff
=

svn commit: r1635291 - in /tomcat/trunk/test/org/apache/tomcat/websocket: pojo/TestEncodingDecoding.java pojo/TestPojoEndpointBase.java pojo/TestPojoMethodMapping.java server/TestWsServerContainer.jav

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 20:10:49 2014
New Revision: 1635291

URL: http://svn.apache.org/r1635291
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java
tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java

tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoMethodMapping.java

tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java

Modified: 
tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java?rev=1635291&r1=1635290&r2=1635291&view=diff
==
--- 
tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java 
(original)
+++ 
tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java 
Wed Oct 29 20:10:49 2014
@@ -68,8 +68,8 @@ public class TestEncodingDecoding extend
 @Test
 public void testProgrammaticEndPoints() throws Exception{
 Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
-Context ctx = tomcat.addContext("", 
System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
ctx.addApplicationListener(ProgramaticServerEndpointConfig.class.getName());
 Tomcat.addServlet(ctx, "default", new DefaultServlet());
 ctx.addServletMapping("/", "default");
@@ -117,9 +117,8 @@ public class TestEncodingDecoding extend
 ServerConfigListener.setPojoClazz(Server.class);
 
 Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 ctx.addApplicationListener(ServerConfigListener.class.getName());
 Tomcat.addServlet(ctx, "default", new DefaultServlet());
 ctx.addServletMapping("/", "default");
@@ -177,9 +176,8 @@ public class TestEncodingDecoding extend
 ServerConfigListener.setPojoClazz(GenericsServer.class);
 
 Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 ctx.addApplicationListener(ServerConfigListener.class.getName());
 Tomcat.addServlet(ctx, "default", new DefaultServlet());
 ctx.addServletMapping("/", "default");
@@ -603,8 +601,8 @@ public class TestEncodingDecoding extend
 @Test
 public void testUnsupportedObject() throws Exception{
 Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
-Context ctx = tomcat.addContext("", 
System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
ctx.addApplicationListener(ProgramaticServerEndpointConfig.class.getName());
 Tomcat.addServlet(ctx, "default", new DefaultServlet());
 ctx.addServletMapping("/", "default");

Modified: 
tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java?rev=1635291&r1=1635290&r2=1635291&view=diff
==
--- 
tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java 
(original)
+++ 
tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java 
Wed Oct 29 20:10:49 2014
@@ -52,9 +52,8 @@ public class TestPojoEndpointBase extend
 ServerConfigListener.setPojoClazz(Bug54716.class);
 
 Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 ctx.addApplicationListener(ServerConfigListener.class.getName());
 Tomcat.addServlet(ctx, "default", new DefaultServlet());
 ctx.addServletMapping("/", "default");
@@ -84,9 +83,8 @@ public class TestPojoEndpointBase extend
 ServerConfigListener.setPojoClazz(OnOpenServerEndpoint.class);
 
 Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomca

svn commit: r1635289 - /tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java

2014-10-29 Thread remm
Author: remm
Date: Wed Oct 29 20:06:03 2014
New Revision: 1635289

URL: http://svn.apache.org/r1635289
Log:
Use the strict compliance flag to wrap around the change deferring real 
completion of AsyncContext.complete until after onComplete. (part 2)

Modified:
tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java

Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1635289&r1=1635288&r2=1635289&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] 
(original)
+++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Wed Oct 
29 20:06:03 2014
@@ -19,6 +19,7 @@ package org.apache.coyote;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
+import org.apache.catalina.Globals;
 import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
 import org.apache.tomcat.util.res.StringManager;
 import org.apache.tomcat.util.security.PrivilegedGetTccl;
@@ -109,7 +110,7 @@ public class AsyncStateMachine {
 DISPATCHED(false, false, false),
 STARTING(true, true, false),
 STARTED(true, true, false),
-MUST_COMPLETE(true, true, false),
+MUST_COMPLETE(true, Globals.STRICT_SERVLET_COMPLIANCE, false),
 COMPLETING(true, false, false),
 TIMING_OUT(true, false, false),
 MUST_DISPATCH(true, true, true),



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



svn commit: r1635288 - in /tomcat/trunk/test/org/apache/tomcat/util/http: CookiesBaseTest.java TestBug49158.java TestCookieProcessorGenerationHttp.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 20:05:34 2014
New Revision: 1635288

URL: http://svn.apache.org/r1635288
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java
tomcat/trunk/test/org/apache/tomcat/util/http/TestBug49158.java

tomcat/trunk/test/org/apache/tomcat/util/http/TestCookieProcessorGenerationHttp.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java?rev=1635288&r1=1635287&r2=1635288&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java Wed Oct 
29 20:05:34 2014
@@ -68,9 +68,8 @@ public abstract class CookiesBaseTest ex
 
 
 public static void addServlets(Tomcat tomcat) {
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, "invalid", new CookieServlet("na;me", "value"));
 ctx.addServletMapping("/invalid", "invalid");

Modified: tomcat/trunk/test/org/apache/tomcat/util/http/TestBug49158.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/http/TestBug49158.java?rev=1635288&r1=1635287&r2=1635288&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/http/TestBug49158.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/http/TestBug49158.java Wed Oct 29 
20:05:34 2014
@@ -60,9 +60,8 @@ public class TestBug49158 extends Cookie
 }
 
 public static void addServlets(Tomcat tomcat) {
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, path, new TestBug49158Servlet());
 ctx.addServletMapping("/"+path, path);

Modified: 
tomcat/trunk/test/org/apache/tomcat/util/http/TestCookieProcessorGenerationHttp.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/http/TestCookieProcessorGenerationHttp.java?rev=1635288&r1=1635287&r2=1635288&view=diff
==
--- 
tomcat/trunk/test/org/apache/tomcat/util/http/TestCookieProcessorGenerationHttp.java
 (original)
+++ 
tomcat/trunk/test/org/apache/tomcat/util/http/TestCookieProcessorGenerationHttp.java
 Wed Oct 29 20:05:34 2014
@@ -41,8 +41,8 @@ public class TestCookieProcessorGenerati
 @Test
 public void testUtf8CookieValue() throws Exception {
 Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
-Context ctx = tomcat.addContext("", 
System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 ctx.setCookieProcessor(new Rfc6265CookieProcessor());
 Tomcat.addServlet(ctx, "test", new CookieServlet("\u0120"));
 ctx.addServletMapping("/test", "test");



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



svn commit: r1635286 - /tomcat/trunk/test/org/apache/naming/resources/TestNamingContext.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 20:02:47 2014
New Revision: 1635286

URL: http://svn.apache.org/r1635286
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/naming/resources/TestNamingContext.java

Modified: tomcat/trunk/test/org/apache/naming/resources/TestNamingContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/naming/resources/TestNamingContext.java?rev=1635286&r1=1635285&r2=1635286&view=diff
==
--- tomcat/trunk/test/org/apache/naming/resources/TestNamingContext.java 
(original)
+++ tomcat/trunk/test/org/apache/naming/resources/TestNamingContext.java Wed 
Oct 29 20:02:47 2014
@@ -60,9 +60,8 @@ public class TestNamingContext extends T
 Tomcat tomcat = getTomcatInstance();
 tomcat.enableNaming();
 
-// Must have a real docBase - just use temp
-StandardContext ctx = (StandardContext)
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+org.apache.catalina.Context ctx = tomcat.addContext("", null);
 
 // Create the resource
 ContextResource cr = new ContextResource();
@@ -122,9 +121,8 @@ public class TestNamingContext extends T
 Tomcat tomcat = getTomcatInstance();
 tomcat.enableNaming();
 
-// Must have a real docBase - just use temp
-StandardContext ctx = (StandardContext)
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+org.apache.catalina.Context ctx = tomcat.addContext("", null);
 
 // Create the resource
 ContextResource cr = new ContextResource();
@@ -174,9 +172,8 @@ public class TestNamingContext extends T
 Tomcat tomcat = getTomcatInstance();
 tomcat.enableNaming();
 
-// Must have a real docBase - just use temp
-StandardContext ctx = (StandardContext)
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+org.apache.catalina.Context ctx = tomcat.addContext("", null);
 
 // Create the resource
 ContextResource cr = new ContextResource();
@@ -234,9 +231,8 @@ public class TestNamingContext extends T
 Tomcat tomcat = getTomcatInstance();
 tomcat.enableNaming();
 
-// Must have a real docBase - just use temp
-StandardContext ctx = (StandardContext)
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+StandardContext ctx = (StandardContext) tomcat.addContext("", null);
 
 ctx.setJndiExceptionOnFailedWrite(exceptionOnFailedWrite);
 
@@ -293,9 +289,8 @@ public class TestNamingContext extends T
 Tomcat tomcat = getTomcatInstance();
 tomcat.enableNaming();
 
-// Must have a real docBase - just use temp
-StandardContext ctx = (StandardContext)
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+org.apache.catalina.Context ctx = tomcat.addContext("", null);
 
 // Create the resource
 ContextEnvironment env = new ContextEnvironment();



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



Re: svn commit: r1635215 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread Rémy Maucherat
2014-10-29 20:27 GMT+01:00 Mark Thomas :

> OK. Lets leave it in place until the issues with the tests are fixed.
>
> The started flag being true for the MUST_COMPLETE state is causing
> problems too. It breaks code like this:
>
> if (request.isAsyncStarted()) {
> request.getAsyncContext().complete();
> }
>
> While you could make the "effects of complete have to be delayed..."
> argument, I don't think it holds in this case as the ability to test if
> complete() needs to be called is more important.
>
> What do you think about reverting that particular change?
>
> It's the same thing, the started flag should be true until the end of the
processing of complete, which means for example for code like:
ac.complete();
println("" + ac.isAsyncStarted());

It should display "true" rather than "false".

I'll add the strict flag as well for that.

Rémy


svn commit: r1635285 - in /tomcat/trunk/test/org/apache/coyote: ajp/TestAbstractAjpProcessor.java http11/TestAbstractHttp11Processor.java http11/filters/TestChunkedInputFilter.java http11/upgrade/Test

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 20:00:04 2014
New Revision: 1635285

URL: http://svn.apache.org/r1635285
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java
tomcat/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java

tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java
tomcat/trunk/test/org/apache/coyote/http11/upgrade/TestUpgrade.java

Modified: tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java?rev=1635285&r1=1635284&r2=1635285&view=diff
==
--- tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java 
(original)
+++ tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java Wed 
Oct 29 20:00:04 2014
@@ -69,8 +69,9 @@ public class TestAbstractAjpProcessor ex
 tomcat.getConnector().setProperty("connectionTimeout", "-1");
 tomcat.start();
 
-// Must have a real docBase - just use temp
-Context ctx = tomcat.addContext("", 
System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
+
 Tomcat.addServlet(ctx, "helloWorld", new HelloWorldServlet());
 ctx.addServletMapping("/", "helloWorld");
 
@@ -176,8 +177,9 @@ public class TestAbstractAjpProcessor ex
 
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx = tomcat.addContext("", 
System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
+
 Tomcat.addServlet(ctx, "bug55453", new Tester304WithBodyServlet());
 ctx.addServletMapping("/", "bug55453");
 
@@ -231,8 +233,9 @@ public class TestAbstractAjpProcessor ex
 
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx = tomcat.addContext("", 
System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
+
 ReadBodyServlet servlet = new ReadBodyServlet(callAvailable);
 Tomcat.addServlet(ctx, "ReadBody", servlet);
 ctx.addServletMapping("/", "ReadBody");

Modified: 
tomcat/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java?rev=1635285&r1=1635284&r2=1635285&view=diff
==
--- tomcat/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java 
(original)
+++ tomcat/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java 
Wed Oct 29 20:00:04 2014
@@ -57,13 +57,13 @@ public class TestAbstractHttp11Processor
 public void testResponseWithErrorChunked() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctxt = tomcat.addContext("", 
System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 // Add protected servlet
-Tomcat.addServlet(ctxt, "ChunkedResponseWithErrorServlet",
+Tomcat.addServlet(ctx, "ChunkedResponseWithErrorServlet",
 new ResponseWithErrorServlet(true));
-ctxt.addServletMapping("/*", "ChunkedResponseWithErrorServlet");
+ctx.addServletMapping("/*", "ChunkedResponseWithErrorServlet");
 
 tomcat.start();
 
@@ -347,13 +347,12 @@ public class TestAbstractHttp11Processor
 public void testPipelining() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctxt = tomcat.addContext("",
-System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 // Add protected servlet
-Tomcat.addServlet(ctxt, "TesterServlet", new TesterServlet());
-ctxt.addServletMapping("/foo", "TesterServlet");
+Tomcat.addServlet(ctx, "TesterServlet", new TesterServlet());
+ctx.addServletMapping("/foo", "TesterServlet");
 
 tomcat.start();
 
@@ -408,13 +407,12 @@ public class TestAbstractHttp11Processor
 public void testChunking11NoContentLength() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctxt = tomcat.addContext("",
-System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
- 

svn commit: r1635283 - in /tomcat/trunk/test/org/apache/catalina/startup: TestTomcat.java TestTomcatClassLoader.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 19:57:50 2014
New Revision: 1635283

URL: http://svn.apache.org/r1635283
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java
tomcat/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java?rev=1635283&r1=1635282&r2=1635283&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java Wed Oct 29 
19:57:50 2014
@@ -181,11 +181,8 @@ public class TestTomcat extends TomcatBa
 public void testProgrammatic() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-org.apache.catalina.Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
-// You can customize the context by calling
-// its API
+// No file system docBase required
+org.apache.catalina.Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, "myServlet", new HelloWorld());
 ctx.addServletMapping("/", "myServlet");
@@ -233,11 +230,8 @@ public class TestTomcat extends TomcatBa
 public void testSession() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-org.apache.catalina.Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
-// You can customize the context by calling
-// its API
+// No file system docBase required
+org.apache.catalina.Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, "myServlet", new HelloWorldSession());
 ctx.addServletMapping("/", "myServlet");
@@ -266,11 +260,8 @@ public class TestTomcat extends TomcatBa
 public void testEnableNaming() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-org.apache.catalina.Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
-
-// You can customise the context by calling its API
+// No file system docBase required
+org.apache.catalina.Context ctx = tomcat.addContext("", null);
 
 // Enable JNDI - it is disabled by default
 tomcat.enableNaming();
@@ -297,11 +288,8 @@ public class TestTomcat extends TomcatBa
 public void testEnableNamingGlobal() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-org.apache.catalina.Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
-
-// You can customise the context by calling its API
+// No file system docBase required
+org.apache.catalina.Context ctx = tomcat.addContext("", null);
 
 // Enable JNDI - it is disabled by default
 tomcat.enableNaming();
@@ -378,9 +366,8 @@ public class TestTomcat extends TomcatBa
 public void testBug53301() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-org.apache.catalina.Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+org.apache.catalina.Context ctx = tomcat.addContext("", null);
 
 InitCount initCount = new InitCount();
 Tomcat.addServlet(ctx, "initCount", initCount);

Modified: 
tomcat/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java?rev=1635283&r1=1635282&r2=1635283&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java 
Wed Oct 29 19:57:50 2014
@@ -40,9 +40,8 @@ public class TestTomcatClassLoader exten
 public void testDefaultClassLoader() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, "ClassLoaderReport", new 
ClassLoaderReport(null));
 ctx.addServletMapping("/", "ClassLoaderReport");
@@ -64,9 +63,8 @@ public class TestTomcatClassLoader exten
 Tomcat tomcat = getTomcatInstance();
  

svn commit: r1635284 - /tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 19:58:19 2014
New Revision: 1635284

URL: http://svn.apache.org/r1635284
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java

Modified: tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java?rev=1635284&r1=1635283&r2=1635284&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java Wed 
Oct 29 19:58:19 2014
@@ -16,7 +16,6 @@
  */
 package org.apache.catalina.valves;
 
-import java.io.File;
 import java.io.IOException;
 
 import javax.servlet.AsyncContext;
@@ -41,9 +40,8 @@ public class TestErrorReportValve extend
 public void testBug53071() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, "errorServlet", new ErrorServlet());
 ctx.addServletMapping("/", "errorServlet");
@@ -75,9 +73,8 @@ public class TestErrorReportValve extend
 public void testBug54220DoNotSetNotFound() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, "bug54220", new Bug54220Servlet(false));
 ctx.addServletMapping("/", "bug54220");
@@ -96,9 +93,8 @@ public class TestErrorReportValve extend
 public void testBug54220SetNotFound() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, "bug54220", new Bug54220Servlet(true));
 ctx.addServletMapping("/", "bug54220");
@@ -141,9 +137,8 @@ public class TestErrorReportValve extend
 public void testBug54536() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, "bug54536", new Bug54536Servlet());
 ctx.addServletMapping("/", "bug54536");
@@ -178,10 +173,8 @@ public class TestErrorReportValve extend
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-File docBase = new File(System.getProperty("java.io.tmpdir"));
-
-Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Bug56042Servlet bug56042Servlet = new Bug56042Servlet();
 Wrapper wrapper =



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



svn commit: r1635282 - in /tomcat/trunk/test/org/apache/catalina/session: TestPersistentManager.java TestStandardSession.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 19:55:08 2014
New Revision: 1635282

URL: http://svn.apache.org/r1635282
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/catalina/session/TestPersistentManager.java
tomcat/trunk/test/org/apache/catalina/session/TestStandardSession.java

Modified: 
tomcat/trunk/test/org/apache/catalina/session/TestPersistentManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/session/TestPersistentManager.java?rev=1635282&r1=1635281&r2=1635282&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/session/TestPersistentManager.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/session/TestPersistentManager.java 
Wed Oct 29 19:55:08 2014
@@ -99,9 +99,9 @@ public class TestPersistentManager exten
 
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
-Context ctx = tomcat.addContext("",
-System.getProperty("java.io.tmpdir"));
+
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, "DummyServlet", new DummyServlet());
 ctx.addServletMapping("/dummy", "DummyServlet");

Modified: tomcat/trunk/test/org/apache/catalina/session/TestStandardSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/session/TestStandardSession.java?rev=1635282&r1=1635281&r2=1635282&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/session/TestStandardSession.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/session/TestStandardSession.java Wed 
Oct 29 19:55:08 2014
@@ -53,8 +53,8 @@ public class TestStandardSession extends
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx = tomcat.addContext("", 
System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, "bug56578", new Bug56578Servlet());
 ctx.addServletMapping("/bug56578", "bug56578");



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



svn commit: r1635280 - /tomcat/trunk/test/org/apache/catalina/session/Threading.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 19:54:55 2014
New Revision: 1635280

URL: http://svn.apache.org/r1635280
Log:
Update for Tomcat 8

Modified:
tomcat/trunk/test/org/apache/catalina/session/Threading.java

Modified: tomcat/trunk/test/org/apache/catalina/session/Threading.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/session/Threading.java?rev=1635280&r1=1635279&r2=1635280&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/session/Threading.java (original)
+++ tomcat/trunk/test/org/apache/catalina/session/Threading.java Wed Oct 29 
19:54:55 2014
@@ -42,6 +42,7 @@ public class Threading {
  * 
  * Windows JDK 1.6.0_22_x64 - Thread safe
  * OSX JDK 1.6.0_22_x64 - Not thread safe
+ * OSX JDL 1.7.0_51_x64 - Not thread safe
  * 
  *
  * Therefore, have to assume that {@link FileInputStream#read(byte[])} is
@@ -60,7 +61,7 @@ public class Threading {
 // Assumes "ant release" has been run
 // Will need to be updated as new releases are made
 File file = new File(
-
"./output/release/v7.0.20-dev/bin/apache-tomcat-7.0.20-dev.zip");
+
"./output/release/v8.0.15-dev/bin/apache-tomcat-8.0.15-dev.zip");
 
 FileInputStream fis = new FileInputStream(file);
 



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



svn commit: r1635279 - /tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 19:45:02 2014
New Revision: 1635279

URL: http://svn.apache.org/r1635279
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java

Modified: 
tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java?rev=1635279&r1=1635278&r2=1635279&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java 
Wed Oct 29 19:45:02 2014
@@ -44,6 +44,7 @@ import org.junit.Assert;
 import org.junit.Assume;
 import org.junit.Test;
 
+import org.apache.catalina.Context;
 import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.startup.BytesStreamer;
 import org.apache.catalina.startup.TesterServlet;
@@ -125,9 +126,8 @@ public class TestNonBlockingAPI extends 
 @Test
 public void testNonBlockingWrite() throws Exception {
 Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
-StandardContext ctx = (StandardContext) tomcat.addContext("",
-System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 NBWriteServlet servlet = new NBWriteServlet();
 String servletName = NBWriteServlet.class.getName();
@@ -271,9 +271,8 @@ public class TestNonBlockingAPI extends 
 public void testNonBlockingWriteError() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-StandardContext ctx = (StandardContext) tomcat.addContext(
-"", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 TesterAccessLogValve alv = new TesterAccessLogValve();
 ctx.getPipeline().addValve(alv);
@@ -358,9 +357,8 @@ public class TestNonBlockingAPI extends 
 public void testBug55438NonBlockingReadWriteEmptyRead() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-StandardContext ctx = (StandardContext) tomcat.addContext("",
-System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 NBReadWriteServlet servlet = new NBReadWriteServlet();
 String servletName = NBReadWriteServlet.class.getName();



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



svn commit: r1635278 - /tomcat/trunk/test/org/apache/catalina/mapper/TestMapperWebapps.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 19:40:41 2014
New Revision: 1635278

URL: http://svn.apache.org/r1635278
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/catalina/mapper/TestMapperWebapps.java

Modified: tomcat/trunk/test/org/apache/catalina/mapper/TestMapperWebapps.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/mapper/TestMapperWebapps.java?rev=1635278&r1=1635277&r2=1635278&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/mapper/TestMapperWebapps.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/mapper/TestMapperWebapps.java Wed Oct 
29 19:40:41 2014
@@ -46,9 +46,8 @@ public class TestMapperWebapps extends T
 Tomcat tomcat = getTomcatInstance();
 tomcat.enableNaming();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, "Bug53356", new Bug53356Servlet());
 ctx.addServletMapping("", "Bug53356");



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



svn commit: r1635276 - /tomcat/trunk/test/org/apache/catalina/loader/

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 19:40:24 2014
New Revision: 1635276

URL: http://svn.apache.org/r1635276
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java

tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java

tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java

tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java

Modified: 
tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java?rev=1635276&r1=1635275&r2=1635276&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java 
Wed Oct 29 19:40:24 2014
@@ -42,10 +42,10 @@ public class TestVirtualWebappLoader ext
 @Test
 public void testStartInternal() throws Exception {
 Tomcat tomcat = getTomcatInstance();
+
 File appDir = new File("test/webapp");
-// Must have a real docBase - just use temp
-StandardContext ctx =
-(StandardContext)tomcat.addContext("",  appDir.getAbsolutePath());
+StandardContext ctx = (StandardContext) tomcat.addContext("",
+appDir.getAbsolutePath());
 
 
 WebappLoader loader = new WebappLoader();

Modified: 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java?rev=1635276&r1=1635275&r2=1635276&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java Wed 
Oct 29 19:40:24 2014
@@ -39,7 +39,7 @@ public class TestWebappClassLoader exten
 expected[1] = "jar:" + warUrl + "!/WEB-INF/lib/test.jar";
 
 Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
+
 StandardContext ctx =
 (StandardContext)tomcat.addContext("",  f.getAbsolutePath());
 

Modified: 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java?rev=1635276&r1=1635275&r2=1635276&view=diff
==
--- 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java
 (original)
+++ 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java
 Wed Oct 29 19:40:24 2014
@@ -41,9 +41,8 @@ public class TestWebappClassLoaderExecut
 public void testTimerThreadLeak() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx = tomcat.addContext("",
-System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 if (ctx instanceof StandardContext) {
 ((StandardContext) ctx).setClearReferencesStopThreads(true);

Modified: 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java?rev=1635276&r1=1635275&r2=1635276&view=diff
==
--- 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
 (original)
+++ 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
 Wed Oct 29 19:40:24 2014
@@ -40,9 +40,8 @@ public class TestWebappClassLoaderMemory
 public void testTimerThreadLeak() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 if (ctx instanceof StandardContext) {
 ((StandardContext) ctx).setClearReferencesStopTimerThreads(true);

Modified: 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java?rev=1635276&r1=1635275&r2=1635276&view=d

svn commit: r1635274 - /tomcat/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 19:37:27 2014
New Revision: 1635274

URL: http://svn.apache.org/r1635274
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java

Modified: 
tomcat/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java?rev=1635274&r1=1635273&r2=1635274&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java Wed 
Oct 29 19:37:27 2014
@@ -91,9 +91,8 @@ public class TestAddCharSetFilter extend
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 // Add the Servlet
 CharsetServlet servlet = new CharsetServlet(mode);



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



svn commit: r1635273 - /tomcat/trunk/test/org/apache/catalina/core/

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 19:37:10 2014
New Revision: 1635273

URL: http://svn.apache.org/r1635273
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/catalina/core/TestApplicationFilterConfig.java
tomcat/trunk/test/org/apache/catalina/core/TestNamingContextListener.java
tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java
tomcat/trunk/test/org/apache/catalina/core/TestStandardContextAliases.java
tomcat/trunk/test/org/apache/catalina/core/TestStandardContextValve.java
tomcat/trunk/test/org/apache/catalina/core/TestStandardHostValve.java
tomcat/trunk/test/org/apache/catalina/core/TestStandardWrapper.java

Modified: 
tomcat/trunk/test/org/apache/catalina/core/TestApplicationFilterConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestApplicationFilterConfig.java?rev=1635273&r1=1635272&r2=1635273&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/core/TestApplicationFilterConfig.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/core/TestApplicationFilterConfig.java 
Wed Oct 29 19:37:10 2014
@@ -37,9 +37,8 @@ public class TestApplicationFilterConfig
 public void testBug54170() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, "HelloWorld", new HelloWorldServlet());
 ctx.addServletMapping("/", "HelloWorld");

Modified: 
tomcat/trunk/test/org/apache/catalina/core/TestNamingContextListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestNamingContextListener.java?rev=1635273&r1=1635272&r2=1635273&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/core/TestNamingContextListener.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/core/TestNamingContextListener.java 
Wed Oct 29 19:37:10 2014
@@ -26,6 +26,7 @@ import static org.junit.Assert.assertEqu
 
 import org.junit.Test;
 
+import org.apache.catalina.Context;
 import org.apache.catalina.LifecycleState;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
@@ -48,9 +49,8 @@ public class TestNamingContextListener e
 public void testBug49132() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-org.apache.catalina.Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 // Enable JNDI - it is disabled by default
 tomcat.enableNaming();
@@ -96,9 +96,8 @@ public class TestNamingContextListener e
 public void testBug54096() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-org.apache.catalina.Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 // Enable JNDI - it is disabled by default
 tomcat.enableNaming();

Modified: tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java?rev=1635273&r1=1635272&r2=1635273&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java Wed Oct 
29 19:37:10 2014
@@ -421,9 +421,8 @@ public class TestStandardContext extends
 // Set up a container
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-File docBase = new File(System.getProperty("java.io.tmpdir"));
-Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 // Setup realm
 TesterMapRealm realm = new TesterMapRealm();
@@ -491,9 +490,9 @@ public class TestStandardContext extends
 // Set up a container
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-File docBase = new File(System.getProperty("java.io.tmpdir"));
-Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
+
 

svn commit: r1635269 - /tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 19:32:29 2014
New Revision: 1635269

URL: http://svn.apache.org/r1635269
Log:
Comment out some failing tests until they are fixed.

Modified:
tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java

Modified: tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java?rev=1635269&r1=1635268&r2=1635269&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java Wed 
Oct 29 19:32:29 2014
@@ -47,6 +47,7 @@ import static org.junit.Assert.assertNot
 import static org.junit.Assert.assertTrue;
 
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import org.apache.catalina.Context;
@@ -1842,12 +1843,16 @@ public class TestAsyncContextImpl extend
 
 
 @Test
+@Ignore // Test is broken. It needs to be adjusted to check for the ISE
+// once complete has taken effect
 public void testGetRequestISE() throws Exception {
 doTestAsyncISE(true);
 }
 
 
 @Test
+@Ignore // Test is broken. It needs to be adjusted to check for the ISE
+// once complete has taken effect
 public void testGetResponseISE() throws Exception {
 doTestAsyncISE(false);
 }



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



svn commit: r1635268 - /tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 19:31:50 2014
New Revision: 1635268

URL: http://svn.apache.org/r1635268
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java

Modified: tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java?rev=1635268&r1=1635267&r2=1635268&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java Wed 
Oct 29 19:31:50 2014
@@ -16,7 +16,6 @@
  */
 package org.apache.catalina.core;
 
-import java.io.File;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.util.HashMap;
@@ -86,9 +85,8 @@ public class TestAsyncContextImpl extend
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Bug49528Servlet servlet = new Bug49528Servlet();
 
@@ -124,9 +122,8 @@ public class TestAsyncContextImpl extend
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Bug49567Servlet servlet = new Bug49567Servlet();
 
@@ -167,9 +164,8 @@ public class TestAsyncContextImpl extend
 tomcat.getConnector().setAttribute(
 "connectionTimeout", Integer.valueOf(3000));
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 AsyncStartNoCompleteServlet servlet =
 new AsyncStartNoCompleteServlet();
@@ -207,9 +203,8 @@ public class TestAsyncContextImpl extend
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 AsyncStartWithCompleteServlet servlet =
 new AsyncStartWithCompleteServlet();
@@ -465,10 +460,8 @@ public class TestAsyncContextImpl extend
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-File docBase = new File(System.getProperty("java.io.tmpdir"));
-
-Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 TimeoutServlet timeout =
 new TimeoutServlet(completeOnTimeout, dispatchUrl);
@@ -624,10 +617,8 @@ public class TestAsyncContextImpl extend
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-File docBase = new File(System.getProperty("java.io.tmpdir"));
-
-Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 DispatchingServlet dispatch = new DispatchingServlet(false, false);
 Wrapper wrapper = Tomcat.addServlet(ctx, "dispatch", dispatch);
@@ -745,10 +736,8 @@ public class TestAsyncContextImpl extend
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-File docBase = new File(System.getProperty("java.io.tmpdir"));
-
-Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 TrackingServlet tracking = new TrackingServlet();
 Wrapper wrapper = Tomcat.addServlet(ctx, "tracking", tracking);
@@ -954,10 +943,8 @@ public class TestAsyncContextImpl extend
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-File docBase = new File(System.getProperty("java.io.tmpdir"));
-
-Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 DispatchingServlet dispatch

Re: svn commit: r1635215 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread Mark Thomas
On 29/10/2014 19:27, Mark Thomas wrote:
> On 29/10/2014 19:05, Rémy Maucherat wrote:
>> 2014-10-29 20:00 GMT+01:00 Mark Thomas :
>>
>>> OK. That makes sense.
>>>
>>> My initial reading of the spec was that the ISE was required as soon as
>>> complete() was called. After all, that is what the Javadoc says.
>>>
>>> However...  the Javadoc for complete() says:
>>> 
>>> If this method is called before the container-initiated dispatch that
>>> called startAsync has returned to the container, then the call will not
>>> take effect (and any invocations of AsyncListener.onComplete(AsyncEvent)
>>> will be delayed) until after the container-initiated dispatch has
>>> returned to the container.
>>> 
>>>
>>> It is certainly possible to read the Javadoc for complete() as meaning
>>> that the ISE should not be thrown until after onComplete() finishes
>>> although that isn't how I have been reading it.
>>>
>>> I withdraw my veto (again) and I don't see the need for those
>>> STRICT_SERVLET_COMPLIANCE checks either.
>>>
>>> I'll take a look at the failing unit tests and see what I can do to get
>>> them to pass.
>>>
>> Yes, the javadoc is kinda wrong since it should mention the associated
>> event. Use of the strict flag could remain until the testsuite passes IMO.
> 
> OK. Lets leave it in place until the issues with the tests are fixed.
> 
> The started flag being true for the MUST_COMPLETE state is causing
> problems too. It breaks code like this:
> 
> if (request.isAsyncStarted()) {
> request.getAsyncContext().complete();
> }
> 
> While you could make the "effects of complete have to be delayed..."
> argument, I don't think it holds in this case as the ability to test if
> complete() needs to be called is more important.
> 
> What do you think about reverting that particular change?

For the record, revert that change and all the other test failures go away.

Mark


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



Re: svn commit: r1635215 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread Mark Thomas
On 29/10/2014 19:05, Rémy Maucherat wrote:
> 2014-10-29 20:00 GMT+01:00 Mark Thomas :
> 
>> OK. That makes sense.
>>
>> My initial reading of the spec was that the ISE was required as soon as
>> complete() was called. After all, that is what the Javadoc says.
>>
>> However...  the Javadoc for complete() says:
>> 
>> If this method is called before the container-initiated dispatch that
>> called startAsync has returned to the container, then the call will not
>> take effect (and any invocations of AsyncListener.onComplete(AsyncEvent)
>> will be delayed) until after the container-initiated dispatch has
>> returned to the container.
>> 
>>
>> It is certainly possible to read the Javadoc for complete() as meaning
>> that the ISE should not be thrown until after onComplete() finishes
>> although that isn't how I have been reading it.
>>
>> I withdraw my veto (again) and I don't see the need for those
>> STRICT_SERVLET_COMPLIANCE checks either.
>>
>> I'll take a look at the failing unit tests and see what I can do to get
>> them to pass.
>>
> Yes, the javadoc is kinda wrong since it should mention the associated
> event. Use of the strict flag could remain until the testsuite passes IMO.

OK. Lets leave it in place until the issues with the tests are fixed.

The started flag being true for the MUST_COMPLETE state is causing
problems too. It breaks code like this:

if (request.isAsyncStarted()) {
request.getAsyncContext().complete();
}

While you could make the "effects of complete have to be delayed..."
argument, I don't think it holds in this case as the ability to test if
complete() needs to be called is more important.

What do you think about reverting that particular change?

Mark

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



Re: svn commit: r1635215 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread Rémy Maucherat
2014-10-29 20:00 GMT+01:00 Mark Thomas :

> OK. That makes sense.
>
> My initial reading of the spec was that the ISE was required as soon as
> complete() was called. After all, that is what the Javadoc says.
>
> However...  the Javadoc for complete() says:
> 
> If this method is called before the container-initiated dispatch that
> called startAsync has returned to the container, then the call will not
> take effect (and any invocations of AsyncListener.onComplete(AsyncEvent)
> will be delayed) until after the container-initiated dispatch has
> returned to the container.
> 
>
> It is certainly possible to read the Javadoc for complete() as meaning
> that the ISE should not be thrown until after onComplete() finishes
> although that isn't how I have been reading it.
>
> I withdraw my veto (again) and I don't see the need for those
> STRICT_SERVLET_COMPLIANCE checks either.
>
> I'll take a look at the failing unit tests and see what I can do to get
> them to pass.
>
> Yes, the javadoc is kinda wrong since it should mention the associated
event. Use of the strict flag could remain until the testsuite passes IMO.

Rémy


Re: svn commit: r1635215 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread Mark Thomas
On 29/10/2014 18:28, Rémy Maucherat wrote:
> 2014-10-29 19:22 GMT+01:00 Mark Thomas :
> 
>> OK. Try again :)
>>
>> -1 veto.
>>
>> This breaks a requirement of the Servlet 3.1 spec that an ISE should be
>> thrown if get[Request|Response]() is called after complete() is called.
>>
>> This commit breaks the unit tests that check this (the calls do not
>> thrown any exception).
>>
>> The commit did not include any test cases. What problem are you trying
>> to solve? And where in the spec does it mandate the behaviour you are
>> trying to achieve?
>>
> 
> The problem I am trying to solve is that the listener onComplete should be
> able to call getResponse and write things. Basically complete is not done
> until onComplete is done.

OK. That makes sense.

My initial reading of the spec was that the ISE was required as soon as
complete() was called. After all, that is what the Javadoc says.

However...  the Javadoc for complete() says:

If this method is called before the container-initiated dispatch that
called startAsync has returned to the container, then the call will not
take effect (and any invocations of AsyncListener.onComplete(AsyncEvent)
will be delayed) until after the container-initiated dispatch has
returned to the container.


It is certainly possible to read the Javadoc for complete() as meaning
that the ISE should not be thrown until after onComplete() finishes
although that isn't how I have been reading it.

I withdraw my veto (again) and I don't see the need for those
STRICT_SERVLET_COMPLIANCE checks either.

I'll take a look at the failing unit tests and see what I can do to get
them to pass.

Mark

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



Re: svn commit: r1635215 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread Violeta Georgieva
Hi,

2014-10-29 20:28 GMT+02:00 Rémy Maucherat :
>
> 2014-10-29 19:22 GMT+01:00 Mark Thomas :
>
> > OK. Try again :)
> >
> > -1 veto.
> >
> > This breaks a requirement of the Servlet 3.1 spec that an ISE should be
> > thrown if get[Request|Response]() is called after complete() is called.
> >
> > This commit breaks the unit tests that check this (the calls do not
> > thrown any exception).
> >
> > The commit did not include any test cases. What problem are you trying
> > to solve? And where in the spec does it mandate the behaviour you are
> > trying to achieve?
> >
>
> The problem I am trying to solve is that the listener onComplete should be
> able to call getResponse and write things. Basically complete is not done
> until onComplete is done.

If I remember correctly the change for onComplete was introduced because of
https://issues.apache.org/bugzilla/show_bug.cgi?id=56190


Regards,
Violeta

>
> Rémy


svn commit: r1635250 - /tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java

2014-10-29 Thread remm
Author: remm
Date: Wed Oct 29 18:35:26 2014
New Revision: 1635250

URL: http://svn.apache.org/r1635250
Log:
Use the strict compliance flag to wrap around the vetoed change deferring real 
completion of AsyncContext.complete until after onComplete.

Modified:
tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java

Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1635250&r1=1635249&r2=1635250&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Wed Oct 29 
18:35:26 2014
@@ -84,6 +84,9 @@ public class AsyncContextImpl implements
 }
 check();
 request.getCoyoteRequest().action(ActionCode.ASYNC_COMPLETE, null);
+if (!Globals.STRICT_SERVLET_COMPLIANCE) {
+clearServletRequestResponse();
+}
 }
 
 @Override
@@ -103,7 +106,9 @@ public class AsyncContextImpl implements
 }
 }
 } finally {
-clearServletRequestResponse();
+if (Globals.STRICT_SERVLET_COMPLIANCE) {
+clearServletRequestResponse();
+}
 context.unbind(Globals.IS_SECURITY_ENABLED, oldCL);
 }
 



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



[Bug 57155] Allow Context without real docbase in embedded Tomcat

2014-10-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57155

--- Comment #3 from Konstantin Kolinko  ---
I envision a caveat with ContextConfig.fixDocBase().
The fixDocBase() method replaces null docBase with one calculated from path,
(new ContextName(path, context.getWebappVersion())).getBaseName().

Using null in tomcat.addContext(path, null) is indeed a good API. (Maybe add a
single-argument Tomcat.addContext(path) for this use 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



Re: svn commit: r1635215 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread Rémy Maucherat
2014-10-29 19:22 GMT+01:00 Mark Thomas :

> OK. Try again :)
>
> -1 veto.
>
> This breaks a requirement of the Servlet 3.1 spec that an ISE should be
> thrown if get[Request|Response]() is called after complete() is called.
>
> This commit breaks the unit tests that check this (the calls do not
> thrown any exception).
>
> The commit did not include any test cases. What problem are you trying
> to solve? And where in the spec does it mandate the behaviour you are
> trying to achieve?
>

The problem I am trying to solve is that the listener onComplete should be
able to call getResponse and write things. Basically complete is not done
until onComplete is done.

Rémy


Re: svn commit: r1635215 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread Rémy Maucherat
2014-10-29 19:14 GMT+01:00 Mark Thomas :

>
> Hmm. I withdraw that veto. This change has no impact on the failing
> test. I need to investigate further. (It is odd though how we are now
> seeing a ServletException where there should be an ISE).
>
> If there are tests which contradict these fixes, they'll need to be fixed
IMO. I haven't run the TC testsuite yet with them, sorry.

Two of the changes should be rather logical though:
- getResponse should ISE after complete, but the listener onComplete call
should be part of that process
- the started flag being still true for MUST_COMPLETE is rather gratuitous,
but ...
- the javadoc says Throws: ServletException - if the given clazz fails to
be instantiated (so most exceptions should be wrapped)

Could 15 wait for next week ? I could have more edgy fixes on the way.

Rémy


Re: svn commit: r1635215 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread Mark Thomas
On 29/10/2014 17:29, r...@apache.org wrote:
> Author: remm
> Date: Wed Oct 29 17:29:19 2014
> New Revision: 1635215
> 
> URL: http://svn.apache.org/r1635215
> Log:
> Fix three edgy async context bugs.

OK. Try again :)

-1 veto.

This breaks a requirement of the Servlet 3.1 spec that an ISE should be
thrown if get[Request|Response]() is called after complete() is called.

This commit breaks the unit tests that check this (the calls do not
thrown any exception).

The commit did not include any test cases. What problem are you trying
to solve? And where in the spec does it mandate the behaviour you are
trying to achieve?

I'd really like to get this resolved quickly so it doesn't delay the
8.0.15 tag.

Note that there are now multiple Async unit tests failures and I have
not yet checked them all to see if they have the same root cause.

Mark

> 
> Modified:
> tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
> tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
> tomcat/trunk/webapps/docs/changelog.xml
> 
> Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1635215&r1=1635214&r2=1635215&view=diff
> ==
> --- tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java 
> (original)
> +++ tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Wed Oct 
> 29 17:29:19 2014
> @@ -84,7 +84,6 @@ public class AsyncContextImpl implements
>  }
>  check();
>  request.getCoyoteRequest().action(ActionCode.ASYNC_COMPLETE, null);
> -clearServletRequestResponse();
>  }
>  
>  @Override
> @@ -104,6 +103,7 @@ public class AsyncContextImpl implements
>  }
>  }
>  } finally {
> +clearServletRequestResponse();
>  context.unbind(Globals.IS_SECURITY_ENABLED, oldCL);
>  }
>  
> @@ -290,6 +290,10 @@ public class AsyncContextImpl implements
>  } catch (ClassNotFoundException e) {
>  ServletException se = new ServletException(e);
>  throw se;
> +} catch (Exception e) {
> +ExceptionUtils.handleThrowable(e.getCause());
> +ServletException se = new ServletException(e);
> +throw se;
>  }
>  return listener;
>  }
> 
> Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1635215&r1=1635214&r2=1635215&view=diff
> ==
> --- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] 
> (original)
> +++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Wed 
> Oct 29 17:29:19 2014
> @@ -109,7 +109,7 @@ public class AsyncStateMachine {
>  DISPATCHED(false, false, false),
>  STARTING(true, true, false),
>  STARTED(true, true, false),
> -MUST_COMPLETE(true, false, false),
> +MUST_COMPLETE(true, true, false),
>  COMPLETING(true, false, false),
>  TIMING_OUT(true, false, false),
>  MUST_DISPATCH(true, true, true),
> 
> Modified: tomcat/trunk/webapps/docs/changelog.xml
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1635215&r1=1635214&r2=1635215&view=diff
> ==
> --- tomcat/trunk/webapps/docs/changelog.xml (original)
> +++ tomcat/trunk/webapps/docs/changelog.xml Wed Oct 29 17:29:19 2014
> @@ -183,6 +183,13 @@
>  full class path, ensure that class path entries added directly to the
>  web application class loader are scanned. (markt)
>
> +  
> +AsyncContext should remain usable until fireOnComplete is called. 
> (remm)
> +  
> +  
> +AsyncContext createListener should wrap any instantiation exception
> +using a ServletException. (remm)
> +  
>  
>
>
> @@ -219,6 +226,9 @@
>  AsyncContext.start(Runnable) during non-blocking IO 
> reads
>  and writes. (markt)
>
> +  
> +Async state MUST_COMPLETE should still be started. (remm)
> +  
>  
>
>
> 
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


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



Re: svn commit: r1635215 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread Mark Thomas
On 29/10/2014 18:11, Mark Thomas wrote:
> On 29/10/2014 17:29, r...@apache.org wrote:
>> Author: remm
>> Date: Wed Oct 29 17:29:19 2014
>> New Revision: 1635215
>>
>> URL: http://svn.apache.org/r1635215
>> Log:
>> Fix three edgy async context bugs.
>>
>> Modified:
>> tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
>> tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
>> tomcat/trunk/webapps/docs/changelog.xml
>>
>> Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1635215&r1=1635214&r2=1635215&view=diff
>> ==
>> --- tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java 
>> (original)
>> +++ tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Wed Oct 
>> 29 17:29:19 2014
>> @@ -84,7 +84,6 @@ public class AsyncContextImpl implements
>>  }
>>  check();
>>  request.getCoyoteRequest().action(ActionCode.ASYNC_COMPLETE, null);
>> -clearServletRequestResponse();
>>  }
>>  
>>  @Override
>> @@ -104,6 +103,7 @@ public class AsyncContextImpl implements
>>  }
>>  }
>>  } finally {
>> +clearServletRequestResponse();
>>  context.unbind(Globals.IS_SECURITY_ENABLED, oldCL);
>>  }
>>  
>> @@ -290,6 +290,10 @@ public class AsyncContextImpl implements
>>  } catch (ClassNotFoundException e) {
>>  ServletException se = new ServletException(e);
>>  throw se;
>> +} catch (Exception e) {
>> +ExceptionUtils.handleThrowable(e.getCause());
>> +ServletException se = new ServletException(e);
>> +throw se;
> 
> -1 (veto)
> 
> The Servlet 3.1 specification requires that an IllegalStateException is
> thrown if get[Request|Response]() is called after complete().
> 
> There are unit tests for this that now fail.
> 
> Please revert this ASAP before it starts to block the 8.0.15 tag.

Hmm. I withdraw that veto. This change has no impact on the failing
test. I need to investigate further. (It is odd though how we are now
seeing a ServletException where there should be an ISE).

Mark


> Mark
> 
>>  }
>>  return listener;
>>  }
>>
>> Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1635215&r1=1635214&r2=1635215&view=diff
>> ==
>> --- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] 
>> (original)
>> +++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Wed 
>> Oct 29 17:29:19 2014
>> @@ -109,7 +109,7 @@ public class AsyncStateMachine {
>>  DISPATCHED(false, false, false),
>>  STARTING(true, true, false),
>>  STARTED(true, true, false),
>> -MUST_COMPLETE(true, false, false),
>> +MUST_COMPLETE(true, true, false),
>>  COMPLETING(true, false, false),
>>  TIMING_OUT(true, false, false),
>>  MUST_DISPATCH(true, true, true),
>>
>> Modified: tomcat/trunk/webapps/docs/changelog.xml
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1635215&r1=1635214&r2=1635215&view=diff
>> ==
>> --- tomcat/trunk/webapps/docs/changelog.xml (original)
>> +++ tomcat/trunk/webapps/docs/changelog.xml Wed Oct 29 17:29:19 2014
>> @@ -183,6 +183,13 @@
>>  full class path, ensure that class path entries added directly to 
>> the
>>  web application class loader are scanned. (markt)
>>
>> +  
>> +AsyncContext should remain usable until fireOnComplete is called. 
>> (remm)
>> +  
>> +  
>> +AsyncContext createListener should wrap any instantiation exception
>> +using a ServletException. (remm)
>> +  
>>  
>>
>>
>> @@ -219,6 +226,9 @@
>>  AsyncContext.start(Runnable) during non-blocking IO 
>> reads
>>  and writes. (markt)
>>
>> +  
>> +Async state MUST_COMPLETE should still be started. (remm)
>> +  
>>  
>>
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: dev-h...@tomcat.apache.org
>>
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


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

Re: svn commit: r1635215 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread Mark Thomas
On 29/10/2014 17:29, r...@apache.org wrote:
> Author: remm
> Date: Wed Oct 29 17:29:19 2014
> New Revision: 1635215
> 
> URL: http://svn.apache.org/r1635215
> Log:
> Fix three edgy async context bugs.
> 
> Modified:
> tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
> tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
> tomcat/trunk/webapps/docs/changelog.xml
> 
> Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1635215&r1=1635214&r2=1635215&view=diff
> ==
> --- tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java 
> (original)
> +++ tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Wed Oct 
> 29 17:29:19 2014
> @@ -84,7 +84,6 @@ public class AsyncContextImpl implements
>  }
>  check();
>  request.getCoyoteRequest().action(ActionCode.ASYNC_COMPLETE, null);
> -clearServletRequestResponse();
>  }
>  
>  @Override
> @@ -104,6 +103,7 @@ public class AsyncContextImpl implements
>  }
>  }
>  } finally {
> +clearServletRequestResponse();
>  context.unbind(Globals.IS_SECURITY_ENABLED, oldCL);
>  }
>  
> @@ -290,6 +290,10 @@ public class AsyncContextImpl implements
>  } catch (ClassNotFoundException e) {
>  ServletException se = new ServletException(e);
>  throw se;
> +} catch (Exception e) {
> +ExceptionUtils.handleThrowable(e.getCause());
> +ServletException se = new ServletException(e);
> +throw se;

-1 (veto)

The Servlet 3.1 specification requires that an IllegalStateException is
thrown if get[Request|Response]() is called after complete().

There are unit tests for this that now fail.

Please revert this ASAP before it starts to block the 8.0.15 tag.

Mark

>  }
>  return listener;
>  }
> 
> Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1635215&r1=1635214&r2=1635215&view=diff
> ==
> --- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] 
> (original)
> +++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Wed 
> Oct 29 17:29:19 2014
> @@ -109,7 +109,7 @@ public class AsyncStateMachine {
>  DISPATCHED(false, false, false),
>  STARTING(true, true, false),
>  STARTED(true, true, false),
> -MUST_COMPLETE(true, false, false),
> +MUST_COMPLETE(true, true, false),
>  COMPLETING(true, false, false),
>  TIMING_OUT(true, false, false),
>  MUST_DISPATCH(true, true, true),
> 
> Modified: tomcat/trunk/webapps/docs/changelog.xml
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1635215&r1=1635214&r2=1635215&view=diff
> ==
> --- tomcat/trunk/webapps/docs/changelog.xml (original)
> +++ tomcat/trunk/webapps/docs/changelog.xml Wed Oct 29 17:29:19 2014
> @@ -183,6 +183,13 @@
>  full class path, ensure that class path entries added directly to the
>  web application class loader are scanned. (markt)
>
> +  
> +AsyncContext should remain usable until fireOnComplete is called. 
> (remm)
> +  
> +  
> +AsyncContext createListener should wrap any instantiation exception
> +using a ServletException. (remm)
> +  
>  
>
>
> @@ -219,6 +226,9 @@
>  AsyncContext.start(Runnable) during non-blocking IO 
> reads
>  and writes. (markt)
>
> +  
> +Async state MUST_COMPLETE should still be started. (remm)
> +  
>  
>
>
> 
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


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



svn commit: r1635235 - /tomcat/trunk/test/org/apache/catalina/authenticator/TestDigestAuthenticator.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 18:04:08 2014
New Revision: 1635235

URL: http://svn.apache.org/r1635235
Log:
Avoid using temp as a docBase where it is not necessary

Modified:

tomcat/trunk/test/org/apache/catalina/authenticator/TestDigestAuthenticator.java

Modified: 
tomcat/trunk/test/org/apache/catalina/authenticator/TestDigestAuthenticator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/authenticator/TestDigestAuthenticator.java?rev=1635235&r1=1635234&r2=1635235&view=diff
==
--- 
tomcat/trunk/test/org/apache/catalina/authenticator/TestDigestAuthenticator.java
 (original)
+++ 
tomcat/trunk/test/org/apache/catalina/authenticator/TestDigestAuthenticator.java
 Wed Oct 29 18:04:08 2014
@@ -268,9 +268,8 @@ public class TestDigestAuthenticator ext
 // Configure a context with digest auth and a single protected resource
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctxt = tomcat.addContext(CONTEXT_PATH,
-System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctxt = tomcat.addContext(CONTEXT_PATH, null);
 
 // Add protected servlet
 Tomcat.addServlet(ctxt, "TesterServlet", new TesterServlet());



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



svn commit: r1635237 - in /tomcat/trunk/test/org/apache/catalina/connector: TestCoyoteAdapter.java TestRequest.java TestResponse.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 18:04:26 2014
New Revision: 1635237

URL: http://svn.apache.org/r1635237
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java
tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java
tomcat/trunk/test/org/apache/catalina/connector/TestResponse.java

Modified: tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java?rev=1635237&r1=1635236&r2=1635237&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java Wed 
Oct 29 18:04:26 2014
@@ -132,9 +132,8 @@ public class TestCoyoteAdapter extends T
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 Tomcat.addServlet(ctx, "servlet", new PathParamServlet());
 ctx.addServletMapping("/", "servlet");
@@ -186,9 +185,8 @@ public class TestCoyoteAdapter extends T
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("/testapp", 
System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("/testapp", null);
 
 Tomcat.addServlet(ctx, "servlet", new PathParamServlet());
 ctx.addServletMapping("*.txt", "servlet");
@@ -237,9 +235,8 @@ public class TestCoyoteAdapter extends T
 
 tomcat.getConnector().setURIEncoding(encoding);
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("/", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 PathInfoServlet servlet = new PathInfoServlet();
 Tomcat.addServlet(ctx, "servlet", servlet);
@@ -279,9 +276,8 @@ public class TestCoyoteAdapter extends T
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("/", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 AsyncServlet servlet = new AsyncServlet();
 Wrapper w = Tomcat.addServlet(ctx, "async", servlet);

Modified: tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java?rev=1635237&r1=1635236&r2=1635237&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java Wed Oct 29 
18:04:26 2014
@@ -265,9 +265,8 @@ public class TestRequest extends TomcatB
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 // Add the Servlet
 Tomcat.addServlet(ctx, "servlet", new EchoQueryStringServlet());
@@ -310,9 +309,8 @@ public class TestRequest extends TomcatB
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
 
 LoginConfig config = new LoginConfig();
 config.setAuthMethod("BASIC");
@@ -770,9 +768,8 @@ public class TestRequest extends TomcatB
 // Setup Tomcat instance
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-Context ctx = tomcat.addContext(deployPath,
-System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+Context ctx = tomcat.addContext(deployPath, null);
 
 Tomcat.addServlet(ctx, "servlet", new Bug56501Servelet());
 ctx.addServletMapping("/*", "servlet");

Modified: tomcat/trunk/test/org/apache/catalina/connector/TestResponse.java
URL: 
http://svn.apache.org/viewvc

svn commit: r1635228 - /tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 17:55:12 2014
New Revision: 1635228

URL: http://svn.apache.org/r1635228
Log:
Add a simple test of the normalization method

Modified:
tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java

Modified: tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java?rev=1635228&r1=1635227&r2=1635228&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java Wed 
Oct 29 17:55:12 2014
@@ -37,6 +37,7 @@ import org.apache.catalina.startup.Simpl
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
 import org.apache.tomcat.util.buf.ByteChunk;
+import org.apache.tomcat.util.buf.MessageBytes;
 
 public class TestCoyoteAdapter extends TomcatBaseTest {
 
@@ -325,6 +326,28 @@ public class TestCoyoteAdapter extends T
 Assert.assertTrue(servlet.isCompleted());
 }
 
+@Test
+public void testNormalize01() {
+doTestNormalize("/foo/../bar", "/bar");
+}
+
+private void doTestNormalize(String input, String expected) {
+MessageBytes mb = MessageBytes.newInstance();
+byte[] b = input.getBytes(StandardCharsets.UTF_8);
+mb.setBytes(b, 0, b.length);
+
+boolean result = CoyoteAdapter.normalize(mb);
+mb.toString();
+
+if (expected == null) {
+Assert.assertFalse(result);
+} else {
+Assert.assertTrue(result);
+Assert.assertEquals(expected, mb.toString());
+}
+}
+
+
 private class AsyncServlet extends HttpServlet {
 
 private static final long serialVersionUID = 1L;



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



svn commit: r1635227 - /tomcat/trunk/test/javax/servlet/http/TestHttpServlet.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 17:53:16 2014
New Revision: 1635227

URL: http://svn.apache.org/r1635227
Log:
Avoid using temp as a docBase where it is not necessary

Modified:
tomcat/trunk/test/javax/servlet/http/TestHttpServlet.java

Modified: tomcat/trunk/test/javax/servlet/http/TestHttpServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/javax/servlet/http/TestHttpServlet.java?rev=1635227&r1=1635226&r2=1635227&view=diff
==
--- tomcat/trunk/test/javax/servlet/http/TestHttpServlet.java (original)
+++ tomcat/trunk/test/javax/servlet/http/TestHttpServlet.java Wed Oct 29 
17:53:16 2014
@@ -37,9 +37,8 @@ public class TestHttpServlet extends Tom
 public void testBug53454() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
-// Must have a real docBase - just use temp
-StandardContext ctx = (StandardContext)
-tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+// No file system docBase required
+StandardContext ctx = (StandardContext) tomcat.addContext("", null);
 
 // Map the test Servlet
 LargeBodyServlet largeBodyServlet = new LargeBodyServlet();



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



svn commit: r1635222 - in /tomcat/trunk: java/org/apache/catalina/webresources/EmptyResourceSet.java java/org/apache/catalina/webresources/StandardRoot.java test/org/apache/tomcat/websocket/TestWsWebS

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 17:44:11 2014
New Revision: 1635222

URL: http://svn.apache.org/r1635222
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57155
Allow a web application to be configured that does not have a docBase on the 
file system. This is primarily intended for use when embedding.

Added:
tomcat/trunk/java/org/apache/catalina/webresources/EmptyResourceSet.java   
(with props)
Modified:
tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
tomcat/trunk/webapps/docs/changelog.xml

Added: tomcat/trunk/java/org/apache/catalina/webresources/EmptyResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/EmptyResourceSet.java?rev=1635222&view=auto
==
--- tomcat/trunk/java/org/apache/catalina/webresources/EmptyResourceSet.java 
(added)
+++ tomcat/trunk/java/org/apache/catalina/webresources/EmptyResourceSet.java 
Wed Oct 29 17:44:11 2014
@@ -0,0 +1,163 @@
+/*
+ * 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 org.apache.catalina.webresources;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Collections;
+import java.util.Set;
+
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.LifecycleState;
+import org.apache.catalina.WebResource;
+import org.apache.catalina.WebResourceRoot;
+import org.apache.catalina.WebResourceSet;
+import org.apache.catalina.util.LifecycleBase;
+
+/**
+ * A {@link WebResourceSet} implementation that is not backed by a file system
+ * and behaves as if it has no resources available. This is  primarily used in
+ * embedded mode when the web application is configured entirely
+ * programmatically and does not use any static resources from the file system.
+ */
+public class EmptyResourceSet extends LifecycleBase implements WebResourceSet {
+
+private static final String[] EMPTY_STRING_ARRAY = new String[0];
+
+private WebResourceRoot root;
+private boolean classLoaderOnly;
+
+public EmptyResourceSet(WebResourceRoot root) {
+this.root = root;
+}
+
+/**
+ * {@inheritDoc}
+ * 
+ * This implementation always returns an {@link EmptyResource}.
+ */
+@Override
+public WebResource getResource(String path) {
+return new EmptyResource(root, path);
+}
+
+/**
+ * {@inheritDoc}
+ * 
+ * This implementation always returns an empty array.
+ */
+@Override
+public String[] list(String path) {
+return EMPTY_STRING_ARRAY;
+}
+
+/**
+ * {@inheritDoc}
+ * 
+ * This implementation always returns an empty set.
+ */
+@Override
+public Set listWebAppPaths(String path) {
+return Collections.emptySet();
+}
+
+/**
+ * {@inheritDoc}
+ * 
+ * This implementation always returns false.
+ */
+@Override
+public boolean mkdir(String path) {
+return false;
+}
+
+/**
+ * {@inheritDoc}
+ * 
+ * This implementation always returns false.
+ */
+@Override
+public boolean write(String path, InputStream is, boolean overwrite) {
+return false;
+}
+
+@Override
+public void setRoot(WebResourceRoot root) {
+this.root = root;
+}
+
+@Override
+public boolean getClassLoaderOnly() {
+return classLoaderOnly;
+}
+
+@Override
+public void setClassLoaderOnly(boolean classLoaderOnly) {
+this.classLoaderOnly = classLoaderOnly;
+}
+
+/**
+ * {@inheritDoc}
+ * 
+ * This implementation always returns null.
+ */
+@Override
+public URL getBaseUrl() {
+return null;
+}
+
+/**
+ * {@inheritDoc}
+ * 
+ * Calls to this method will be ignored as this implementation always read
+ * only.
+ */
+@Override
+public void setReadOnly(boolean readOnly) {
+
+}
+
+/**
+ * {@inheritDoc}
+ * 
+ * This implementation always returns true.
+ */
+@Override
+public boolean isReadOnly() {
+return true;
+}
+
+@Override
+   

svn commit: r1635215 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread remm
Author: remm
Date: Wed Oct 29 17:29:19 2014
New Revision: 1635215

URL: http://svn.apache.org/r1635215
Log:
Fix three edgy async context bugs.

Modified:
tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1635215&r1=1635214&r2=1635215&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Wed Oct 29 
17:29:19 2014
@@ -84,7 +84,6 @@ public class AsyncContextImpl implements
 }
 check();
 request.getCoyoteRequest().action(ActionCode.ASYNC_COMPLETE, null);
-clearServletRequestResponse();
 }
 
 @Override
@@ -104,6 +103,7 @@ public class AsyncContextImpl implements
 }
 }
 } finally {
+clearServletRequestResponse();
 context.unbind(Globals.IS_SECURITY_ENABLED, oldCL);
 }
 
@@ -290,6 +290,10 @@ public class AsyncContextImpl implements
 } catch (ClassNotFoundException e) {
 ServletException se = new ServletException(e);
 throw se;
+} catch (Exception e) {
+ExceptionUtils.handleThrowable(e.getCause());
+ServletException se = new ServletException(e);
+throw se;
 }
 return listener;
 }

Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1635215&r1=1635214&r2=1635215&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] 
(original)
+++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Wed Oct 
29 17:29:19 2014
@@ -109,7 +109,7 @@ public class AsyncStateMachine {
 DISPATCHED(false, false, false),
 STARTING(true, true, false),
 STARTED(true, true, false),
-MUST_COMPLETE(true, false, false),
+MUST_COMPLETE(true, true, false),
 COMPLETING(true, false, false),
 TIMING_OUT(true, false, false),
 MUST_DISPATCH(true, true, true),

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1635215&r1=1635214&r2=1635215&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Oct 29 17:29:19 2014
@@ -183,6 +183,13 @@
 full class path, ensure that class path entries added directly to the
 web application class loader are scanned. (markt)
   
+  
+AsyncContext should remain usable until fireOnComplete is called. 
(remm)
+  
+  
+AsyncContext createListener should wrap any instantiation exception
+using a ServletException. (remm)
+  
 
   
   
@@ -219,6 +226,9 @@
 AsyncContext.start(Runnable) during non-blocking IO reads
 and writes. (markt)
   
+  
+Async state MUST_COMPLETE should still be started. (remm)
+  
 
   
   



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



svn commit: r1635185 - in /tomcat/trunk: java/org/apache/jasper/servlet/JspServlet.java webapps/docs/changelog.xml

2014-10-29 Thread remm
Author: remm
Date: Wed Oct 29 16:00:32 2014
New Revision: 1635185

URL: http://svn.apache.org/r1635185
Log:
r1003589 introduces a change of behavior where a missing JSP in jsp-file now 
throws an exception on init. This is apparently not the right behavior 
(although it is perfectly legitimate too).

Modified:
tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java?rev=1635185&r1=1635184&r2=1635185&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java (original)
+++ tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java Wed Oct 29 
16:00:32 2014
@@ -120,7 +120,7 @@ public class JspServlet extends HttpServ
 jspFile = config.getInitParameter("jspFile");
 try {
 if (null == context.getResource(jspFile)) {
-throw new ServletException("missing jspFile: [" + jspFile 
+ "]");
+return;
 }
 } catch (MalformedURLException e) {
 throw new ServletException("Can not locate jsp file", e);

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1635185&r1=1635184&r2=1635185&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Oct 29 16:00:32 2014
@@ -263,6 +263,10 @@
 the case where the source object is an array of primitives.
 (markt/kkolinko)
   
+  
+Do not throw an exception on missing JSP file servlet initialization.
+(remm)
+  
 
   
   



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



[Bug 57155] Allow Context without real docbase in embedded Tomcat

2014-10-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57155

--- Comment #2 from Mark Thomas  ---
I'm leaning towards treating a docBase value of "" as invalid and using null to
signal that a docBase on the file system is not required. I need to do some
testing of this.

-- 
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



[Bug 57154] Failure of TestWsWebSocketContainer when directory %TEMP%\test exists

2014-10-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57154

--- Comment #3 from Mark Thomas  ---
The root cause of this is indeed the redirect from the Mapper.

The redirect is a result of one of the requirements for welcome file
processing. The Servlet spec is clear Tomcat can implement these any way it
likes so the current Tomcat behaviour is valid.

It looks like the best solution for this bug is a fix for bug 57155.

-- 
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



[Bug 57153] StandardJarScanner only searches WEB_INF/lib & classes rather than full classpath

2014-10-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57153

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Thomas  ---
Fixed in 8.0.x and will be included in 8.0.15 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



svn commit: r1635154 - in /tomcat/trunk: java/org/apache/tomcat/util/scan/StandardJarScanner.java test/org/apache/catalina/filters/TesterServletContext.java test/org/apache/tomcat/util/scan/TestStanda

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 14:42:01 2014
New Revision: 1635154

URL: http://svn.apache.org/r1635154
Log:
URLs may be added directly to the web application's class path. ensure that 
they are scanned if a StandardJarScanner is configured to scan the class path.

Added:
tomcat/trunk/test/org/apache/tomcat/util/scan/TestStandardJarScanner.java   
(with props)
Modified:
tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
tomcat/trunk/test/org/apache/catalina/filters/TesterServletContext.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java?rev=1635154&r1=1635153&r2=1635154&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java Wed 
Oct 29 14:42:01 2014
@@ -195,11 +195,7 @@ public class StandardJarScanner implemen
 stopLoader = ClassLoader.getSystemClassLoader().getParent();
 }
 
-
 ClassLoader classLoader = context.getClassLoader();
-// No need to scan the web application class loader - we have
-// already scanned WEB-INF/lib and WEB-INF/classes
-classLoader = classLoader.getParent();
 
 // JARs are treated as application provided until the common class
 // loader is reached.

Modified: 
tomcat/trunk/test/org/apache/catalina/filters/TesterServletContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/filters/TesterServletContext.java?rev=1635154&r1=1635153&r2=1635154&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/filters/TesterServletContext.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/filters/TesterServletContext.java Wed 
Oct 29 14:42:01 2014
@@ -19,6 +19,7 @@ package org.apache.catalina.filters;
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.EventListener;
 import java.util.Map;
@@ -52,6 +53,27 @@ public class TesterServletContext implem
 return "";
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return an empty Set.
+ */
+@Override
+public Set getResourcePaths(String path) {
+return Collections.emptySet();
+}
+
+/**
+ * {@inheritDoc}
+ * 
+ * This test implementation is hard coded to return the class loader that
+ * loaded this class.
+ */
+@Override
+public ClassLoader getClassLoader() {
+return getClass().getClassLoader();
+}
+
 @Override
 public ServletContext getContext(String uripath) {
 throw new RuntimeException("Not implemented");
@@ -73,11 +95,6 @@ public class TesterServletContext implem
 }
 
 @Override
-public Set getResourcePaths(String path) {
-throw new RuntimeException("Not implemented");
-}
-
-@Override
 public URL getResource(String path) throws MalformedURLException {
 throw new RuntimeException("Not implemented");
 }
@@ -308,11 +325,6 @@ public class TesterServletContext implem
 }
 
 @Override
-public ClassLoader getClassLoader() {
-throw new RuntimeException("Not implemented");
-}
-
-@Override
 public void declareRoles(String... roleNames) {
 throw new RuntimeException("Not implemented");
 }

Added: tomcat/trunk/test/org/apache/tomcat/util/scan/TestStandardJarScanner.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/scan/TestStandardJarScanner.java?rev=1635154&view=auto
==
--- tomcat/trunk/test/org/apache/tomcat/util/scan/TestStandardJarScanner.java 
(added)
+++ tomcat/trunk/test/org/apache/tomcat/util/scan/TestStandardJarScanner.java 
Wed Oct 29 14:42:01 2014
@@ -0,0 +1,90 @@
+/*
+ * 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 la

svn commit: r1635134 - /tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 13:57:05 2014
New Revision: 1635134

URL: http://svn.apache.org/r1635134
Log:
Fix typo and Java 8 Javadoc issue

Modified:
tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?rev=1635134&r1=1635133&r2=1635134&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Wed Oct 
29 13:57:05 2014
@@ -92,7 +92,7 @@ import org.xml.sax.ext.EntityResolver2;
  *   
  * 
  * It can be mapped to sub-paths, however in all cases resources are served
- * from the web appplication resource root using the full path from the root
+ * from the web application resource root using the full path from the root
  * of the web application context.
  * e.g. given a web application structure:
  *
@@ -2192,6 +2192,8 @@ public class DefaultServlet extends Http
 
 /**
  * Validate range.
+ *
+ * @return true if the range is valid, otherwise false
  */
 public boolean validate() {
 if (end >= length)



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



[Bug 57157] out.setWriteListener in runnable of AsyncContext.start(runnable) cause response failed

2014-10-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57157

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Thomas  ---
Thanks for the report.

The NPE was triggered by some faulty error handling which has been fixed in
8.0.x for 8.0.15 onwards.

With the error handling fixed it was clear that Tomcat was not allowing calls
to AsyncContext.start(Runnable) during non-blocking reads and writes. I can see
no reason for that restriction - it looks like an oversight when the
non-blocking IO support was added - so I have removed it. This fix has also
been made in 8.0.x and will be in 8.0.15 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



svn commit: r1635113 - in /tomcat/trunk: java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 12:31:12 2014
New Revision: 1635113

URL: http://svn.apache.org/r1635113
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57157
Allow calls to AsyncContext.start(Runnable) during non-blocking IO reads and 
writes.

Modified:
tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1635113&r1=1635112&r2=1635113&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] 
(original)
+++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Wed Oct 
29 12:31:12 2014
@@ -318,7 +318,8 @@ public class AsyncStateMachine {
 }
 
 public synchronized void asyncRun(Runnable runnable) {
-if (state == AsyncState.STARTING || state ==  AsyncState.STARTED) {
+if (state == AsyncState.STARTING || state ==  AsyncState.STARTED ||
+state == AsyncState.READ_WRITE_OP) {
 // Execute the runnable using a container thread from the
 // Connector's thread pool. Use a wrapper to prevent a memory leak
 ClassLoader oldCL;

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1635113&r1=1635112&r2=1635113&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Oct 29 12:31:12 2014
@@ -209,6 +209,11 @@
 Trigger an error if an invalid attempt is made to use non-blocking IO.
 (markt)
   
+  
+57157: Allow calls to
+AsyncContext.start(Runnable) during non-blocking IO reads
+and writes. (markt)
+  
 
   
   



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



svn commit: r1635112 - in /tomcat/trunk: java/org/apache/coyote/http11/AbstractHttp11Processor.java webapps/docs/changelog.xml

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 12:29:41 2014
New Revision: 1635112

URL: http://svn.apache.org/r1635112
Log:
Don't try and carry on if there is an ISE when trying to use non-blocking IO. 
Treat it as the error it is.
Found this while debugging the test case in BZ 57157.

Modified:
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1635112&r1=1635111&r2=1635112&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Wed 
Oct 29 12:29:41 2014
@@ -1639,24 +1639,23 @@ public abstract class AbstractHttp11Proc
 if (status == SocketStatus.OPEN_WRITE) {
 try {
 asyncStateMachine.asyncOperation();
-try {
-if (outputBuffer.hasDataToWrite()) {
-if (outputBuffer.flushBuffer(false)) {
-// There is data to write but go via Response to
-// maintain a consistent view of non-blocking state
-response.checkRegisterForWrite(true);
-return SocketState.LONG;
-}
-}
-} catch (IOException x) {
-if (getLog().isDebugEnabled()) {
-getLog().debug("Unable to write async data.",x);
+
+if (outputBuffer.hasDataToWrite()) {
+if (outputBuffer.flushBuffer(false)) {
+// There is data to write but go via Response to
+// maintain a consistent view of non-blocking state
+response.checkRegisterForWrite(true);
+return SocketState.LONG;
 }
-status = SocketStatus.ASYNC_WRITE_ERROR;
-request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, x);
 }
-} catch (IllegalStateException x) {
-registerForEvent(false, true);
+} catch (IOException | IllegalStateException x) {
+// IOE - Problem writing to socket
+// ISE - Request/Response not in correct state for async write
+if (getLog().isDebugEnabled()) {
+getLog().debug("Unable to write async data.",x);
+}
+status = SocketStatus.ASYNC_WRITE_ERROR;
+request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, x);
 }
 } else if (status == SocketStatus.OPEN_READ &&
 request.getReadListener() != null) {
@@ -1665,7 +1664,12 @@ public abstract class AbstractHttp11Proc
 asyncStateMachine.asyncOperation();
 }
 } catch (IllegalStateException x) {
-registerForEvent(true, false);
+// ISE - Request/Response not in correct state for async read
+if (getLog().isDebugEnabled()) {
+getLog().debug("Unable to read async data.",x);
+}
+status = SocketStatus.ASYNC_READ_ERROR;
+request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, x);
 }
 }
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1635112&r1=1635111&r2=1635112&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Oct 29 12:29:41 2014
@@ -205,6 +205,10 @@
 Do not increase remaining counter at end of stream in
 IdentityInputFilter. (kkolinko)
   
+  
+Trigger an error if an invalid attempt is made to use non-blocking IO.
+(markt)
+  
 
   
   



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



svn commit: r1635111 - /tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 12:25:34 2014
New Revision: 1635111

URL: http://svn.apache.org/r1635111
Log:
Formatting. No functional change.

Modified:
tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java

Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1635111&r1=1635110&r2=1635111&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Wed Oct 29 
12:25:34 2014
@@ -516,6 +516,7 @@ public class AsyncContextImpl implements
 "asyncContextImpl.requestEnded"));
 }
 }
+
 private static class DebugException extends Exception {
 private static final long serialVersionUID = 1L;
 }



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



svn commit: r1635110 - in /tomcat/trunk/java/org/apache/coyote: AbstractProcessor.java AsyncStateMachine.java

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 12:24:42 2014
New Revision: 1635110

URL: http://svn.apache.org/r1635110
Log:
AsyncStateMachine doesn't need to know what type of socket the Processor
is associated with.

Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java
tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java?rev=1635110&r1=1635109&r2=1635110&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java Wed Oct 29 
12:24:42 2014
@@ -37,7 +37,7 @@ public abstract class AbstractProcessor<
 protected static final StringManager sm = 
StringManager.getManager(Constants.Package);
 
 protected Adapter adapter;
-protected final AsyncStateMachine asyncStateMachine;
+protected final AsyncStateMachine asyncStateMachine;
 protected final AbstractEndpoint endpoint;
 protected final Request request;
 protected final Response response;
@@ -62,7 +62,7 @@ public abstract class AbstractProcessor<
 
 public AbstractProcessor(AbstractEndpoint endpoint) {
 this.endpoint = endpoint;
-asyncStateMachine = new AsyncStateMachine<>(this);
+asyncStateMachine = new AsyncStateMachine(this);
 request = new Request();
 response = new Response();
 response.setHook(this);

Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1635110&r1=1635109&r2=1635110&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] 
(original)
+++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Wed Oct 
29 12:24:42 2014
@@ -97,7 +97,7 @@ import org.apache.tomcat.util.security.P
  * 
||
  * 
  */
-public class AsyncStateMachine {
+public class AsyncStateMachine {
 
 /**
  * The string manager for this package.
@@ -145,10 +145,10 @@ public class AsyncStateMachine {
 private volatile AsyncState state = AsyncState.DISPATCHED;
 // Need this to fire listener on complete
 private AsyncContextCallback asyncCtxt = null;
-private final Processor processor;
+private final Processor processor;
 
 
-public AsyncStateMachine(Processor processor) {
+public AsyncStateMachine(Processor processor) {
 this.processor = processor;
 }
 



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



svn commit: r1635093 - in /tomcat/trunk: java/org/apache/catalina/valves/rewrite/RewriteValve.java webapps/docs/changelog.xml

2014-10-29 Thread remm
Author: remm
Date: Wed Oct 29 10:37:49 2014
New Revision: 1635093

URL: http://svn.apache.org/r1635093
Log:
Fix alias for cookie rewrite flag, should be CO rather than C.

Modified:
tomcat/trunk/java/org/apache/catalina/valves/rewrite/RewriteValve.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/valves/rewrite/RewriteValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/rewrite/RewriteValve.java?rev=1635093&r1=1635092&r2=1635093&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/rewrite/RewriteValve.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/valves/rewrite/RewriteValve.java Wed 
Oct 29 10:37:49 2014
@@ -641,12 +641,12 @@ public class RewriteValve extends ValveB
 protected static void parseRuleFlag(String line, RewriteRule rule, String 
flag) {
 if (flag.equals("chain") || flag.equals("C")) {
 rule.setChain(true);
-} else if (flag.startsWith("cookie=") || flag.startsWith("C=")) {
+} else if (flag.startsWith("cookie=") || flag.startsWith("CO=")) {
 rule.setCookie(true);
 if (flag.startsWith("cookie")) {
 flag = flag.substring("cookie=".length());
-} else if (flag.startsWith("C=")) {
-flag = flag.substring("C=".length());
+} else if (flag.startsWith("CO=")) {
+flag = flag.substring("CO=".length());
 }
 StringTokenizer tokenizer = new StringTokenizer(flag, ":");
 if (tokenizer.countTokens() < 2) {

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1635093&r1=1635092&r2=1635093&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Oct 29 10:37:49 2014
@@ -175,6 +175,9 @@
 PrintWriter obtained from the 
ServletResponse.
 (markt)
   
+  
+Cookie rewrite flag abbreviation should be CO rather than C. (remm)
+  
 
   
   



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



svn commit: r1635091 - in /tomcat/trunk/test/org/apache: catalina/mbeans/ catalina/realm/ catalina/servlets/ catalina/session/ catalina/startup/ catalina/tribes/ catalina/tribes/demos/ catalina/valves

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 10:20:09 2014
New Revision: 1635091

URL: http://svn.apache.org/r1635091
Log:
Fix the Java 8 Javadoc warnings in the tests by removing pointless Javadoc and 
changing comments with problems to non-Javadoc format

Modified:
tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java
tomcat/trunk/test/org/apache/catalina/realm/TestRealmBase.java
tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java
tomcat/trunk/test/org/apache/catalina/servlets/TestWebdavServlet.java
tomcat/trunk/test/org/apache/catalina/session/TestStandardSession.java
tomcat/trunk/test/org/apache/catalina/session/Threading.java
tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java
tomcat/trunk/test/org/apache/catalina/startup/TestListener.java
tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java
tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
tomcat/trunk/test/org/apache/catalina/tribes/TesterUtil.java
tomcat/trunk/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
tomcat/trunk/test/org/apache/catalina/tribes/demos/MapDemo.java
tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java
tomcat/trunk/test/org/apache/coyote/ajp/SimpleAjpClient.java
tomcat/trunk/test/org/apache/coyote/http11/TestGzipOutputFilter.java
tomcat/trunk/test/org/apache/el/TestValueExpressionImpl.java
tomcat/trunk/test/org/apache/naming/resources/TestWarDirContext.java
tomcat/trunk/test/org/apache/tomcat/util/buf/TestByteChunk.java
tomcat/trunk/test/org/apache/tomcat/websocket/TesterConnectionLimit.java

Modified: tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java?rev=1635091&r1=1635090&r2=1635091&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java Wed Oct 
29 10:20:09 2014
@@ -141,7 +141,7 @@ public class TestRegistration extends To
 };
 }
 
-/**
+/*
  * Test verifying that Tomcat correctly de-registers the MBeans it has
  * registered.
  * @author Marc Guillemot
@@ -252,7 +252,7 @@ public class TestRegistration extends To
 assertEquals("Remaining: " + onames, 0, onames.size());
 }
 
-/**
+/*
  * Confirm that, as far as ObjectName is concerned, the order of the key
  * properties is not significant.
  */

Modified: tomcat/trunk/test/org/apache/catalina/realm/TestRealmBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/realm/TestRealmBase.java?rev=1635091&r1=1635090&r2=1635091&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/realm/TestRealmBase.java (original)
+++ tomcat/trunk/test/org/apache/catalina/realm/TestRealmBase.java Wed Oct 29 
10:20:09 2014
@@ -637,7 +637,7 @@ public class TestRealmBase {
 }
 
 
-/**
+/*
  * This test case covers the special case in section 13.4.1 of the Servlet
  * 3.1 specification for {@link javax.servlet.annotation.HttpConstraint}.
  */

Modified: tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java?rev=1635091&r1=1635090&r2=1635091&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java Wed 
Oct 29 10:20:09 2014
@@ -49,7 +49,7 @@ import org.apache.tomcat.websocket.serve
 
 public class TestDefaultServlet extends TomcatBaseTest {
 
-/**
+/*
  * Test attempting to access special paths (WEB-INF/META-INF) using
  * DefaultServlet.
  */
@@ -89,7 +89,7 @@ public class TestDefaultServlet extends 
 
 }
 
-/**
+/*
  * Verify serving of gzipped resources from context root.
  */
 @Test
@@ -144,7 +144,7 @@ public class TestDefaultServlet extends 
 assertTrue(responseHeaders.contains("Content-Length: " + indexSize));
 }
 
-/**
+/*
  * Test https://issues.apache.org/bugzilla/show_bug.cgi?id=50026
  * Verify serving of resources from context root with subpath mapping.
  */
@@ -215,7 +215,7 @@ public class TestDefaultServlet extends 
 
 }
 
-/**
+/*
  * Test https://issues.apache.org/bugzilla/show_bug.cgi?id=50413 Serving a
  * custom error page
  */
@@ -297,7 +297,7 @@ public class TestDefaultServlet extends 
 assertEquals("It is 404.html", client.getResponseBody());
 }
 
-/**
+/*
  * Test what happens if a custom 404 pag

svn commit: r1635086 - in /tomcat/sandbox/trunk-maven-layout: apache-tomcat/pom.xml pom.xml tomcat-webapps/ROOT/pom.xml tomcat-webapps/docs/pom.xml

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 10:08:56 2014
New Revision: 1635086

URL: http://svn.apache.org/r1635086
Log:
Add version filtering. Patch by Pierre Viret.

Modified:
tomcat/sandbox/trunk-maven-layout/apache-tomcat/pom.xml
tomcat/sandbox/trunk-maven-layout/pom.xml
tomcat/sandbox/trunk-maven-layout/tomcat-webapps/ROOT/pom.xml
tomcat/sandbox/trunk-maven-layout/tomcat-webapps/docs/pom.xml

Modified: tomcat/sandbox/trunk-maven-layout/apache-tomcat/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/apache-tomcat/pom.xml?rev=1635086&r1=1635085&r2=1635086&view=diff
==
--- tomcat/sandbox/trunk-maven-layout/apache-tomcat/pom.xml (original)
+++ tomcat/sandbox/trunk-maven-layout/apache-tomcat/pom.xml Wed Oct 29 10:08:56 
2014
@@ -191,7 +191,7 @@

 
 src/main/resources
-false
+true
 ${tomcat.distrib.base}
 
 conf/tomcat-users.xsd

Modified: tomcat/sandbox/trunk-maven-layout/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/pom.xml?rev=1635086&r1=1635085&r2=1635086&view=diff
==
--- tomcat/sandbox/trunk-maven-layout/pom.xml (original)
+++ tomcat/sandbox/trunk-maven-layout/pom.xml Wed Oct 29 10:08:56 2014
@@ -92,6 +92,7 @@
 
 **/*.java
 
+true
 
 
 

Modified: tomcat/sandbox/trunk-maven-layout/tomcat-webapps/ROOT/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/tomcat-webapps/ROOT/pom.xml?rev=1635086&r1=1635085&r2=1635086&view=diff
==
--- tomcat/sandbox/trunk-maven-layout/tomcat-webapps/ROOT/pom.xml (original)
+++ tomcat/sandbox/trunk-maven-layout/tomcat-webapps/ROOT/pom.xml Wed Oct 29 
10:08:56 2014
@@ -77,6 +77,14 @@
 
 
${project.build.directory}/generated-resources
 
+
+
+src/main/webapp
+
+*.jsp
+
+true
+
 
 
 

Modified: tomcat/sandbox/trunk-maven-layout/tomcat-webapps/docs/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/tomcat-webapps/docs/pom.xml?rev=1635086&r1=1635085&r2=1635086&view=diff
==
--- tomcat/sandbox/trunk-maven-layout/tomcat-webapps/docs/pom.xml (original)
+++ tomcat/sandbox/trunk-maven-layout/tomcat-webapps/docs/pom.xml Wed Oct 29 
10:08:56 2014
@@ -44,6 +44,7 @@
 
 architecture/*.xml
 
+true
 
 
 



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



[Bug 56397] Establish parallel Maven-based build process

2014-10-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56397

--- Comment #45 from Mark Thomas  ---
Patch applied. Many thanks.

-- 
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: Array handling in ELSupport.coerceToType() (Re: r1633806, r1607906)

2014-10-29 Thread Mark Thomas
On 28/10/2014 21:27, Mark Thomas wrote:
> On 26/10/2014 22:40, Konstantin Kolinko wrote:
>> Hi!
>>
>> This is a comment on the following commits:
>>
>> URL: http://svn.apache.org/r1633806
>> Log:
>> When coercing an object to a given type, only attempt coercion to an
>> array if both the object type and the target type are an array type.
>>
>> URL: http://svn.apache.org/r1607906
>> Log:
>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56652
>> Add support for method parameters that use arrays and varargs to
>> ELProcessor.defineFunction()
>>
>>
>> Issues:
>>
>> 1) General issue:
>> In r1607906 there was added a conversion support for arrays into
>> ELSupport.coerceToType() and r1633806 fixed a bug in it.
>>
>> My understanding is that the method ELSupport.coerceToType()
>> implements conversion rules from EL specification chapter "Type
>> Conversion" (ch.1.23 in EL 3.0).
>>
>> My concern is that EL specification does not specify such conversion
>> for array elements.
>>
>> As such, the varargs support fix needs a different implementation that
>> does not change the ELSupport.coerceToType() method.
> 
> It is a grey area. Those coercion rules get used in multiple places and
> some parts of the EL spec explicitly or implicitly require array support.
> 
> Unless we get a complaint that this feature actually breaks something
> (which I view as unlikely) I'm of the view we treat this as a Tomcat
> specific extension and leave it in. Meanwhile when the EL.next EG starts
> up, I'll raise the issue of array support for coercion.
> 
>> 2) Technical issue:
>> The ELSupport.coerceToArray() method does not support arrays of
>> primitives.  It class-casts its argument "(Object[]) obj",  but that
>> will fail for arrays of primitives.  The correct way is to use the
>> following method to access array elements:
>> java.lang.reflect.Array.get(Object, int): Object
> 
> Fair point. I'll take a look at a fix.

Fixed.

Thanks,

Mark


> 
> 
>> 3) Bikeshed:
>> Maybe mention BZ 56425#c6 in changelog for r1607906.
> 
> Feel free to paint that particular bikeshed if you wish.
> 
>> I noted another unrelated difference vs specification in
>> coerceToType() method - filed BZ 57148.
> 
> Thanks.
> 
> Mark
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


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



svn commit: r1635081 - in /tomcat/trunk: java/org/apache/el/lang/ELSupport.java test/javax/el/TestELProcessor.java test/javax/el/TesterBean.java webapps/docs/changelog.xml

2014-10-29 Thread markt
Author: markt
Date: Wed Oct 29 09:49:02 2014
New Revision: 1635081

URL: http://svn.apache.org/r1635081
Log:
When coercing an object to an array type in Expression Langauage, handle the 
case where the source object is an array of primitives.

Modified:
tomcat/trunk/java/org/apache/el/lang/ELSupport.java
tomcat/trunk/test/javax/el/TestELProcessor.java
tomcat/trunk/test/javax/el/TesterBean.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/el/lang/ELSupport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/lang/ELSupport.java?rev=1635081&r1=1635080&r2=1635081&view=diff
==
--- tomcat/trunk/java/org/apache/el/lang/ELSupport.java (original)
+++ tomcat/trunk/java/org/apache/el/lang/ELSupport.java Wed Oct 29 09:49:02 2014
@@ -494,16 +494,18 @@ public class ELSupport {
 final Class type) {
 // Note: Nested arrays will result in nested calls to this method.
 
+// Note: Calling method has checked the obj is an array.
+
+int size = Array.getLength(obj);
 // Cast the input object to an array (calling method has checked it is
 // an array)
-Object[] array = (Object[]) obj;
 // Get the target type for the array elements
 Class componentType = type.getComponentType();
 // Create a new array of the correct type
-Object result = Array.newInstance(componentType, array.length);
+Object result = Array.newInstance(componentType, size);
 // Coerce each element in turn.
-for (int i = 0; i < array.length; i++) {
-Array.set(result, i, coerceToType(array[i], componentType));
+for (int i = 0; i < size; i++) {
+Array.set(result, i, coerceToType(Array.get(obj, i), 
componentType));
 }
 
 return result;

Modified: tomcat/trunk/test/javax/el/TestELProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TestELProcessor.java?rev=1635081&r1=1635080&r2=1635081&view=diff
==
--- tomcat/trunk/test/javax/el/TestELProcessor.java (original)
+++ tomcat/trunk/test/javax/el/TestELProcessor.java Wed Oct 29 09:49:02 2014
@@ -191,4 +191,21 @@ public class TestELProcessor {
 elp.eval("fn:test(null, null)");
 Assert.assertEquals("I", TesterFunctions.getCallList());
 }
+
+
+@Test
+public void testPrimitiveArray01() {
+ELProcessor elp = new ELProcessor();
+TesterBean bean01= new TesterBean("bean01");
+elp.defineBean("bean01", bean01);
+elp.defineBean("bean02", new TesterBean("bean02"));
+
+Object result = 
elp.eval("bean02.setValueC(bean01.valueB);bean02.valueC");
+
+Integer[] resultArray = (Integer[]) result;
+Assert.assertEquals(bean01.getValueB().length, resultArray.length);
+for (int i = 0; i < resultArray.length; i++) {
+Assert.assertEquals(bean01.getValueB()[i], 
resultArray[i].intValue());
+}
+}
 }

Modified: tomcat/trunk/test/javax/el/TesterBean.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TesterBean.java?rev=1635081&r1=1635080&r2=1635081&view=diff
==
--- tomcat/trunk/test/javax/el/TesterBean.java (original)
+++ tomcat/trunk/test/javax/el/TesterBean.java Wed Oct 29 09:49:02 2014
@@ -19,6 +19,7 @@ package javax.el;
 public class TesterBean {
 
 private String name;
+private Integer[] valueC;
 
 public TesterBean(String name) {
 this.name = name;
@@ -40,4 +41,16 @@ public class TesterBean {
 public String getValueA() throws Exception {
 throw new Exception();
 }
+
+public int[] getValueB() {
+return new int[] {1,2,3,4,5};
+}
+
+public void setValueC(Integer[] values) {
+valueC = values;
+}
+
+public Integer[] getValueC() {
+return valueC;
+}
 }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1635081&r1=1635080&r2=1635081&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Oct 29 09:49:02 2014
@@ -241,6 +241,11 @@
 $ and # when processing literal expressions 
in
 expression language. (markt)
   
+  
+When coercing an object to an array type in Expression Langauage, 
handle
+the case where the source object is an array of primitives.
+(markt/kkolinko)
+  
 
   
   



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



svn commit: r6899 - /release/tomcat/tomcat-connectors/native/README.html

2014-10-29 Thread kkolinko
Author: kkolinko
Date: Wed Oct 29 09:25:04 2014
New Revision: 6899

Log:
Update "current version" in README file

Modified:
release/tomcat/tomcat-connectors/native/README.html

Modified: release/tomcat/tomcat-connectors/native/README.html
==
--- release/tomcat/tomcat-connectors/native/README.html (original)
+++ release/tomcat/tomcat-connectors/native/README.html Wed Oct 29 09:25:04 2014
@@ -1,5 +1,5 @@
 The Apache Tomcat Native
 
-Current release version is 1.1.31.
+Current release version is 1.1.32.
 
 



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



Re: [ANN] Apache Tomcat Native 1.1.32 released

2014-10-29 Thread Mark Thomas
On 28/10/2014 21:28, Mark Thomas wrote:
> The Apache Tomcat team announces the immediate availability of Apache
> Tomcat Native 1.1.32 stable.
> 
> The key features of this release are:
> - Add support for TLSv1.1 and TLSv1.2
> - Link Windows binaries with OpenSSL 1.0.1i and APR 1.5.1

Correction. OpenSSL 1.0.1*j*

> 
> Please refer to the change log for the complete list of changes:
> http://tomcat.apache.org/native-doc/miscellaneous/changelog.html
> 
> Downloads:
> http://tomcat.apache.org/download-native.cgi
> 
> The Apache Tomcat Native Library provides portable API for features
> not found in contemporary JDK's. It uses Apache Portable Runtime as
> operating system abstraction layer and OpenSSL for SSL networking and
> allows optimal performance in production environments.
> 
> 
> Thank you,
> 


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



Re: [ANN] Apache Tomcat Native 1.1.32 released

2014-10-29 Thread Mark Thomas
On 29/10/2014 02:59, Christopher Schultz wrote:
> Konstantin,
> 
> On 10/28/14 7:33 PM, Konstantin Kolinko wrote:
>> 2014-10-29 2:17 GMT+03:00 Christopher Schultz :
>>> -BEGIN PGP SIGNED MESSAGE-
>>> Hash: SHA256
>>>
>>> All,
>>>
>>> A few notes:
>>>
>>> 1. Some mirrors have not yet updated and still say 1.1.31 is the
>>> latest. To download 1.1.32, choose alternative mirrors until you find
>>> one that says 1.1.32.
>>
>> The binaries were published ~5 days ago (r6825). You should be very
>> lucky to find a mirror that does not have them.
> 
> Many that I try are still out of date. As of right now:
> http://tomcat.apache.org/download-native.cgi?Preferred=http%3A%2F%2Fwww.carfab.com%2Fapachesoftware%2F
> 
> http://tomcat.apache.org/download-native.cgi?Preferred=http%3A%2F%2Fsupergsego.com%2Fapache%2F
> 
> More of them were outdated earlier today when I checked.  Not every
> mirror updates every hour...

They must update at least once a day. 1.1.32 will be on every mirror.

What you are seeing is a failure of the ASF's US www server to keep up
with web site updates (that box hosts a number of services and is
saturated in terms of IO hence the delays - infra are working on the
issue). Try tomcat.eu.apache.org and you'll see the right version.

Mark


> 
>>> 2. The Microsoft Windows binaries of Tomcat Native 1.1.32 are
>>> statically-linked against and include the CLI OpenSSL version 1.0.1j
>>> instead of 1.0.1i as claimed below. At some point during the
>>> excitement last week, two separate versions of OpenSSL were released
>>> in rapid succession, and i and j are next to each other in the
>>> alphabet and on an English keyboard, plus they look an awful lot alike
>>> so it's not a surprise that Mark had a typo in his release announcement.
>>
>> Just a typo in e-mail. The announcement at the web site is OK.
> 
> For those reading the email announcement, I just wanted to be clear.
> 
> Thanks,
> -chris
> 


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