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

2012-08-29 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 41 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: 26 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] ---

[Bug 51496] NSIS - Warn that duplicate service name will result in install failure

2012-08-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51496

--- Comment #7 from Ralph Plawetzki  ---
http://msdn.microsoft.com/en-us/library/ms682544(v=vs.85)
The SCM maintains a database of installed services in the registry. The
database is used by the SCM and programs that add, modify, or configure
services. The following is the registry key for this database:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.

This key contains a subkey for each installed service and driver service.

-- 
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: r1378622 - /tomcat/maven-plugin/trunk/src/site/site.xml

2012-08-29 Thread olamy
Author: olamy
Date: Wed Aug 29 15:54:26 2012
New Revision: 1378622

URL: http://svn.apache.org/viewvc?rev=1378622&view=rev
Log:
fix topbar width

Modified:
tomcat/maven-plugin/trunk/src/site/site.xml

Modified: tomcat/maven-plugin/trunk/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/src/site/site.xml?rev=1378622&r1=1378621&r2=1378622&view=diff
==
--- tomcat/maven-plugin/trunk/src/site/site.xml (original)
+++ tomcat/maven-plugin/trunk/src/site/site.xml Wed Aug 29 15:54:26 2012
@@ -37,6 +37,7 @@
 
   true
   false
+  width: auto;
   
 ${project.url}
   



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



svn commit: r1378699 - in /tomcat/trunk: java/org/apache/coyote/http11/filters/ChunkedInputFilter.java test/org/apache/catalina/startup/SimpleHttpClient.java test/org/apache/coyote/http11/filters/Test

2012-08-29 Thread markt
Author: markt
Date: Wed Aug 29 20:21:01 2012
New Revision: 1378699

URL: http://svn.apache.org/viewvc?rev=1378699&view=rev
Log:
Resolve a FIXME and expand unit tests to cover CRLF vs LF checking.

Modified:
tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java

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

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java?rev=1378699&r1=1378698&r2=1378699&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 
Wed Aug 29 20:21:01 2012
@@ -144,7 +144,7 @@ public class ChunkedInputFilter implemen
 
 if(needCRLFParse) {
 needCRLFParse = false;
-parseCRLF();
+parseCRLF(false);
 }
 
 if (remaining <= 0) {
@@ -179,7 +179,7 @@ public class ChunkedInputFilter implemen
 //so we defer it to the next call BZ 7
 needCRLFParse = true;
 } else {
-parseCRLF(); //parse the CRLF immediately
+parseCRLF(false); //parse the CRLF immediately
 }
 }
 
@@ -305,9 +305,8 @@ public class ChunkedInputFilter implemen
 return false;
 }
 
-if (buf[pos] == Constants.CR) {
-// FIXME: Improve parsing to check for CRLF
-} else if (buf[pos] == Constants.LF) {
+if (buf[pos] == Constants.CR || buf[pos] == Constants.LF) {
+parseCRLF(false);
 eol = true;
 } else if (buf[pos] == Constants.SEMI_COLON) {
 trailer = true;
@@ -325,7 +324,10 @@ public class ChunkedInputFilter implemen
 }
 }
 
-pos++;
+// Parsing the CRLF increments pos
+if (!eol) {
+pos++;
+}
 
 }
 
@@ -346,9 +348,21 @@ public class ChunkedInputFilter implemen
 
 /**
  * Parse CRLF at end of chunk.
+ * @deprecated  Use {@link #parseCRLF(boolean)}
  */
