[GUMP@vmgump]: Project tomcat-taglibs-standard (in module tomcat-taglibs) failed

2012-09-13 Thread Gump
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-taglibs-standard has an issue affecting its community 
integration.
This issue affects 2 projects,
 and has been outstanding for 71 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-taglibs-standard :  Standard Taglib
- tomcat-taglibs-standard-install :  JSP Taglibs


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Optional dependency httpunit failed with reason build failed
 -DEBUG- (Apache Gump generated) Apache Maven Settings in: 
/srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/srv/gump/public/workspace/tomcat-taglibs/standard/pom.xml
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/gump_work/build_tomcat-taglibs_tomcat-taglibs-standard.html
Work Name: build_tomcat-taglibs_tomcat-taglibs-standard (Type: Build)
Work ended in a state of : Failed
Elapsed: 22 secs
Command Line: /opt/maven2/bin/mvn --batch-mode -DskipTests=true --settings 
/srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml 
install 
[Working Directory: /srv/gump/public/workspace/tomcat-taglibs/standard]
M2_HOME: /opt/maven2
-
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[debug] execute contextualize
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/srv/gump/public/workspace/tomcat-taglibs/standard/spec/src/test/resources
[INFO] Copying 3 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [surefire:test {execution: default-test}]
[INFO] Tests are skipped.
[INFO] [bundle:bundle {execution: default-bundle}]
[INFO] [install:install {execution: default-install}]
[INFO] Installing 
/srv/gump/public/workspace/tomcat-taglibs/standard/spec/target/taglibs-standard-spec-1.2-SNAPSHOT.jar
 to 
/srv/gump/public/workspace/mvnlocalrepo/shared/org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar
[INFO] [bundle:install {execution: default-install}]
[INFO] Parsing 
file:/srv/gump/public/workspace/mvnlocalrepo/shared/repository.xml
[INFO] Installing 
org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar
[INFO] Writing OBR metadata
[INFO] 
[INFO] Building JSTL Implementation
[INFO]task-segment: [install]
[INFO] 
[INFO] [remote-resources:process {execution: default}]
[INFO] snapshot org.apache.taglibs:taglibs-standard-spec:1.2-SNAPSHOT: checking 
for updates from apache.snapshots
[debug] execute contextualize
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 14 resources
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 96 source files to 
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/target/classes
[INFO] -
[ERROR] COMPILATION ERROR : 
[INFO] -
[ERROR] 
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7]
 error: DataSourceWrapper is not abstract and does not override abstract method 
getParentLogger() in CommonDataSource
[INFO] 1 error
[INFO] -
[INFO] 
[ERROR] BUILD FAILURE
[INFO] 
[INFO] Compilation failure
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7]
 error: DataSourceWrapper is not abstract and does not override abstract method 
getParentLogger() in CommonDataSource

[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] ---

Re: svn commit: r1384102 - in /tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources: Constants.java FileResource.java JarResource.java LocalStrings.properties ResourceBase.java

2012-09-13 Thread Mark Thomas
On 12/09/2012 22:51, Konstantin Kolinko wrote:
> 2012/9/12  :
>> +public static final String Package = "org.apache.catalina.webresoucres";
> 
> There is a typo in the above constant value.

Thanks. I'll fix that.

Mark


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



svn commit: r1384245 - /tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Constants.java

2012-09-13 Thread markt
Author: markt
Date: Thu Sep 13 09:04:23 2012
New Revision: 1384245

URL: http://svn.apache.org/viewvc?rev=1384245&view=rev
Log:
Fxi typo

Modified:

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Constants.java

Modified: 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Constants.java?rev=1384245&r1=1384244&r2=1384245&view=diff
==
--- 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Constants.java
 (original)
+++ 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/Constants.java
 Thu Sep 13 09:04:23 2012
@@ -18,5 +18,5 @@ package org.apache.catalina.webresources
 
 public final class Constants {
 
-public static final String Package = "org.apache.catalina.webresoucres";
+public static final String Package = "org.apache.catalina.webresources";
 }



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



[Bug 53864] New: Tomcat creates context.xml as a folder not a file on deployment of new war file

