You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by vi...@apache.org on 2014/09/03 08:05:59 UTC
svn commit: r1622166 - in /tomcat/tc7.0.x/trunk: ./
java/org/apache/catalina/core/StandardContext.java
test/org/apache/catalina/core/TestStandardContext.java
webapps/docs/changelog.xml
Author: violetagg
Date: Wed Sep 3 06:05:58 2014
New Revision: 1622166
URL: http://svn.apache.org/r1622166
Log:
Merged revision 1621731 from tomcat/trunk:
Correct the return value for StandardContext.getResourceOnlyServlets()
so that multiple names are separated by commas. Identified by Coverity
Scan and fixed based on a patch by Felix Schumacher.
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1621731
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1622166&r1=1622165&r2=1622166&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java Wed Sep 3 06:05:58 2014
@@ -984,7 +984,9 @@ public class StandardContext extends Con
StringBuilder result = new StringBuilder();
boolean first = true;
for (String servletName : resourceOnlyServlets) {
- if (!first) {
+ if (first) {
+ first = false;
+ } else {
result.append(',');
}
result.append(servletName);
Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java?rev=1622166&r1=1622165&r2=1622166&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java Wed Sep 3 06:05:58 2014
@@ -68,6 +68,7 @@ import org.apache.catalina.startup.Tomca
import org.apache.catalina.startup.TomcatBaseTest;
import org.apache.tomcat.util.buf.ByteChunk;
+
public class TestStandardContext extends TomcatBaseTest {
private static final String REQUEST =
@@ -859,4 +860,13 @@ public class TestStandardContext extends
}
}
+
+ @Test
+ public void testBug56903() {
+ Context context = new StandardContext();
+
+ String list = "a,b,c";
+ context.setResourceOnlyServlets(list);
+ Assert.assertEquals(list, context.getResourceOnlyServlets());
+ }
}
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1622166&r1=1622165&r2=1622166&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Sep 3 06:05:58 2014
@@ -103,6 +103,12 @@
when Context have been reloaded. (kkolinko)
</scode>
<fix>
+ <bug>56903</bug>: Correct the return value for
+ <code>StandardContext.getResourceOnlyServlets()</code> so that multiple
+ names are separated by commas. Identified by Coverity Scan and fixed
+ based on a patch by Felix Schumacher. (markt)
+ </fix>
+ <fix>
Fixed the multipart elements merge operation performed during web
application deployment. Identified by Coverity Scan. (violetagg)
</fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1622166 - in /tomcat/tc7.0.x/trunk: ./
java/org/apache/catalina/core/StandardContext.java test/org/apache/catalina/core/TestStandardContext.java
webapps/docs/changelog.xml
Posted by Violeta Georgieva <mi...@gmail.com>.
2014-09-03 9:16 GMT+03:00 Felix Schumacher <
felix.schumacher@internetallee.de>:
>
>
>
> On 3. September 2014 08:05:59 MESZ, violetagg@apache.org wrote:
> >Author: violetagg
> >Date: Wed Sep 3 06:05:58 2014
> >New Revision: 1622166
> >
> >URL: http://svn.apache.org/r1622166
> >Log:
> >Merged revision 1621731 from tomcat/trunk:
> >Correct the return value for StandardContext.getResourceOnlyServlets()
> >so that multiple names are separated by commas. Identified by Coverity
> >Scan and fixed based on a patch by Felix Schumacher.
> >
> >Modified:
> > tomcat/tc7.0.x/trunk/ (props changed)
> >tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
>
>tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
> > tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
> >
> >Propchange: tomcat/tc7.0.x/trunk/
>
>------------------------------------------------------------------------------
> > Merged /tomcat/trunk:r1621731
> >
> >Modified:
> >tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
> >URL:
> >
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1622166&r1=1622165&r2=1622166&view=diff
>
>==============================================================================
> >---
> >tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
> >(original)
> >+++
> >tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
> >Wed Sep 3 06:05:58 2014
> >@@ -984,7 +984,9 @@ public class StandardContext extends Con
> > StringBuilder result = new StringBuilder();
> > boolean first = true;
> > for (String servletName : resourceOnlyServlets) {
> >- if (!first) {
> >+ if (first) {
> >+ first = false;
> >+ } else {
> > result.append(',');
> > }
> > result.append(servletName);
> >
> >Modified:
>
>tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
> >URL:
> >
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java?rev=1622166&r1=1622165&r2=1622166&view=diff
>
>==============================================================================
> >---
>
>tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
> >(original)
> >+++
>
>tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
> >Wed Sep 3 06:05:58 2014
> >@@ -68,6 +68,7 @@ import org.apache.catalina.startup.Tomca
> > import org.apache.catalina.startup.TomcatBaseTest;
> > import org.apache.tomcat.util.buf.ByteChunk;
> >
> >+
> > public class TestStandardContext extends TomcatBaseTest {
> >
> > private static final String REQUEST =
> >@@ -859,4 +860,13 @@ public class TestStandardContext extends
> > }
> >
> > }
> >+
> >+ @Test
> >+ public void testBug56903() {
> >+ Context context = new StandardContext();
> >+
> >+ String list = "a,b,c";
> >+ context.setResourceOnlyServlets(list);
> >+ Assert.assertEquals(list, context.getResourceOnlyServlets());
> >+ }
> This will probably not work. At least in trunk the string is generated of
a set and thus will not always be sorted. So you either have to sort it or
just check wether a, b and c are in the result.
I merged the additional commit made by Mark.
Regards,
Violeta
> Regards
> Felix
> > }
> >
> >Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
> >URL:
> >
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1622166&r1=1622165&r2=1622166&view=diff
>
>==============================================================================
> >--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
> >+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Sep 3 06:05:58
> >2014
> >@@ -103,6 +103,12 @@
> > when Context have been reloaded. (kkolinko)
> > </scode>
> > <fix>
> >+ <bug>56903</bug>: Correct the return value for
> >+ <code>StandardContext.getResourceOnlyServlets()</code> so that
> >multiple
> >+ names are separated by commas. Identified by Coverity Scan and
> >fixed
> >+ based on a patch by Felix Schumacher. (markt)
> >+ </fix>
> >+ <fix>
> > Fixed the multipart elements merge operation performed during web
> > application deployment. Identified by Coverity Scan. (violetagg)
> > </fix>
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> >For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
Re: svn commit: r1622166 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/StandardContext.java test/org/apache/catalina/core/TestStandardContext.java webapps/docs/changelog.xml
Posted by Felix Schumacher <fe...@internetallee.de>.
On 3. September 2014 08:05:59 MESZ, violetagg@apache.org wrote:
>Author: violetagg
>Date: Wed Sep 3 06:05:58 2014
>New Revision: 1622166
>
>URL: http://svn.apache.org/r1622166
>Log:
>Merged revision 1621731 from tomcat/trunk:
>Correct the return value for StandardContext.getResourceOnlyServlets()
>so that multiple names are separated by commas. Identified by Coverity
>Scan and fixed based on a patch by Felix Schumacher.
>
>Modified:
> tomcat/tc7.0.x/trunk/ (props changed)
>tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
>tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>
>Propchange: tomcat/tc7.0.x/trunk/
>------------------------------------------------------------------------------
> Merged /tomcat/trunk:r1621731
>
>Modified:
>tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
>URL:
>http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1622166&r1=1622165&r2=1622166&view=diff
>==============================================================================
>---
>tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
>(original)
>+++
>tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
>Wed Sep 3 06:05:58 2014
>@@ -984,7 +984,9 @@ public class StandardContext extends Con
> StringBuilder result = new StringBuilder();
> boolean first = true;
> for (String servletName : resourceOnlyServlets) {
>- if (!first) {
>+ if (first) {
>+ first = false;
>+ } else {
> result.append(',');
> }
> result.append(servletName);
>
>Modified:
>tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
>URL:
>http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java?rev=1622166&r1=1622165&r2=1622166&view=diff
>==============================================================================
>---
>tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
>(original)
>+++
>tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
>Wed Sep 3 06:05:58 2014
>@@ -68,6 +68,7 @@ import org.apache.catalina.startup.Tomca
> import org.apache.catalina.startup.TomcatBaseTest;
> import org.apache.tomcat.util.buf.ByteChunk;
>
>+
> public class TestStandardContext extends TomcatBaseTest {
>
> private static final String REQUEST =
>@@ -859,4 +860,13 @@ public class TestStandardContext extends
> }
>
> }
>+
>+ @Test
>+ public void testBug56903() {
>+ Context context = new StandardContext();
>+
>+ String list = "a,b,c";
>+ context.setResourceOnlyServlets(list);
>+ Assert.assertEquals(list, context.getResourceOnlyServlets());
>+ }
This will probably not work. At least in trunk the string is generated of a set and thus will not always be sorted. So you either have to sort it or just check wether a, b and c are in the result.
Regards
Felix
> }
>
>Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>URL:
>http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1622166&r1=1622165&r2=1622166&view=diff
>==============================================================================
>--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
>+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Sep 3 06:05:58
>2014
>@@ -103,6 +103,12 @@
> when Context have been reloaded. (kkolinko)
> </scode>
> <fix>
>+ <bug>56903</bug>: Correct the return value for
>+ <code>StandardContext.getResourceOnlyServlets()</code> so that
>multiple
>+ names are separated by commas. Identified by Coverity Scan and
>fixed
>+ based on a patch by Felix Schumacher. (markt)
>+ </fix>
>+ <fix>
> Fixed the multipart elements merge operation performed during web
> application deployment. Identified by Coverity Scan. (violetagg)
> </fix>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: dev-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org