-protected boolean parseCRLF()
-throws IOException {
+@Deprecated
+protected boolean parseCRLF() throws IOException {
+return parseCRLF(false);
+}
+
+/**
+ * Parse CRLF at end of chunk.
+ *
+ * @param   tolerantShould tolerant parsing (LF and CRLF) be used? This
+ *  is recommended (RFC2616, section 19.3) for message
+ *  headers.
+ */
+protected boolean parseCRLF(boolean tolerant) throws IOException {
 
 boolean eol = false;
 boolean crfound = false;
@@ -364,7 +378,9 @@ public class ChunkedInputFilter implemen
 if (crfound) throw new IOException("Invalid CRLF, two CR 
characters encountered.");
 crfound = true;
 } else if (buf[pos] == Constants.LF) {
-if (!crfound) throw new IOException("Invalid CRLF, no CR 
character encountered.");
+if (!tolerant && !crfound) {
+throw new IOException("Invalid CRLF, no CR character 
encountered.");
+}
 eol = true;
 } else {
 throw new IOException("Invalid CRLF");
@@ -396,26 +412,19 @@ public class ChunkedInputFilter implemen
 MimeHeaders headers = request.getMimeHeaders();
 
 byte chr = 0;
-while (true) {
-// Read new bytes if needed
-if (pos >= lastValid) {
-if (readBytes() <0)
-throw new EOFException("Unexpected end of stream whilst 
reading trailer headers for chunked request");
-}
 
-chr = buf[pos];
-
-if ((chr == Constants.CR) || (chr == Constants.LF)) {
-if (chr == Constants.LF) {
-pos++;
-return false;
-}
-} else {
-break;
-}
+// Read new bytes if needed
+if (pos >= lastValid) {
+if (readBytes() <0)
+throw new EOFException("Unexpected end of stream whilst 
reading trailer headers for chunked request");
+}
 
-pos++;
+chr = buf[pos];
 
+// CRLF terminates the request
+if (chr == Constants.CR || chr == Constants.LF) {
+parseCRLF(true);
+return false;
 }
 
 // Mark the current buffer position
@@ -495,9 +504,8 @@ public class ChunkedInputFilter implemen
 }
 
 chr = buf[pos];
-if (chr == Constants.CR) {
- 

svn commit: r1378702 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/http11/filters/ test/org/apache/catalina/startup/ test/org/apache/coyote/http11/filters/ webapps/docs/

2012-08-29 Thread markt
Author: markt
Date: Wed Aug 29 20:26:30 2012
New Revision: 1378702

URL: http://svn.apache.org/viewvc?rev=1378702&view=rev
Log:
Resolve a FIXME and expand unit tests to cover CRLF vs LF checking.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java

tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1378699

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java?rev=1378702&r1=1378701&r2=1378702&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
 Wed Aug 29 20:26:30 2012
@@ -144,7 +144,7 @@ public class ChunkedInputFilter implemen
 
 if(needCRLFParse) {
 needCRLFParse = false;
-parseCRLF();
+parseCRLF(false);
 }
 
 if (remaining <= 0) {
@@ -179,7 +179,7 @@ public class ChunkedInputFilter implemen
 //so we defer it to the next call BZ 7
 needCRLFParse = true;
 } else {
-parseCRLF(); //parse the CRLF immediately
+parseCRLF(false); //parse the CRLF immediately
 }
 }
 
@@ -303,9 +303,8 @@ public class ChunkedInputFilter implemen
 return false;
 }
 
-if (buf[pos] == Constants.CR) {
-// FIXME: Improve parsing to check for CRLF 
-} else if (buf[pos] == Constants.LF) {
+if (buf[pos] == Constants.CR || buf[pos] == Constants.LF) {
+parseCRLF(false);
 eol = true;
 } else if (buf[pos] == Constants.SEMI_COLON) {
 trailer = true;
@@ -323,7 +322,10 @@ public class ChunkedInputFilter implemen
 }
 }
 
-pos++;
+// Parsing the CRLF increments pos
+if (!eol) {
+pos++;
+}
 
 }
 
@@ -344,9 +346,21 @@ public class ChunkedInputFilter implemen
 
 /**
  * Parse CRLF at end of chunk.
+ * @deprecated  Use {@link #parseCRLF(boolean)}
  */
-protected boolean parseCRLF()
-throws IOException {
+@Deprecated
+protected boolean parseCRLF() throws IOException {
+return parseCRLF(false);
+}
+
+/**
+ * Parse CRLF at end of chunk.
+ *
+ * @param   tolerantShould tolerant parsing (LF and CRLF) be used? This
+ *  is recommended (RFC2616, section 19.3) for message
+ *  headers.
+ */
+protected boolean parseCRLF(boolean tolerant) throws IOException {
 
 boolean eol = false;
 boolean crfound = false;
@@ -362,7 +376,9 @@ public class ChunkedInputFilter implemen
 if (crfound) throw new IOException("Invalid CRLF, two CR 
characters encountered.");
 crfound = true;
 } else if (buf[pos] == Constants.LF) {
-if (!crfound) throw new IOException("Invalid CRLF, no CR 
character encountered.");
+if (!tolerant && !crfound) {
+throw new IOException("Invalid CRLF, no CR character 
encountered.");
+}
 eol = true;
 } else {
 throw new IOException("Invalid CRLF");
@@ -394,26 +410,19 @@ public class ChunkedInputFilter implemen
 MimeHeaders headers = request.getMimeHeaders();
 
 byte chr = 0;
-while (true) {
-// Read new bytes if needed
-if (pos >= lastValid) {
-if (readBytes() <0)
-throw new EOFException("Unexpected end of stream whilst 
reading trailer headers for chunked request");
-}
 
-chr = buf[pos];
-
-if ((chr == Constants.CR) || (chr == Constants.LF)) {
-if (chr == Constants.LF) {
-pos++;
-return false;
-}
-} else {
-break;
-}
+// Read new bytes if needed
+if (pos >= lastValid) {
+if (readBytes() <0)
+throw new EOFException("Unexpected end of stream whilst 
reading trailer headers for chunked request");
+}
 
-pos++;
+chr = buf[pos];
 
+// CRLF terminates the request
+if (chr == C

svn commit: r1378715 - /tomcat/trunk/test/org/apache/el/TestMethodExpressionImpl.java

2012-08-29 Thread markt
Author: markt
Date: Wed Aug 29 20:49:02 2012
New Revision: 1378715

URL: http://svn.apache.org/viewvc?rev=1378715&view=rev
Log:
Add some tests for Bug 53792

Modified:
tomcat/trunk/test/org/apache/el/TestMethodExpressionImpl.java

Modified: tomcat/trunk/test/org/apache/el/TestMethodExpressionImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/TestMethodExpressionImpl.java?rev=1378715&r1=1378714&r2=1378715&view=diff
==
--- tomcat/trunk/test/org/apache/el/TestMethodExpressionImpl.java (original)
+++ tomcat/trunk/test/org/apache/el/TestMethodExpressionImpl.java Wed Aug 29 
20:49:02 2012
@@ -34,6 +34,8 @@ import org.apache.jasper.el.ELContextImp
 
 public class TestMethodExpressionImpl {
 
+private static final String BUG53792 = "TEST_PASS";
+
 private ExpressionFactory factory;
 private ELContext context;
 
@@ -430,4 +432,38 @@ public class TestMethodExpressionImpl {
 assertEquals(TesterEnum.APPLE, actual);
 
 }
+
+@Test
+public void testBug53792a() {
+MethodExpression me = factory.createMethodExpression(context,
+"${beanA.setBean(beanB)}", null ,
+new Class[] { TesterBeanB.class });
+me.invoke(context, null);
+me = factory.createMethodExpression(context,
+"${beanB.setName('" + BUG53792 + "')}", null ,
+new Class[] { TesterBeanB.class });
+me.invoke(context, null);
+
+ValueExpression ve = factory.createValueExpression(context,
+"#{beanA.getBean().name}", java.lang.String.class);
+String actual = (String) ve.getValue(context);
+assertEquals(BUG53792, actual);
+}
+
+@Test
+public void testBug53792b() {
+MethodExpression me = factory.createMethodExpression(context,
+"${beanA.setBean(beanB)}", null ,
+new Class[] { TesterBeanB.class });
+me.invoke(context, null);
+me = factory.createMethodExpression(context,
+"${beanB.setName('" + BUG53792 + "')}", null ,
+new Class[] { TesterBeanB.class });
+me.invoke(context, null);
+
+ValueExpression ve = factory.createValueExpression(context,
+"#{beanA.getBean().name.length()}", java.lang.Integer.class);
+Integer actual = (Integer) ve.getValue(context);
+assertEquals(Integer.valueOf(BUG53792.length()), actual);
+}
 }



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



[Bug 53792] EL: AstValue.getTarget() mistakes a method invocation for a property access

2012-08-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53792

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #2 from Mark Thomas  ---
This works for me and I have added some test cases to prove it. Also, if you
want to call the init *method* then the EL should be:
#{beanFactory.loginBean().init()}

If after reviewing your code, you believe there is still an issue (always a
possibility with EL) then the best way to proceed would be to sumbit a patch to
the Tomcat unit tests demonstrating the issue.

-- 
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: r1378716 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/el/TestMethodExpressionImpl.java

2012-08-29 Thread markt
Author: markt
Date: Wed Aug 29 20:50:34 2012
New Revision: 1378716

URL: http://svn.apache.org/viewvc?rev=1378716&view=rev
Log:
Add some tests for Bug 53792

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/test/org/apache/el/TestMethodExpressionImpl.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1378715

Modified: tomcat/tc7.0.x/trunk/test/org/apache/el/TestMethodExpressionImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/el/TestMethodExpressionImpl.java?rev=1378716&r1=1378715&r2=1378716&view=diff
==
--- tomcat/tc7.0.x/trunk/test/org/apache/el/TestMethodExpressionImpl.java 
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/el/TestMethodExpressionImpl.java Wed 
Aug 29 20:50:34 2012
@@ -34,6 +34,8 @@ import org.apache.jasper.el.ELContextImp
 
 public class TestMethodExpressionImpl {
 
+private static final String BUG53792 = "TEST_PASS";
+
 private ExpressionFactory factory;
 private ELContext context;
 
@@ -430,4 +432,38 @@ public class TestMethodExpressionImpl {
 assertEquals(TesterEnum.APPLE, actual);
 
 }
+
+@Test
+public void testBug53792a() {
+MethodExpression me = factory.createMethodExpression(context,
+"${beanA.setBean(beanB)}", null ,
+new Class[] { TesterBeanB.class });
+me.invoke(context, null);
+me = factory.createMethodExpression(context,
+"${beanB.setName('" + BUG53792 + "')}", null ,
+new Class[] { TesterBeanB.class });
+me.invoke(context, null);
+
+ValueExpression ve = factory.createValueExpression(context,
+"#{beanA.getBean().name}", java.lang.String.class);
+String actual = (String) ve.getValue(context);
+assertEquals(BUG53792, actual);
+}
+
+@Test
+public void testBug53792b() {
+MethodExpression me = factory.createMethodExpression(context,
+"${beanA.setBean(beanB)}", null ,
+new Class[] { TesterBeanB.class });
+me.invoke(context, null);
+me = factory.createMethodExpression(context,
+"${beanB.setName('" + BUG53792 + "')}", null ,
+new Class[] { TesterBeanB.class });
+me.invoke(context, null);
+
+ValueExpression ve = factory.createValueExpression(context,
+"#{beanA.getBean().name.length()}", java.lang.Integer.class);
+Integer actual = (Integer) ve.getValue(context);
+assertEquals(Integer.valueOf(BUG53792.length()), actual);
+}
 }



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



[Bug 53712] localvariabletable length error reintroduced?

2012-08-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53712

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from Mark Thomas  ---
The first hit in a Google search for that error message turned up this:
http://forum.springsource.org/showthread.php?54619-LocalVariableTable-has-wrong-length-in-class-file

The short version is that a method is more than 64KB.

-- 
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: r1378730 - /tomcat/trunk/test/org/apache/catalina/core/TestStandardWrapper.java

2012-08-29 Thread markt
Author: markt
Date: Wed Aug 29 21:10:07 2012
New Revision: 1378730

URL: http://svn.apache.org/viewvc?rev=1378730&view=rev
Log:
Refactor to silence some FindBugs warnings

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

Modified: tomcat/trunk/test/org/apache/catalina/core/TestStandardWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestStandardWrapper.java?rev=1378730&r1=1378729&r2=1378730&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/core/TestStandardWrapper.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/core/TestStandardWrapper.java Wed Aug 
29 21:10:07 2012
@@ -359,10 +359,14 @@ public class TestStandardWrapper extends
 public static CountDownLatch latch = null;
 public static AtomicInteger counter = new AtomicInteger(0);
 
+public static void initLatch() {
+latch = new CountDownLatch(BUG51445_THREAD_COUNT);
+}
+
 @Test
 public void testBug51445AddServlet() throws Exception {
 
-latch = new CountDownLatch(BUG51445_THREAD_COUNT);
+initLatch();
 
 Tomcat tomcat = getTomcatInstance();
 
@@ -406,7 +410,7 @@ public class TestStandardWrapper extends
 @Test
 public void testBug51445AddChild() throws Exception {
 
-latch = new CountDownLatch(BUG51445_THREAD_COUNT);
+initLatch();
 
 Tomcat tomcat = getTomcatInstance();
 



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



svn commit: r1378733 - /tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java

2012-08-29 Thread markt
Author: markt
Date: Wed Aug 29 21:11:45 2012
New Revision: 1378733

URL: http://svn.apache.org/viewvc?rev=1378733&view=rev
Log:
Re-organise to silence some FindBugs warnings

Modified:

tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java

Modified: 
tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java?rev=1378733&r1=1378732&r2=1378733&view=diff
==
--- 
tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java
 (original)
+++ 
tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java
 Wed Aug 29 21:11:45 2012
@@ -136,9 +136,17 @@ public class TestTcpFailureDetector {
 public void tearDown() throws Exception {
 tcpFailureDetector1 = null;
 tcpFailureDetector2 = null;
-try { channel1.stop(Channel.DEFAULT);}catch (Exception ignore){ /* 
Ignore */ }
+try {
+channel1.stop(Channel.DEFAULT);
+} catch (Exception ignore) {
+// Ignore
+}
 channel1 = null;
-try { channel2.stop(Channel.DEFAULT);}catch (Exception ignore){ /* 
Ignore */ }
+try {
+channel2.stop(Channel.DEFAULT);
+} catch (Exception ignore) {
+// Ignore
+}
 channel2 = null;
 }
 



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



svn commit: r1378734 - in /tomcat/trunk/test/org/apache/catalina/tribes/group: TestGroupChannelOptionFlag.java TestGroupChannelStartStop.java

2012-08-29 Thread markt
Author: markt
Date: Wed Aug 29 21:13:41 2012
New Revision: 1378734

URL: http://svn.apache.org/viewvc?rev=1378734&view=rev
Log:
Re-organise to silence some FindBugs warnings

Modified:

tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java

tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelStartStop.java

Modified: 
tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java?rev=1378734&r1=1378733&r2=1378734&view=diff
==
--- 
tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java
 (original)
+++ 
tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java
 Wed Aug 29 21:13:41 2012
@@ -47,7 +47,13 @@ public class TestGroupChannelOptionFlag 
 
 @After
 public void tearDown() throws Exception {
-if ( channel != null ) try {channel.stop(Channel.DEFAULT);}catch ( 
Exception ignore) { /* Ignore */ }
+if (channel != null) {
+try {
+channel.stop(Channel.DEFAULT);
+} catch (Exception ignore) {
+// Ignore
+}
+}
 channel = null;
 }
 

Modified: 
tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelStartStop.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelStartStop.java?rev=1378734&r1=1378733&r2=1378734&view=diff
==
--- 
tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelStartStop.java
 (original)
+++ 
tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelStartStop.java
 Wed Aug 29 21:13:41 2012
@@ -40,7 +40,11 @@ public class TestGroupChannelStartStop {
 
 @After
 public void tearDown() throws Exception {
-try {channel.stop(Channel.DEFAULT);}catch (Exception ignore){ /* 
Ignore */ }
+try {
+channel.stop(Channel.DEFAULT);
+} catch (Exception ignore) {
+// Ignore
+}
 }
 
 @Test
@@ -76,7 +80,9 @@ public class TestGroupChannelStartStop {
 try {
 channel.start(Channel.MBR_RX_SEQ);
 count++;
-} catch ( Exception x){/*expected*/}
+} catch ( Exception x){
+// expected
+}
 assertEquals(count,1);
 channel.stop(Channel.DEFAULT);
 //double the membership sender
@@ -89,7 +95,9 @@ public class TestGroupChannelStartStop {
 try {
 channel.start(Channel.MBR_TX_SEQ);
 count++;
-} catch ( Exception x){/*expected*/}
+} catch ( Exception x){
+// expected
+}
 assertEquals(count,1);
 channel.stop(Channel.DEFAULT);
 
@@ -101,7 +109,9 @@ public class TestGroupChannelStartStop {
 try {
 channel.start(Channel.SND_RX_SEQ);
 count++;
-} catch ( Exception x){/*expected*/}
+} catch ( Exception x){
+// expected
+}
 assertEquals(count,1);
 channel.stop(Channel.DEFAULT);
 
@@ -113,7 +123,9 @@ public class TestGroupChannelStartStop {
 try {
 channel.start(Channel.SND_TX_SEQ);
 count++;
-} catch ( Exception x){/*expected*/}
+} catch ( Exception x){
+// expected
+}
 assertEquals(count,1);
 channel.stop(Channel.DEFAULT);
 }
@@ -129,7 +141,9 @@ public class TestGroupChannelStartStop {
 try {
 channel.start(flag);
 count++;
-} catch ( Exception x){/*expected*/}
+} catch ( Exception x){
+// expected
+}
 assertEquals(count,2);
 channel.stop(Channel.DEFAULT);
 }
@@ -142,5 +156,4 @@ public class TestGroupChannelStartStop {
 Thread.sleep(1000);
 channel.stop(Channel.DEFAULT);
 }
-
 }



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



svn commit: r1378736 - in /tomcat/trunk/webapps/examples/WEB-INF/classes: async/AsyncStockServlet.java async/Stockticker.java cal/Entries.java cal/Entry.java

2012-08-29 Thread markt
Author: markt
Date: Wed Aug 29 21:17:00 2012
New Revision: 1378736

URL: http://svn.apache.org/viewvc?rev=1378736&view=rev
Log:
Clean up
- Java 7 <>
- UCDetector

Modified:
tomcat/trunk/webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java
tomcat/trunk/webapps/examples/WEB-INF/classes/async/Stockticker.java
tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java
tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java

Modified: 
tomcat/trunk/webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java?rev=1378736&r1=1378735&r2=1378736&view=diff
==
--- tomcat/trunk/webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java 
(original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/async/AsyncStockServlet.java 
Wed Aug 29 21:17:00 2012
@@ -42,10 +42,11 @@ public class AsyncStockServlet extends H
 public static final String LONG_POLL = "LONG-POLL";
 public static final String STREAM = "STREAM";
 
-static ArrayList ticks = new ArrayList();
-static ConcurrentLinkedQueue clients = new 
ConcurrentLinkedQueue();
-static AtomicInteger clientcount = new AtomicInteger(0);
-static Stockticker ticker = new Stockticker();
+static final ArrayList ticks = new ArrayList<>();
+static final ConcurrentLinkedQueue clients =
+new ConcurrentLinkedQueue<>();
+static final AtomicInteger clientcount = new AtomicInteger(0);
+static final Stockticker ticker = new Stockticker();
 
 public AsyncStockServlet() {
 System.out.println("AsyncStockServlet created");

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/async/Stockticker.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/async/Stockticker.java?rev=1378736&r1=1378735&r2=1378736&view=diff
==
--- tomcat/trunk/webapps/examples/WEB-INF/classes/async/Stockticker.java 
(original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/async/Stockticker.java Wed 
Aug 29 21:17:00 2012
@@ -23,8 +23,8 @@ import java.util.concurrent.atomic.Atomi
 
 public class Stockticker implements Runnable {
 public volatile boolean run = true;
-protected AtomicInteger counter = new AtomicInteger(0);
-ArrayList listeners = new ArrayList();
+protected final AtomicInteger counter = new AtomicInteger(0);
+final ArrayList listeners = new ArrayList<>();
 protected volatile Thread ticker = null;
 protected volatile int ticknr = 0;
 
@@ -100,8 +100,8 @@ public class Stockticker implements Runn
 }
 
 public static final class Stock implements Cloneable {
-protected static DecimalFormat df = new DecimalFormat("0.00");
-protected String symbol = "";
+protected static final DecimalFormat df = new DecimalFormat("0.00");
+protected final String symbol;
 protected double value = 0.0d;
 protected double lastchange = 0.0d;
 protected int cnt = 0;

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java?rev=1378736&r1=1378735&r2=1378736&view=diff
==
--- tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java Wed Aug 29 
21:17:00 2012
@@ -22,13 +22,13 @@ import javax.servlet.http.HttpServletReq
 
 public class Entries {
 
-private Hashtable entries;
+private final Hashtable entries;
 private static final String[] time = { "8am", "9am", "10am", "11am",
 "12pm", "1pm", "2pm", "3pm", "4pm", "5pm", "6pm", "7pm", "8pm" };
 public static final int rows = 12;
 
 public Entries() {
-entries = new Hashtable(rows);
+entries = new Hashtable<>(rows);
 for (int i = 0; i < rows; i++) {
 entries.put(time[i], new Entry(time[i]));
 }

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java?rev=1378736&r1=1378735&r2=1378736&view=diff
==
--- tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entry.java Wed Aug 29 
21:17:00 2012
@@ -19,7 +19,7 @@ package cal;
 
 public class Entry {
 
-String hour;
+final String hour;
 String description;
 
 public Entry(String hour) {



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For addition

svn commit: r1378738 - /tomcat/trunk/webapps/examples/jsp/plugin/applet/Clock2.java

2012-08-29 Thread markt
Author: markt
Date: Wed Aug 29 21:18:02 2012
New Revision: 1378738

URL: http://svn.apache.org/viewvc?rev=1378738&view=rev
Log:
Re-organise to silence some FindBugs warnings

Modified:
tomcat/trunk/webapps/examples/jsp/plugin/applet/Clock2.java

Modified: tomcat/trunk/webapps/examples/jsp/plugin/applet/Clock2.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/jsp/plugin/applet/Clock2.java?rev=1378738&r1=1378737&r2=1378738&view=diff
==
--- tomcat/trunk/webapps/examples/jsp/plugin/applet/Clock2.java (original)
+++ tomcat/trunk/webapps/examples/jsp/plugin/applet/Clock2.java Wed Aug 29 
21:18:02 2012
@@ -53,13 +53,19 @@ public class Clock2 extends Applet imple
 
 try {
 setBackground(new 
Color(Integer.parseInt(getParameter("bgcolor"),16)));
-} catch (Exception E) { }
+} catch (Exception e) {
+// Ignored
+}
 try {
 handColor = new 
Color(Integer.parseInt(getParameter("fgcolor1"),16));
-} catch (Exception E) { }
+} catch (Exception e) {
+// Ignored
+}
 try {
 numberColor = new 
Color(Integer.parseInt(getParameter("fgcolor2"),16));
-} catch (Exception E) { }
+} catch (Exception e) {
+// Ignored
+}
 resize(300,300);  // Set clock window size
 }
 



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



svn commit: r1378753 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

2012-08-29 Thread kkolinko
Author: kkolinko
Date: Wed Aug 29 22:00:29 2012
New Revision: 1378753

URL: http://svn.apache.org/viewvc?rev=1378753&view=rev
Log:
Add missing colon and whitespace.

Modified:
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1378753&r1=1378752&r2=1378753&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Aug 29 22:00:29 2012
@@ -298,7 +298,7 @@
 copy of Commons BCEL used for annotation scanning. (markt)
   
   
-53735Add support for Java 7 byte code to Tomcat's
+53735: Add support for Java 7 byte code to Tomcat's
 package renamed, cut-down copy of Commons BCEL used for annotation
 scanning. (markt)
   



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



svn commit: r1378766 - /tomcat/native/branches/1.1.x/xdocs/index.xml

2012-08-29 Thread kkolinko
Author: kkolinko
Date: Wed Aug 29 23:23:39 2012
New Revision: 1378766

URL: http://svn.apache.org/viewvc?rev=1378766&view=rev
Log:
Correct link to changelog file in a release announcement on the main page.
This issue was reported on the users list.

Modified:
tomcat/native/branches/1.1.x/xdocs/index.xml

Modified: tomcat/native/branches/1.1.x/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/xdocs/index.xml?rev=1378766&r1=1378765&r2=1378766&view=diff
==
--- tomcat/native/branches/1.1.x/xdocs/index.xml (original)
+++ tomcat/native/branches/1.1.x/xdocs/index.xml Wed Aug 29 23:23:39 2012
@@ -53,7 +53,7 @@ manual is described in more detail below
  Download page.
 
 
- Please see the ChangeLog for a full list of 
changes.
+ Please see the ChangeLog for a 
full list of changes.
 
 
 



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



svn commit: r1378768 - /tomcat/site/trunk/docs/native-doc/index.html

2012-08-29 Thread kkolinko
Author: kkolinko
Date: Wed Aug 29 23:25:39 2012
New Revision: 1378768

URL: http://svn.apache.org/viewvc?rev=1378768&view=rev
Log:
Correct link to changelog file in a release announcement on the main page of 
Tomcat Native.
This issue was reported on the users list.

Modified:
tomcat/site/trunk/docs/native-doc/index.html

Modified: tomcat/site/trunk/docs/native-doc/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/native-doc/index.html?rev=1378768&r1=1378767&r2=1378768&view=diff
==
--- tomcat/site/trunk/docs/native-doc/index.html (original)
+++ tomcat/site/trunk/docs/native-doc/index.html Wed Aug 29 23:25:39 2012
@@ -21,7 +21,7 @@ manual is described in more detail below
  Download page.
 
 
- Please see the ChangeLog for a full list of 
changes.
+ Please see the ChangeLog for a 
full list of changes.
 
 
 



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



[Bug 53267] The JreMemoryLeakPreventionListener causes a full GC every hour when gcDaemonProtection=true

2012-08-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53267

--- Comment #11 from Konstantin Kolinko  ---
(In reply to comment #10)
> Configurable value added in r1377543

Reverted in r1378132, based on "Re: svn commit: r1377689" discussion on dev@,
http://tomcat.markmail.org/thread/6hmjgrzys5txekew

-- 
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 53712] localvariabletable length error reintroduced?

2012-08-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53712

--- Comment #5 from Colin Mac  ---
I'm just furthering this discussion in the interest of helping future
developers.

Thanks for the snarky rtfm comment, but (1) there is no method larger than 64k,
unless an entire jsp is compiled to one java method, and (2) even if there is,
I did not change my code one bit, just upgraded to the latest stable tomcat 5.5
build. It was working before. But at a point in the distant past--a few
versions ago--it didn't work.

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



Patch for FileDirContext

2012-08-29 Thread Kevin Wooten
New to contributing to Tomcat so and not sure of the protocol for patches.  
Details follow…

I ran into an issue using starting Tomcat (7.0.29) from inside Eclipse with the 
"Serve modules without publishing" option enabled for a project that uses CDI 
(Weld 1.1.8).

Basically Weld would cause a StackOverflow on startup because it's 
TomcatListener class would end up recursively trying to locate app class files 
using a NamingContext received from Tomcat.

I traced the problem to what I believe to be an issue in 
org.apache.naming.resources.FileDirContext. It seems it is creating a child 
directory object (FileDirContext) with the wrong path; it's using the current 
directory's path instead of the child directory's path.

I edited FileDirContext.java, it was a one line change, and it has fixed my 
issues with starting Tomcat in my environment.  My build seems to pass the unit 
tests ran from "ant test" properly as well. So I made a patch and attached it 
to this email.

Let me know if I should submit the patch in some other manner.

Kevin Wooten



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

Re: Patch for FileDirContext

2012-08-29 Thread Kevin Wooten
I see now you don't seem to be able to attach patch files on this mailing list. 
The patch is so small… here it is…

Index: java/org/apache/naming/resources/FileDirContext.java
===
--- java/org/apache/naming/resources/FileDirContext.java(revision 
1378768)
+++ java/org/apache/naming/resources/FileDirContext.java(working copy)
@@ -872,7 +872,7 @@
 Object object = null;
 if (currentFile.isDirectory()) {
 FileDirContext tempContext = new FileDirContext(env);
-tempContext.setDocBase(file.getPath());
+tempContext.setDocBase(currentFile.getPath());
 tempContext.setAllowLinking(getAllowLinking());
 object = tempContext;
 } else {


On Aug 29, 2012, at 8:27 PM, Kevin Wooten  wrote:

> New to contributing to Tomcat so and not sure of the protocol for patches.  
> Details follow…
> 
> I ran into an issue using starting Tomcat (7.0.29) from inside Eclipse with 
> the "Serve modules without publishing" option enabled for a project that uses 
> CDI (Weld 1.1.8).
> 
> Basically Weld would cause a StackOverflow on startup because it's 
> TomcatListener class would end up recursively trying to locate app class 
> files using a NamingContext received from Tomcat.
> 
> I traced the problem to what I believe to be an issue in 
> org.apache.naming.resources.FileDirContext. It seems it is creating a child 
> directory object (FileDirContext) with the wrong path; it's using the current 
> directory's path instead of the child directory's path.
> 
> I edited FileDirContext.java, it was a one line change, and it has fixed my 
> issues with starting Tomcat in my environment.  My build seems to pass the 
> unit tests ran from "ant test" properly as well. So I made a patch and 
> attached it to this email.
> 
> Let me know if I should submit the patch in some other manner.
> 
> Kevin Wooten
> 
> 
> 
> -
> 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: Patch for FileDirContext

2012-08-29 Thread Konstantin Kolinko
2012/8/30 Kevin Wooten :
> New to contributing to Tomcat so and not sure of the protocol for patches.  
> Details follow…
>
> I ran into an issue using starting Tomcat (7.0.29) from inside Eclipse with 
> the "Serve modules without publishing" option enabled for a project that uses 
> CDI (Weld 1.1.8).
>
> Basically Weld would cause a StackOverflow on startup because it's 
> TomcatListener class would end up recursively trying to locate app class 
> files using a NamingContext received from Tomcat.
>
> I traced the problem to what I believe to be an issue in 
> org.apache.naming.resources.FileDirContext. It seems it is creating a child 
> directory object (FileDirContext) with the wrong path; it's using the current 
> directory's path instead of the child directory's path.
>
> I edited FileDirContext.java, it was a one line change, and it has fixed my 
> issues with starting Tomcat in my environment.  My build seems to pass the 
> unit tests ran from "ant test" properly as well. So I made a patch and 
> attached it to this email.
>
> Let me know if I should submit the patch in some other manner.
>

Can you please open an issue in Bugzilla?
So it would be better to keep track of things.

The patch looks good.

Best regards,
Konstantin Kolinko

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



[Bug 53800] New: Infinte loop cause by FileDirContext in a CDI/Weld project when using Eclipse's "Server modules without publishing"

2012-08-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53800

  Priority: P2
Bug ID: 53800
  Assignee: dev@tomcat.apache.org
   Summary: Infinte loop cause by FileDirContext in a CDI/Weld
project when using Eclipse's "Server modules without
publishing"
  Severity: normal
Classification: Unclassified
OS: All
  Reporter: kd...@me.com
  Hardware: All
Status: NEW
   Version: trunk
 Component: Catalina
   Product: Tomcat 7

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

Weld's TomcatListener is using the recurse method recited below. In the case I
am encountering the DirContext that Tomcat provides is a FileDirContext.

The discovery code used by Weld encounters what appears to be a bug in
FileDirContext where FileDirContexts for child directories are created with the
current FileDirContext's path. This causes an infinite loop while it searches
the root directory over and over.

Assuming the class discovery code Weld is using is correct, I tracked down the
problem to a specific line in FileDirContext.java.  Fixing this line to set the
path of the new child FileDirContext to the matching child directory fixes the
issue I am encountering. With this change the project appears to still pass all
the unit tests ran with "ant test". I have attached the patch to this issue.


Here is Weld's recurse function which I am assuming is correct...

protected static void recurse(DirContext context, Set classes, Set
urls, String prefix) throws Exception {
if (prefix.length() > 0)
prefix += ".";

NamingEnumeration ne = context.listBindings("");
while (ne.hasMoreElements()) {
Binding next = (Binding) ne.nextElement();
String name = prefix + next.getName();
if (name.endsWith(".class")) {
classes.add(name.substring(0, name.length() - 6));
continue;
}

Object nextObject = next.getObject();
if (nextObject instanceof DirContext) {
recurse((DirContext) nextObject, classes, urls, name);
}
}
}

-- 
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: Patch for FileDirContext

2012-08-29 Thread Kevin Wooten
I created Bug 53800 and attached the patch file.  Is that all that is necessary 
to get this patch considered?

On Aug 29, 2012, at 8:43 PM, Konstantin Kolinko  wrote:

> 2012/8/30 Kevin Wooten :
>> New to contributing to Tomcat so and not sure of the protocol for patches.  
>> Details follow…
>> 
>> I ran into an issue using starting Tomcat (7.0.29) from inside Eclipse with 
>> the "Serve modules without publishing" option enabled for a project that 
>> uses CDI (Weld 1.1.8).
>> 
>> Basically Weld would cause a StackOverflow on startup because it's 
>> TomcatListener class would end up recursively trying to locate app class 
>> files using a NamingContext received from Tomcat.
>> 
>> I traced the problem to what I believe to be an issue in 
>> org.apache.naming.resources.FileDirContext. It seems it is creating a child 
>> directory object (FileDirContext) with the wrong path; it's using the 
>> current directory's path instead of the child directory's path.
>> 
>> I edited FileDirContext.java, it was a one line change, and it has fixed my 
>> issues with starting Tomcat in my environment.  My build seems to pass the 
>> unit tests ran from "ant test" properly as well. So I made a patch and 
>> attached it to this email.
>> 
>> Let me know if I should submit the patch in some other manner.
>> 
> 
> Can you please open an issue in Bugzilla?
> So it would be better to keep track of things.
> 
> The patch looks good.
> 
> Best regards,
> Konstantin Kolinko
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 



[Bug 53800] Infinte loop cause by FileDirContext in a CDI/Weld project when using Eclipse's "Server modules without publishing"

2012-08-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53800

Konstantin Kolinko  changed:

   What|Removed |Added

  Attachment #29302|0   |1
   is patch||
  Attachment #29302|application/octet-stream|text/plain
  mime type||

-- 
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: r1378818 - /tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java

2012-08-29 Thread kkolinko
Author: kkolinko
Date: Thu Aug 30 06:43:52 2012
New Revision: 1378818

URL: http://svn.apache.org/viewvc?rev=1378818&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53800
FileDirContext.list() did not provide correct paths for subdirectories.
Patch provided by Kevin Wooten.

Modified:
tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java

Modified: tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java?rev=1378818&r1=1378817&r2=1378818&view=diff
==
--- tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java (original)
+++ tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java Thu Aug 
30 06:43:52 2012
@@ -872,7 +872,7 @@ public class FileDirContext extends Base
 Object object = null;
 if (currentFile.isDirectory()) {
 FileDirContext tempContext = new FileDirContext(env);
-tempContext.setDocBase(file.getPath());
+tempContext.setDocBase(currentFile.getPath());
 tempContext.setAllowLinking(getAllowLinking());
 object = tempContext;
 } else {



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



svn commit: r1378819 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/naming/resources/FileDirContext.java webapps/docs/changelog.xml

2012-08-29 Thread kkolinko
Author: kkolinko
Date: Thu Aug 30 06:49:33 2012
New Revision: 1378819

URL: http://svn.apache.org/viewvc?rev=1378819&view=rev
Log:
Merged revision 1378818 from tomcat/trunk:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53800
FileDirContext.list() did not provide correct paths for subdirectories.
Patch provided by Kevin Wooten.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/FileDirContext.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1378818

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/FileDirContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/FileDirContext.java?rev=1378819&r1=1378818&r2=1378819&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/FileDirContext.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/FileDirContext.java 
Thu Aug 30 06:49:33 2012
@@ -872,7 +872,7 @@ public class FileDirContext extends Base
 Object object = null;
 if (currentFile.isDirectory()) {
 FileDirContext tempContext = new FileDirContext(env);
-tempContext.setDocBase(file.getPath());
+tempContext.setDocBase(currentFile.getPath());
 tempContext.setAllowLinking(getAllowLinking());
 object = tempContext;
 } else {

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=1378819&r1=1378818&r2=1378819&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Aug 30 06:49:33 2012
@@ -185,6 +185,11 @@
   
 Remove unneeded handling of FORM authentication in RealmBase. 
(kkolinko)
   
+  
+53800: FileDirContext.list() did not provide
+correct paths for subdirectories. Patch provided by Kevin Wooten.
+(kkolinko)
+  
 
   
   



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



svn commit: r1378824 - /tomcat/tc6.0.x/trunk/STATUS.txt

2012-08-29 Thread kkolinko
Author: kkolinko
Date: Thu Aug 30 06:53:24 2012
New Revision: 1378824

URL: http://svn.apache.org/viewvc?rev=1378824&view=rev
Log:
proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1378824&r1=1378823&r2=1378824&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Aug 30 06:53:24 2012
@@ -165,6 +165,13 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kkolinko
   -1:
 
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53800
+  FileDirContext.list() did not provide correct paths for subdirectories.
+  Patch provided by Kevin Wooten.
+  http://svn.apache.org/viewvc?view=revision&revision=1378819
+  +1: kkolinko
+  -1:
+
 
 PATCHES/ISSUES THAT ARE STALLED
 



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



[Bug 53800] Infinte loop cause by FileDirContext in a CDI/Weld project when using Eclipse's "Server modules without publishing"

2012-08-29 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53800

Konstantin Kolinko  changed:

   What|Removed |Added

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

--- Comment #1 from Konstantin Kolinko  ---
Fixed in 7.0 with r1378819 and will be in 7.0.30.
Proposed for 6.0.


> Here is Weld's recurse function which I am assuming is correct...

It would be a lot better if they used Servlet API
(ServletContext.getResourcePaths(..)) for their task.
Well, I do not know all circumstances.

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