2012-09-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53864

  Priority: P2
Bug ID: 53864
  Assignee: dev@tomcat.apache.org
   Summary: Tomcat creates context.xml as a folder not a file on
deployment of new war file
  Severity: normal
Classification: Unclassified
OS: Linux
  Reporter: ij...@fastmail.fm
  Hardware: Other
Status: NEW
   Version: 5.0.27
 Component: Catalina
   Product: Tomcat 5

I have a war file, lets call it widget.war created with Maven that contains a
context.xml file in META-INF, on copying it into webapps folder tomcat
auto-unpacks it but then instead of copying the context.xml into
Catalina/localhost and renaming it widget.xml it created a directory called
widget.xml

Then in log I get the error:

java.io.IOException: java.io.FileNotFoundException:
/home/jthink/jakarta-tomcat-5.0.27/conf/Catalina/localhost/widget.xml (Is a
directory)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:494)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:482)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1068)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:327)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.core.StandardHost.backgroundProcess(StandardHost.java:800)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1619)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1628)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1608)
at java.lang.Thread.run(Thread.java:619)


If I then manually delete the widget.xml folder, shutdown, manually copy
context.xml into localhost and rename to widget.xml and restart , everthing is
working okay.

Why does it try to create widget.xml as a folder.
One thought I had it that the war is created by maven and the META-INF folder
also contains a maven folder could that confuse tomcat in some way.

I realize the version of tomcat Im using is quite old but I couldnt find a
duplicate bug in the database so thought it worth reporting.

-- 
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: r1384249 - in /tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources: DirResourceSet.java JarResourceSet.java

2012-09-13 Thread markt
Author: markt
Date: Thu Sep 13 09:21:57 2012
New Revision: 1384249

URL: http://svn.apache.org/viewvc?rev=1384249&view=rev
Log:
Add some documentation.

Modified:

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java

Modified: 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java?rev=1384249&r1=1384248&r2=1384249&view=diff
==
--- 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
 (original)
+++ 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
 Thu Sep 13 09:21:57 2012
@@ -29,6 +29,9 @@ import org.apache.catalina.WebResourceSe
 import org.apache.catalina.util.IOTools;
 import org.apache.catalina.util.ResourceSet;
 
+/**
+ * Represents a {@link WebResourceSet} based on a directory.
+ */
 public class DirResourceSet implements WebResourceSet {
 
 private static final String[] EMPTY_STRING_ARRAY = new String[0];
@@ -37,6 +40,21 @@ public class DirResourceSet implements W
 private final File base;
 private final String webAppMount;
 
+/**
+ * Creates a new {@link WebResourceSet} based on a directory.
+ *
+ * @param root  The {@link WebResourceRoot} this new
+ *  {@link WebResourceSet} will be added to.
+ * @param base  The directory on the file system from which the
+ *  resources will be served.
+ * @param webAppMount   The path within the web application at which this
+ *  {@link WebResourceSet} will be mounted. For
+ *  example, to add a directory of JARs to a web
+ *  application, the directory would be mounted at
+ *  "WEB-INF/lib/"
+ * @param internalPath  The path within this new {@link WebResourceSet}
+ *  where resources will be served from.
+ */
 public DirResourceSet(WebResourceRoot root, File base, String webAppMount,
 String internalPath) {
 this.root = root;

Modified: 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java?rev=1384249&r1=1384248&r2=1384249&view=diff
==
--- 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java
 (original)
+++ 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java
 Thu Sep 13 09:21:57 2012
@@ -30,6 +30,9 @@ import org.apache.catalina.WebResourceRo
 import org.apache.catalina.WebResourceSet;
 import org.apache.catalina.util.ResourceSet;
 
+/**
+ * Represents a {@link WebResourceSet} based on a JAR file.
+ */
 public class JarResourceSet implements WebResourceSet {
 
 private final WebResourceRoot root;
@@ -38,6 +41,19 @@ public class JarResourceSet implements W
 private final String webAppMount;
 private final String internalPath;
 
+/**
+ * Creates a new {@link WebResourceSet} based on a JAR file.
+ *
+ * @param root  The {@link WebResourceRoot} this new
+ *  {@link WebResourceSet} will be added to.
+ * @param base  The JAR file on the file system from which the
+ *  resources will be served.
+ * @param webAppMount   The path within the web application at which this
+ *  {@link WebResourceSet} will be mounted.
+ * @param internalPath  The path within this new {@link WebResourceSet}
+ *  where resources will be served from. E.g. for a
+ *  resource JAR, this would be 
"META-INF/resources"
+ */
 public JarResourceSet(WebResourceRoot root, File base, String webAppMount,
 String internalPath) throws IllegalArgumentException {
 this.root = root;



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



[Bug 53864] Tomcat creates context.xml as a folder not a file on deployment of new war file

2012-09-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53864

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #1 from Mark Thomas  ---
The 5.0.x series is no longer supported. Support for this branch ceased around
eight years ago.

The 5.5.x series will reach end of life in a few weeks. You need to upgrade to
at least the latest 6.0.x and ideally the latest 7.0.x release.

-- 
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 53863] Unable to override default servlet other than in main web.xml

2012-09-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53863

Chris Beams  changed:

   What|Removed |Added

 CC||cbe...@gmail.com

-- 
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: r1384255 - /tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java

2012-09-13 Thread markt
Author: markt
Date: Thu Sep 13 09:40:31 2012
New Revision: 1384255

URL: http://svn.apache.org/viewvc?rev=1384255&view=rev
Log:
Correct behaviour to take account of webAppMount and internalPath.
Untested. Need some unit tests around all of this.

Modified:

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java

Modified: 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java?rev=1384255&r1=1384254&r2=1384255&view=diff
==
--- 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java
 (original)
+++ 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java
 Thu Sep 13 09:40:31 2012
@@ -74,8 +74,8 @@ public class JarResourceSet implements W
 @Override
 public WebResource getResource(String path) {
 if (path.startsWith(webAppMount)) {
-StringBuilder pathInJar = new StringBuilder(internalPath);
-pathInJar.append(path.substring(webAppMount.length()));
+String pathInJar =
+internalPath + path.substring(webAppMount.length());
 JarEntry jarEntry = base.getJarEntry(pathInJar.toString());
 if (jarEntry == null) {
 return new EmptyResource(root, path);
@@ -96,12 +96,17 @@ public class JarResourceSet implements W
 @Override
 public Set listWebAppPaths(String path) {
 ResourceSet result = new ResourceSet<>();
-Enumeration entries = base.entries();
-while (entries.hasMoreElements()) {
-JarEntry entry = entries.nextElement();
-String name = entry.getName();
-if (name.startsWith(path)) {
-result.add(name);
+if (path.startsWith(webAppMount)) {
+String pathInJar =
+internalPath + path.substring(webAppMount.length());
+Enumeration entries = base.entries();
+while (entries.hasMoreElements()) {
+JarEntry entry = entries.nextElement();
+String name = entry.getName();
+if (name.startsWith(pathInJar)) {
+result.add(webAppMount +
+name.substring(internalPath.length()));
+}
 }
 }
 result.setLocked(true);



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



svn commit: r1384313 - in /tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources: JarResourceSet.java StandardRoot.java

2012-09-13 Thread markt
Author: markt
Date: Thu Sep 13 13:09:04 2012
New Revision: 1384313

URL: http://svn.apache.org/viewvc?rev=1384313&view=rev
Log:
Implement some more TODOs (untested)

Modified:

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/StandardRoot.java

Modified: 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java?rev=1384313&r1=1384312&r2=1384313&view=diff
==
--- 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java
 (original)
+++ 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java
 Thu Sep 13 13:09:04 2012
@@ -20,6 +20,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
+import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.Set;
 import java.util.jar.JarEntry;
@@ -89,8 +90,24 @@ public class JarResourceSet implements W
 
 @Override
 public String[] list(String path) {
-// TODO Auto-generated method stub
-return null;
+ArrayList result = new ArrayList<>();
+if (path.startsWith(webAppMount)) {
+String pathInJar =
+internalPath + path.substring(webAppMount.length());
+Enumeration entries = base.entries();
+while (entries.hasMoreElements()) {
+JarEntry entry = entries.nextElement();
+String name = entry.getName();
+if (name.startsWith(pathInJar)) {
+int i = name.lastIndexOf('/');
+if (i > -1) {
+name = name.substring(i);
+}
+result.add(name);
+}
+}
+}
+return result.toArray(new String[result.size()]);
 }
 
 @Override

Modified: 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/StandardRoot.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/StandardRoot.java?rev=1384313&r1=1384312&r2=1384313&view=diff
==
--- 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/StandardRoot.java
 (original)
+++ 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/StandardRoot.java
 Thu Sep 13 13:09:04 2012
@@ -95,17 +95,35 @@ public class StandardRoot extends Lifecy
 @Override
 public boolean mkdir(String path) {
 checkState();
-// TODO Check pre-Resources for overrides
+
+if (preResourceExists(path)) {
+return false;
+}
+
 return main.mkdir(path);
 }
 
 @Override
 public boolean write(String path, InputStream is) {
 checkState();
-// TODO Check pre-Resources for overrides
+
+if (preResourceExists(path)) {
+return false;
+}
+
 return main.write(path, is);
 }
 
+private boolean preResourceExists(String path) {
+for (WebResourceSet webResourceSet : preResources) {
+WebResource webResource = webResourceSet.getResource(path);
+if (webResource.exists()) {
+return true;
+}
+}
+return false;
+}
+
 @Override
 public WebResource getResource(String path) {
 checkState();



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



[Bug 53867] New: Performance tuning solution for PageContextImpl.XmlEscape

2012-09-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53867

  Priority: P2
Bug ID: 53867
  Assignee: dev@tomcat.apache.org
   Summary: Performance tuning solution for
PageContextImpl.XmlEscape
  Severity: enhancement
Classification: Unclassified
  Reporter: xs...@ebay.com
  Hardware: PC
Status: NEW
   Version: trunk
 Component: Jasper
   Product: Tomcat 7

Created attachment 29369
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29369&action=edit
Patch for PageContextImpl.java

XmlEscape is used to do escape special characters for EL result.
 Currently it gets characters from String one by one and check whether the char
is special character or not, than put the char into a StringBuilder.

Most cases the string has no such special characters, However, it always
creates a new StringBuilder than do such iteration.

It's better to check whether there is any special characters first.
 If there is special character, then do create a StringBuilder and put those
characters in front of te special character into the StringBuilder. 
Again, check the string by character one by one similar as the original logic.



Here is the result of comparison testing between the two methods.

Old escape:1610
New escape:1050
Old escape:1566
New escape:873
Old escape:1437
New escape:905
Old escape:1590
New escape:890
Old escape:1452
New escape:889
Old escape:1547
New escape:889
Old escape:1467
New escape:889
Old escape:1575
New escape:930
Old escape:1479
New escape:874
Old escape:1517
New escape:970

-- 
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 53867] Performance tuning solution for PageContextImpl.XmlEscape

2012-09-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53867

--- Comment #1 from Sheldon Shao  ---
Created attachment 29370
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29370&action=edit
Comparison test 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



[Bug 53869] New: Performance tuning solution to resolve too many cascaded JspContextWrapper issue

2012-09-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53869

  Priority: P2
Bug ID: 53869
  Assignee: dev@tomcat.apache.org
   Summary: Performance tuning solution to resolve too many
cascaded JspContextWrapper issue
  Severity: enhancement
Classification: Unclassified
  Reporter: xs...@ebay.com
  Hardware: PC
Status: NEW
   Version: trunk
 Component: Jasper
   Product: Tomcat 7

Created attachment 29372
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29372&action=edit
Patch for JspContextWrapper.java

JspContextWrapper.getServletContext, JspContextWrapper.findAttribute and
JspContextWrapper.getELContext take much time because there are many cascaded
tag files. 

For example:
 
 
 
 
 
 
 

When calling JspContextWrapper(tag4).getServletContext from tag4, it will call
JspContextWrapper(tag3).getServletContext -->
JspContextWrapper(tag2).getServletContext -->
JspContextWrapper(tag1).getServletContext --> PageContext.getServletContext.

If the root PageContext can be held in JspConextWrapper, those
page,session,application scopes calling can go directy to this root
PageContext.

Please check out the attached diff file (JspContextWrapper.diff) to get more
detail about this change.

-- 
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 53869] Performance tuning solution to resolve too many cascaded JspContextWrapper issue

2012-09-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53869

--- Comment #1 from Sheldon Shao  ---
Created attachment 29373
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29373&action=edit
Time taken percentage from one sample page

-- 
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 53869] Performance tuning solution to resolve too many cascaded JspContextWrapper issue

2012-09-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53869

Sheldon Shao  changed:

   What|Removed |Added

  Attachment #29372|0   |1
   is patch||

-- 
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 53867] Performance tuning solution for PageContextImpl.XmlEscape

2012-09-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53867

Sheldon Shao  changed:

   What|Removed |Added

  Attachment #29369|0   |1
   is patch||

-- 
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 53867] Performance tuning solution for PageContextImpl.XmlEscape

2012-09-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53867

Sheldon Shao  changed:

   What|Removed |Added

  Attachment #29369|0   |1
is obsolete||

--- Comment #2 from Sheldon Shao  ---
Created attachment 29376
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29376&action=edit
Patch for PageContextImpl.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



Re: [VOTE] Apache Tomcat Maven Plugin 2.0

2012-09-13 Thread Olivier Lamy
Hi,
A binding +1 is still missing.
Any PMC to review and make some users happy ? :-)

2012/9/12 Franken, Arne :
> +1
>
> Tested this morning, works for my use cases.
>
>
> Am 9/12/12 7:07 AM schrieb "Olivier Lamy" unter :
>
>> +1
>>
>> 2012/9/10 Olivier Lamy :
>>> Hi,
>>> I'd like to release Apache Tomcat Maven Plugin 2.0.
>>> We fixed 41 issues (see details http://s.apache.org/TOMCAT-MVN-2.0 ).
>>> Staging Maven repository:
>>> https://repository.apache.org/content/repositories/orgapachetomcat-045/
>>> Sources release (as we distribute artifacts tru sync with Maven
>>> central) sources are distributed separately:
>>> https://dist.apache.org/repos/dist/dev/tomcat/maven-plugin/v2.0/
>>> Site documentation: http://tomcat.apache.org/maven-plugin-2.0 (wait sync)
>>>
>>> Vote open for 72H
>>> [+1]
>>> [0]
>>> [-1]
>>>
>>> Thanks,
>>> --
>>> Olivier Lamy
>>> Talend: http://coders.talend.com
>>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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



svn commit: r1384449 - in /tomcat/sandbox/trunk-resources: java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/webresources/ test/org/apache/catalina/webresources/ test/w

2012-09-13 Thread markt
Author: markt
Date: Thu Sep 13 18:11:27 2012
New Revision: 1384449

URL: http://svn.apache.org/viewvc?rev=1384449&view=rev
Log:
Add some initial unit tests for the directory based WebResourceSet 
implementation.

Added:

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/AbstractResource.java
  - copied, changed from r1384119, 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/ResourceBase.java

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/AbstractResourceSet.java
   (with props)
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/

tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java
   (with props)

tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TesterWebResourceRoot.java
   (with props)
tomcat/sandbox/trunk-resources/test/webresources/
tomcat/sandbox/trunk-resources/test/webresources/d1/
tomcat/sandbox/trunk-resources/test/webresources/d1/d1-f1.txt   (with props)
tomcat/sandbox/trunk-resources/test/webresources/d2/
tomcat/sandbox/trunk-resources/test/webresources/d2/d2-f1.txt   (with props)
tomcat/sandbox/trunk-resources/test/webresources/f1.txt   (with props)
tomcat/sandbox/trunk-resources/test/webresources/f2.txt   (with props)
Removed:

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/ResourceBase.java
Modified:
tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResource.java
tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceRoot.java
tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceSet.java

tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/ApplicationContext.java

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResource.java

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/JarResourceSet.java

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/LocalStrings.properties

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/StandardRoot.java

Modified: 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResource.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResource.java?rev=1384449&r1=1384448&r2=1384449&view=diff
==
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResource.java 
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResource.java 
Thu Sep 13 18:11:27 2012
@@ -76,7 +76,8 @@ public interface WebResource {
 boolean canRead();
 
 /**
- * The path of this resource relative to the web application root.
+ * The path of this resource relative to the web application root. If the
+ * resource is a directory, the return value will end in '/'.
  */
 String getWebappPath();
 

Modified: 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceRoot.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceRoot.java?rev=1384449&r1=1384448&r2=1384449&view=diff
==
--- 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceRoot.java 
(original)
+++ 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceRoot.java 
Thu Sep 13 18:11:27 2012
@@ -126,13 +126,14 @@ public interface WebResourceRoot extends
 
 /**
  * Obtain the Set of the web applications pathnames of all of the files and
- * directories located in the specified directory.
+ * directories located in the specified directory. Paths representing
+ * directories will end with a "/" character.
  *
  * @param path  The path for the resource of interest relative to the root
  *  of the web application. It must start with '/'.
  *
  * @return  The Set of resources. If path does not refer to a directory
- *  then an empty set will be returned.
+ *  then null will be returned.
  */
 Set listWebAppPaths(String path);
 

Modified: 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceSet.java?rev=1384449&r1=1384448&r2=1384449&view=diff
==
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceSet.java 
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/WebResourceSet.java 
Thu Sep 13 18:11:27 2012
@@ -49,7 +49,8 @@ public interfac

svn commit: r1384450 - /tomcat/sandbox/trunk-resources/build.xml

2012-09-13 Thread markt
Author: markt
Date: Thu Sep 13 18:14:48 2012
New Revision: 1384450

URL: http://svn.apache.org/viewvc?rev=1384450&view=rev
Log:
Exclude empty files and directories used in unit tests from CheckStyle

Modified:
tomcat/sandbox/trunk-resources/build.xml

Modified: tomcat/sandbox/trunk-resources/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/build.xml?rev=1384450&r1=1384449&r2=1384450&view=diff
==
--- tomcat/sandbox/trunk-resources/build.xml (original)
+++ tomcat/sandbox/trunk-resources/build.xml Thu Sep 13 18:14:48 2012
@@ -484,6 +484,7 @@
 
 
 
+
   
   
 



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



svn commit: r1384525 - in /tomcat/sandbox/trunk-resources: java/org/apache/catalina/webresources/DirResourceSet.java java/org/apache/catalina/webresources/LocalStrings.properties test/org/apache/catal

2012-09-13 Thread markt
Author: markt
Date: Thu Sep 13 21:02:40 2012
New Revision: 1384525

URL: http://svn.apache.org/viewvc?rev=1384525&view=rev
Log:
Complete unit tests for DirResourceSet mounted at the root of the web 
application

Modified:

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/LocalStrings.properties

tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java

Modified: 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java?rev=1384525&r1=1384524&r2=1384525&view=diff
==
--- 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
 (original)
+++ 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
 Thu Sep 13 21:02:40 2012
@@ -144,10 +144,20 @@ public class DirResourceSet extends Abst
 
 @Override
 public boolean write(String path, InputStream is) {
+checkPath(path);
+
+if (is == null) {
+throw new NullPointerException(
+sm.getString("dirResourceSet.writeNpe"));
+}
+
 File dest = new File(base, path);
+if (dest.exists()) {
+throw new IllegalArgumentException(
+sm.getString("dirResourceSet.writeExists"));
+}
 
-try {
-FileOutputStream fos = new FileOutputStream(dest);
+try (FileOutputStream fos = new FileOutputStream(dest)) {
 IOTools.flow(is, fos);
 } catch (IOException ioe) {
 return false;

Modified: 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/LocalStrings.properties?rev=1384525&r1=1384524&r2=1384525&view=diff
==
--- 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/LocalStrings.properties
 (original)
+++ 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/LocalStrings.properties
 Thu Sep 13 21:02:40 2012
@@ -13,6 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+dirResourceSet.writeExists=The target of the write already exists
+dirResourceSet.writeNpe=The input stream may not be null
+
 fileResource.getCanonicalPathFail=Unable to determine the canonical path for 
the resource [{0}]
 fileResource.getCreationFail=Unable to determine the creation time for the 
resource [{0}]
 fileResource.getUrlFail=Unable to determine a URL for the resource [{0}]

Modified: 
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java?rev=1384525&r1=1384524&r2=1384525&view=diff
==
--- 
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java
 (original)
+++ 
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java
 Thu Sep 13 21:02:40 2012
@@ -16,7 +16,9 @@
  */
 package org.apache.catalina.webresources;
 
+import java.io.ByteArrayInputStream;
 import java.io.File;
+import java.io.InputStream;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -213,14 +215,51 @@ public class TestDirResourceSet {
 Assert.assertTrue(dirResourceSet.mkdir("/new-test"));
 
 File file = new File("test/webresources/new-test");
-Assert.assertTrue(file.exists());
+Assert.assertTrue(file.isDirectory());
 Assert.assertTrue(file.delete());
 }
 
-/* TODO Implement this test
+@Test(expected = IllegalArgumentException.class)
+public void testWriteEmpty() {
+dirResourceSet.write("", null);
+}
+
+@Test(expected = IllegalArgumentException.class)
+public void testWriteRoot() {
+InputStream is = new ByteArrayInputStream("test".getBytes());
+dirResourceSet.write("/", is);
+}
+
+@Test(expected = IllegalArgumentException.class)
+public void testWriteDirA() {
+InputStream is = new ByteArrayInputStream("test".getBytes());
+dirResourceSet.write("/d1", is);
+}
+
+@Test(expected = IllegalArgumentException.class)
+public void testWriteDirB() {
+InputStream is = new ByteArrayInputStream("test".getBytes());
+dirResourceSet.write("/d1/", is);
+}
+
+@Test(expected = IllegalArgumentException.class)
+public void testWriteFile() {
+InputStream is = new

svn commit: r1384530 - in /tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources: TestDirResourceSet.java TestDirResourceSetInternal.java

2012-09-13 Thread markt
Author: markt
Date: Thu Sep 13 21:10:34 2012
New Revision: 1384530

URL: http://svn.apache.org/viewvc?rev=1384530&view=rev
Log:
Extend unit tests of DirResourceSet to cover the use of an internal path

Added:

tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSetInternal.java
   (with props)
Modified:

tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java

Modified: 
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java?rev=1384530&r1=1384529&r2=1384530&view=diff
==
--- 
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java
 (original)
+++ 
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java
 Thu Sep 13 21:10:34 2012
@@ -30,7 +30,7 @@ import org.apache.catalina.WebResource;
 
 public class TestDirResourceSet {
 
-private DirResourceSet dirResourceSet;
+protected DirResourceSet dirResourceSet;
 
 @Before
 public void setup() {

Added: 
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSetInternal.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSetInternal.java?rev=1384530&view=auto
==
--- 
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSetInternal.java
 (added)
+++ 
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSetInternal.java
 Thu Sep 13 21:10:34 2012
@@ -0,0 +1,30 @@
+/*
+ * 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.File;
+
+public class TestDirResourceSetInternal extends TestDirResourceSet {
+
+@Override
+public void setup() {
+File f = new File("test");
+dirResourceSet = new DirResourceSet(
+new TesterWebResourceRoot(), f, "", "webresources");
+}
+
+}

Propchange: 
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSetInternal.java
--
svn:eol-style = native



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



svn commit: r1384557 - in /tomcat/sandbox/trunk-resources: java/org/apache/catalina/webresources/ test/org/apache/catalina/webresources/

2012-09-13 Thread markt
Author: markt
Date: Thu Sep 13 21:50:33 2012
New Revision: 1384557

URL: http://svn.apache.org/viewvc?rev=1384557&view=rev
Log:
Add unit tests for DirResourceSets mounted below the web app root. Fixed a 
couple of identified failures including an nasty edge case at the root of the 
mounted DirResourceSet

Added:

tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSetMount.java
   (with props)
Modified:

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java

tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java

tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java

Modified: 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java?rev=1384557&r1=1384556&r2=1384557&view=diff
==
--- 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
 (original)
+++ 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
 Thu Sep 13 21:50:33 2012
@@ -151,7 +151,13 @@ public class DirResourceSet extends Abst
 sm.getString("dirResourceSet.writeNpe"));
 }
 
-File dest = new File(base, path);
+File dest = null;
+if (path.startsWith(webAppMount)) {
+dest = new File(base, path.substring(webAppMount.length()));
+} else {
+return false;
+}
+
 if (dest.exists()) {
 throw new IllegalArgumentException(
 sm.getString("dirResourceSet.writeExists"));

Modified: 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java?rev=1384557&r1=1384556&r2=1384557&view=diff
==
--- 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java
 (original)
+++ 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java
 Thu Sep 13 21:50:33 2012
@@ -35,11 +35,29 @@ public class FileResource extends Abstra
 private static final Log log = LogFactory.getLog(FileResource.class);
 
 private final File resource;
+private final String name;
 
 public FileResource(WebResourceRoot root, File resource,
 String webAppPath) {
 super(root,webAppPath);
 this.resource = resource;
+
+if (webAppPath.charAt(webAppPath.length() - 1) == '/') {
+String realName = resource.getName() + '/';
+if (webAppPath.endsWith(realName)) {
+name = resource.getName();
+} else {
+// This is the root directory of a mounted ResourceSet
+// Need to return the mounted name, not the real name
+int endOfName = webAppPath.length() - 1;
+name = webAppPath.substring(
+webAppPath.lastIndexOf("/", endOfName - 1) + 1,
+endOfName);
+}
+} else {
+// Must be a file
+name = resource.getName();
+}
 }
 
 @Override
@@ -69,7 +87,7 @@ public class FileResource extends Abstra
 
 @Override
 public String getName() {
-return resource.getName();
+return name;
 }
 
 @Override

Modified: 
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java?rev=1384557&r1=1384556&r2=1384557&view=diff
==
--- 
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java
 (original)
+++ 
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSet.java
 Thu Sep 13 21:50:33 2012
@@ -221,7 +221,8 @@ public class TestDirResourceSet {
 
 @Test(expected = IllegalArgumentException.class)
 public void testWriteEmpty() {
-dirResourceSet.write("", null);
+InputStream is = new ByteArrayInputStream("test".getBytes());
+dirResourceSet.write("", is);
 }
 
 @Test(expected = IllegalArgumentException.class)

Added: 
tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSetMount.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestDirResourceSetMount.java?rev=1384557&view=auto
==
--- 
tomcat/san

svn commit: r1384566 - /tomcat/sandbox/trunk-resources/java/org/apache/catalina/loader/WebappClassLoader.java

2012-09-13 Thread markt
Author: markt
Date: Thu Sep 13 22:13:15 2012
New Revision: 1384566

URL: http://svn.apache.org/viewvc?rev=1384566&view=rev
Log:
Fix some unit test failures with latest resources implementation

Modified:

tomcat/sandbox/trunk-resources/java/org/apache/catalina/loader/WebappClassLoader.java

Modified: 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1384566&r1=1384565&r2=1384566&view=diff
==
--- 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/loader/WebappClassLoader.java
 (original)
+++ 
tomcat/sandbox/trunk-resources/java/org/apache/catalina/loader/WebappClassLoader.java
 Thu Sep 13 22:13:15 2012
@@ -1085,11 +1085,13 @@ public class WebappClassLoader
 
 int jarFilesLength = jarFiles.length;
 
-// Looking at the repository
-WebResource[] webResources = resources.getResources(repository + name);
-for (WebResource webResource : webResources) {
-if (webResource.exists()) {
-result.add(webResource.getURL());
+if (repository != null) {
+// Looking at the repository
+WebResource[] webResources = resources.getResources(repository + 
name);
+for (WebResource webResource : webResources) {
+if (webResource.exists()) {
+result.add(webResource.getURL());
+}
 }
 }
 



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