svn commit: r1201221 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java

2011-11-12 Thread kkolinko
Author: kkolinko
Date: Sat Nov 12 08:08:36 2011
New Revision: 1201221

URL: http://svn.apache.org/viewvc?rev=1201221&view=rev
Log:
CTR: javadoc correction
There is no SSL_SESSION_MGR_ATTR in Globals. It is not supported in Tomcat 6.0.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java?rev=1201221&r1=1201220&r2=1201221&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java Sat 
Nov 12 08:08:36 2011
@@ -985,7 +985,6 @@ public class Request
  * {@link Globals.CIPHER_SUITE_ATTR} (SSL connections only)
  * {@link Globals.KEY_SIZE_ATTR} (SSL connections only)
  * {@link Globals.SSL_SESSION_ID_ATTR} (SSL connections only)
- * {@link Globals.SSL_SESSION_MGR_ATTR} (SSL connections only)
  * {@link Globals#PARAMETER_PARSE_FAILED_ATTR}
  * 
  * The underlying connector may also expose request attributes. These all



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



svn commit: r1201224 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/filters/FailedRequestFilter.java

2011-11-12 Thread kkolinko
Author: kkolinko
Date: Sat Nov 12 08:22:23 2011
New Revision: 1201224

URL: http://svn.apache.org/viewvc?rev=1201224&view=rev
Log:
svn:eol-style=native

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/catalina/filters/FailedRequestFilter.java  
 (contents, props changed)

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/filters/FailedRequestFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/filters/FailedRequestFilter.java?rev=1201224&r1=1201223&r2=1201224&view=diff
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/filters/FailedRequestFilter.java 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/filters/FailedRequestFilter.java 
Sat Nov 12 08:22:23 2011
@@ -1,92 +1,92 @@
-/*
- * 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.filters;
-
-import java.io.IOException;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.catalina.Globals;
-import org.apache.catalina.CometEvent;
-import org.apache.catalina.CometFilter;
-import org.apache.catalina.CometFilterChain;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
-
-/**
- * Filter that will reject requests if there was a failure during parameter
- * parsing. This filter can be used to ensure that none parameter values
- * submitted by client are lost.
- *
- * 
- * Note that it has side effect that it triggers parameter parsing and thus
- * consumes the body for POST requests. Parameter parsing does check content
- * type of the request, so there should not be problems with addresses that use
- * request.getInputStream() and request.getReader(),
- * if requests parsed by them do not use standard value for content mime-type.
- */
-public class FailedRequestFilter extends FilterBase implements CometFilter {
-
-private static final Log log = 
LogFactory.getLog(FailedRequestFilter.class);
-
-@Override
-protected Log getLogger() {
-return log;
-}
-
-public void doFilter(ServletRequest request, ServletResponse response,
-FilterChain chain) throws IOException, ServletException {
-if (!isGoodRequest(request)) {
-((HttpServletResponse) response)
-.sendError(HttpServletResponse.SC_BAD_REQUEST);
-return;
-}
-chain.doFilter(request, response);
-}
-
-public void doFilterEvent(CometEvent event, CometFilterChain chain)
-throws IOException, ServletException {
-if (event.getEventType() == CometEvent.EventType.BEGIN
-&& !isGoodRequest(event.getHttpServletRequest())) {
-event.getHttpServletResponse().sendError(
-HttpServletResponse.SC_BAD_REQUEST);
-event.close();
-return;
-}
-chain.doFilterEvent(event);
-}
-
-private boolean isGoodRequest(ServletRequest request) {
-// Trigger parsing of parameters
-request.getParameter("none");
-// Detect failure
-if (request.getAttribute(Globals.PARAMETER_PARSE_FAILED_ATTR) != null) 
{
-return false;
-}
-return true;
-}
-
-@Override
-protected boolean isConfigProblemFatal() {
-return true;
-}
-
-}
+/*
+ * 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 th

svn commit: r1201225 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/LocalStrings.properties

2011-11-12 Thread kkolinko
Author: kkolinko
Date: Sat Nov 12 08:36:55 2011
New Revision: 1201225

URL: http://svn.apache.org/viewvc?rev=1201225&view=rev
Log:
svn:eol-style=native

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/LocalStrings.properties   
(contents, props changed)

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/LocalStrings.properties?rev=1201225&r1=1201224&r2=1201225&view=diff
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/LocalStrings.properties 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/LocalStrings.properties 
Sat Nov 12 08:36:55 2011
@@ -1,23 +1,23 @@
-# 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.
-
-parameters.bytes=Start processing with input [{0}]
-parameters.copyFail=Failed to create copy of original parameter values for 
debug logging purposes
-parameters.decodeFail.debug=Character decoding failed. Parameter [{0}] with 
value [{1}] has been ignored.
-parameters.decodeFail.info=Character decoding failed. Parameter [{0}] with 
value [{1}] has been ignored. Note that the name and value quoted here may be 
corrupted due to the failed decoding. Use debug level logging to see the 
original, non-corrupted values.
-parameters.invalidChunk=Invalid chunk starting at byte [{0}] and ending at 
byte [{1}] with a value of [{2}] ignored
-parameters.maxCountFail=More than the maximum number of request parameters 
(GET plus POST) for a single request ([{0}]) were detected. Any parameters 
beyond this limit have been ignored. To change this limit, set the 
maxParameterCount attribute on the Connector.
-parameters.multipleDecodingFail=Character decoding failed. A total of [{0}] 
failures were detected but only the first was logged. Enable debug level 
logging for this logger to log all failures.
-parameters.noequal=Parameter starting at position [{0}] and ending at position 
[{1}] with a value of [{0}] was not followed by an '=' character
+# 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.
+
+parameters.bytes=Start processing with input [{0}]
+parameters.copyFail=Failed to create copy of original parameter values for 
debug logging purposes
+parameters.decodeFail.debug=Character decoding failed. Parameter [{0}] with 
value [{1}] has been ignored.
+parameters.decodeFail.info=Character decoding failed. Parameter [{0}] with 
value [{1}] has been ignored. Note that the name and value quoted here may be 
corrupted due to the failed decoding. Use debug level logging to see the 
original, non-corrupted values.
+parameters.invalidChunk=Invalid chunk starting at byte [{0}] and ending at 
byte [{1}] with a value of [{2}] ignored
+parameters.maxCountFail=More than the maximum number of request parameters 
(GET plus POST) for a single request ([{0}]) were detected. Any parameters 
beyond this limit have been ignored. To change this limit, set the 
maxParameterCount attribute on the Connector.
+parameters.multipleDecodingFail=Character decoding failed. A total of [{0}] 
failures were detected but only the first was logged. Enable debug level 
logging for this logger to log all failures.
+parameters.noequal=Parameter starting at position [{0}] and ending at position 
[{1}] with a value of [{0}] was not followed by an '=' character

Propchange: 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/LocalStrings.p

svn commit: r1201230 - /tomcat/tc5.5.x/trunk/STATUS.txt

2011-11-12 Thread kkolinko
Author: kkolinko
Date: Sat Nov 12 09:32:14 2011
New Revision: 1201230

URL: http://svn.apache.org/viewvc?rev=1201230&view=rev
Log:
Propose updated patch

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1201230&r1=1201229&r2=1201230&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Sat Nov 12 09:32:14 2011
@@ -54,8 +54,25 @@ PATCHES PROPOSED TO BACKPORT:
It is expected, but does not explain why error 403 and not 404 is 
observed.
 
 * Improve performance of parameter processing
-  http://people.apache.org/~markt/patches/2011-10-29-param-perf-tc5-v2.patch
-  http://svn.apache.org/viewvc?rev=1195222&view=rev - performance tweaks
-  +1: markt
+  
+Improve performance of parameter processing for GET and POST requests.
+Also add an option to limit the maximum number of parameters processed
+per request. This defaults to 1. Excessive parameters are ignored.
+Note that FailedRequestFilter can be used to reject the
+request if some parameters were ignored. (markt/kkolinko)
+  
+  
+New filter FailedRequestFilter that will reject a request
+if there were errors during HTTP parameter parsing. (kkolinko)
+  
+  
http://people.apache.org/~kkolinko/patches/2011-11-12_tc55_parameters-v4.patch
+  Before the patch:
+  Should be created by patch tool automatically, but just to be sure:
+mkdir container/catalina/src/share/org/apache/catalina/filters
+svn add container/catalina/src/share/org/apache/catalina/filters
+  After the patch:
+svn propset svn:eol-style native  
connectors/util/java/org/apache/tomcat/util/http/LocalStrings.properties
+svn propset svn:eol-style native  
container/catalina/src/share/org/apache/catalina/filters/FailedRequestFilter.java
+svn propset svn:eol-style native  container/webapps/docs/config/filter.xml
+  +1: kkolinko
   -1:
-kkolinko: +r1195943,r1198641 are needed, and maybe (r1195531+r1195905, 
r1195949, r1200218+r1200264)



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



svn commit: r1201235 - in /tomcat/trunk: java/org/apache/tomcat/util/IntrospectionUtils.java test/org/apache/catalina/tribes/demos/IntrospectionUtils.java

2011-11-12 Thread kkolinko
Author: kkolinko
Date: Sat Nov 12 10:03:18 2011
New Revision: 1201235

URL: http://svn.apache.org/viewvc?rev=1201235&view=rev
Log:
Deprecate unused methods in IntrospectionUtils classes

Modified:
tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
tomcat/trunk/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java?rev=1201235&r1=1201234&r2=1201235&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Sat Nov 12 
10:03:18 2011
@@ -43,7 +43,9 @@ public final class IntrospectionUtils {
 
 /**
  * Call execute() - any ant-like task should work
+ * @deprecated Not used
  */
+@Deprecated
 public static void execute(Object proxy, String method) throws Exception {
 Method executeM = null;
 Class c = proxy.getClass();
@@ -58,7 +60,9 @@ public final class IntrospectionUtils {
 
 /**
  * Call void setAttribute( String ,Object )
+ * @deprecated Not used
  */
+@Deprecated
 public static void setAttribute(Object proxy, String n, Object v)
 throws Exception {
 if (proxy instanceof AttributeHolder) {
@@ -85,7 +89,9 @@ public final class IntrospectionUtils {
 
 /**
  * Call void getAttribute( String )
+ * @deprecated Not used
  */
+@Deprecated
 public static Object getAttribute(Object proxy, String n) throws Exception 
{
 Method executeM = null;
 Class c = proxy.getClass();
@@ -102,7 +108,9 @@ public final class IntrospectionUtils {
 
 /**
  * Construct a URLClassLoader. Will compile and work in JDK1.1 too.
+ * @deprecated Not used
  */
+@Deprecated
 public static ClassLoader getURLClassLoader(URL urls[], ClassLoader 
parent) {
 try {
 Class urlCL = Class.forName("java.net.URLClassLoader");
@@ -221,7 +229,9 @@ public final class IntrospectionUtils {
 
 /**
  * Debug method, display the classpath
+ * @deprecated Not used
  */
+@Deprecated
 public static void displayClassPath(String msg, URL[] cp) {
 if (log.isDebugEnabled()) {
 log.debug(msg);
@@ -231,6 +241,10 @@ public final class IntrospectionUtils {
 }
 }
 
+/**
+ * @deprecated Used only by deprecated method
+ */
+@Deprecated
 public static final String PATH_SEPARATOR = 
System.getProperty("path.separator");
 
 /**
@@ -238,7 +252,9 @@ public final class IntrospectionUtils {
  * property. This System property lists the classpath entries common to web
  * applications. This System property is currently used by Jasper when its
  * JSP servlet compiles the Java file for a JSP.
+ * @deprecated Not used
  */
+@Deprecated
 public static String classPathAdd(URL urls[], String cp) {
 if (urls == null)
 return cp;
@@ -444,7 +460,9 @@ public final class IntrospectionUtils {
 }
 
 /**
+ * @deprecated Not used
  */
+@Deprecated
 public static void setProperty(Object o, String name) {
 String setter = "set" + capitalize(name);
 try {
@@ -530,6 +548,10 @@ public final class IntrospectionUtils {
 return new String(chars);
 }
 
+/**
+ * @deprecated Not used
+ */
+@Deprecated
 public static String unCapitalize(String name) {
 if (name == null || name.length() == 0) {
 return name;
@@ -544,7 +566,9 @@ public final class IntrospectionUtils {
 /**
  * Add all the jar files in a dir to the classpath, represented as a Vector
  * of URLs.
+ * @deprecated Is used only by deprecated method
  */
+@Deprecated
 public static void addToClassPath(Vector cpV, String dir) {
 try {
 String cpComp[] = getFilesByExt(dir, ".jar");
@@ -561,6 +585,10 @@ public final class IntrospectionUtils {
 }
 }
 
+/**
+ * @deprecated Is used only by deprecated method
+ */
+@Deprecated
 public static void addToolsJar(Vector v) {
 try {
 // Add tools.jar in any case
@@ -588,7 +616,9 @@ public final class IntrospectionUtils {
 
 /**
  * Return all files with a given extension in a dir
+ * @deprecated Is used only by deprecated method
  */
+@Deprecated
 public static String[] getFilesByExt(String ld, String ext) {
 File dir = new File(ld);
 String[] names = null;
@@ -609,7 +639,9 @@ public final class IntrospectionUtils {
 
 /**
  * Construct a file url from a file, using a base dir
+ * @deprecated Is used only by deprecated method
  */
+@Deprecated
 public static URL getURL(String base, String file) {

svn commit: r1201237 - in /tomcat/trunk: java/org/apache/tomcat/util/IntrospectionUtils.java test/org/apache/catalina/tribes/demos/IntrospectionUtils.java

2011-11-12 Thread kkolinko
Author: kkolinko
Date: Sat Nov 12 10:09:00 2011
New Revision: 1201237

URL: http://svn.apache.org/viewvc?rev=1201237&view=rev
Log:
Remove unused code from "tribes/demos" copy of IntrospectionUtils
This can be backported

Modified:
tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
tomcat/trunk/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java?rev=1201237&r1=1201236&r2=1201237&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Sat Nov 12 
10:09:00 2011
@@ -30,8 +30,6 @@ import java.util.Hashtable;
 import java.util.StringTokenizer;
 import java.util.Vector;
 
-// Depends: JDK1.1
-
 /**
  * Utils for introspection and reflection
  */

Modified: 
tomcat/trunk/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java?rev=1201237&r1=1201236&r2=1201237&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java 
Sat Nov 12 10:09:00 2011
@@ -17,20 +17,11 @@
 
 package org.apache.catalina.tribes.demos;
 
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.InetAddress;
-import java.net.MalformedURLException;
-import java.net.URL;
 import java.net.UnknownHostException;
 import java.util.Hashtable;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-// Depends: JDK1.1
 
 /**
  * Utils for introspection and reflection
@@ -42,240 +33,6 @@ public final class IntrospectionUtils {
 org.apache.juli.logging.LogFactory.getLog( IntrospectionUtils.class );
 
 /**
- * Call execute() - any ant-like task should work
- * @deprecated Not used
- */
-@Deprecated
-public static void execute(Object proxy, String method) throws Exception {
-Method executeM = null;
-Class c = proxy.getClass();
-Class params[] = new Class[0];
-//  params[0]=args.getClass();
-executeM = findMethod(c, method, params);
-if (executeM == null) {
-throw new RuntimeException("No execute in " + proxy.getClass());
-}
-executeM.invoke(proxy, (Object[]) null);//new Object[] { args });
-}
-
-/**
- * Call void setAttribute( String ,Object )
- * @deprecated Not used
- */
-@Deprecated
-public static void setAttribute(Object proxy, String n, Object v)
-throws Exception {
-if (proxy instanceof AttributeHolder) {
-((AttributeHolder) proxy).setAttribute(n, v);
-return;
-}
-
-Method executeM = null;
-Class c = proxy.getClass();
-Class params[] = new Class[2];
-params[0] = String.class;
-params[1] = Object.class;
-executeM = findMethod(c, "setAttribute", params);
-if (executeM == null) {
-if (log.isDebugEnabled())
-log.debug("No setAttribute in " + proxy.getClass());
-return;
-}
-if (log.isDebugEnabled())
-log.debug("Setting " + n + "=" + v + "  in " + proxy);
-executeM.invoke(proxy, new Object[] { n, v });
-return;
-}
-
-/**
- * Call void getAttribute( String )
- * @deprecated Not used
- */
-@Deprecated
-public static Object getAttribute(Object proxy, String n) throws Exception 
{
-Method executeM = null;
-Class c = proxy.getClass();
-Class params[] = new Class[1];
-params[0] = String.class;
-executeM = findMethod(c, "getAttribute", params);
-if (executeM == null) {
-if (log.isDebugEnabled())
-log.debug("No getAttribute in " + proxy.getClass());
-return null;
-}
-return executeM.invoke(proxy, new Object[] { n });
-}
-
-/**
- * Construct a URLClassLoader. Will compile and work in JDK1.1 too.
- * @deprecated Not used
- */
-@Deprecated
-public static ClassLoader getURLClassLoader(URL urls[], ClassLoader 
parent) {
-try {
-Class urlCL = Class.forName("java.net.URLClassLoader");
-Class paramT[] = new Class[2];
-paramT[0] = urls.getClass();
-paramT[1] = ClassLoader.class;
-Method m = findMethod(urlCL, "newInstance", paramT);
-if (m == null)
-return null;
-
-  

svn commit: r1201239 - /tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java

2011-11-12 Thread kkolinko
Author: kkolinko
Date: Sat Nov 12 10:12:57 2011
New Revision: 1201239

URL: http://svn.apache.org/viewvc?rev=1201239&view=rev
Log:
Remove unused deprecated methods from IntrospectionUtils

Modified:
tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java?rev=1201239&r1=1201238&r2=1201239&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Sat Nov 12 
10:12:57 2011
@@ -18,17 +18,12 @@
 package org.apache.tomcat.util;
 
 import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.InetAddress;
-import java.net.MalformedURLException;
-import java.net.URL;
 import java.net.UnknownHostException;
 import java.util.Hashtable;
 import java.util.StringTokenizer;
-import java.util.Vector;
 
 /**
  * Utils for introspection and reflection
@@ -39,98 +34,6 @@ public final class IntrospectionUtils {
 private static final org.apache.juli.logging.Log log=
 org.apache.juli.logging.LogFactory.getLog( IntrospectionUtils.class );
 
-/**
- * Call execute() - any ant-like task should work
- * @deprecated Not used
- */
-@Deprecated
-public static void execute(Object proxy, String method) throws Exception {
-Method executeM = null;
-Class c = proxy.getClass();
-Class params[] = new Class[0];
-// params[0]=args.getClass();
-executeM = findMethod(c, method, params);
-if (executeM == null) {
-throw new RuntimeException("No execute in " + proxy.getClass());
-}
-executeM.invoke(proxy, (Object[]) null);//new Object[] { args });
-}
-
-/**
- * Call void setAttribute( String ,Object )
- * @deprecated Not used
- */
-@Deprecated
-public static void setAttribute(Object proxy, String n, Object v)
-throws Exception {
-if (proxy instanceof AttributeHolder) {
-((AttributeHolder) proxy).setAttribute(n, v);
-return;
-}
-
-Method executeM = null;
-Class c = proxy.getClass();
-Class params[] = new Class[2];
-params[0] = String.class;
-params[1] = Object.class;
-executeM = findMethod(c, "setAttribute", params);
-if (executeM == null) {
-if (log.isDebugEnabled())
-log.debug("No setAttribute in " + proxy.getClass());
-return;
-}
-if (log.isDebugEnabled())
-log.debug("Setting " + n + "=" + v + "  in " + proxy);
-executeM.invoke(proxy, new Object[] { n, v });
-return;
-}
-
-/**
- * Call void getAttribute( String )
- * @deprecated Not used
- */
-@Deprecated
-public static Object getAttribute(Object proxy, String n) throws Exception 
{
-Method executeM = null;
-Class c = proxy.getClass();
-Class params[] = new Class[1];
-params[0] = String.class;
-executeM = findMethod(c, "getAttribute", params);
-if (executeM == null) {
-if (log.isDebugEnabled())
-log.debug("No getAttribute in " + proxy.getClass());
-return null;
-}
-return executeM.invoke(proxy, new Object[] { n });
-}
-
-/**
- * Construct a URLClassLoader. Will compile and work in JDK1.1 too.
- * @deprecated Not used
- */
-@Deprecated
-public static ClassLoader getURLClassLoader(URL urls[], ClassLoader 
parent) {
-try {
-Class urlCL = Class.forName("java.net.URLClassLoader");
-Class paramT[] = new Class[2];
-paramT[0] = urls.getClass();
-paramT[1] = ClassLoader.class;
-Method m = findMethod(urlCL, "newInstance", paramT);
-if (m == null)
-return null;
-
-ClassLoader cl = (ClassLoader) m.invoke(urlCL, new Object[] { urls,
-parent });
-return cl;
-} catch (ClassNotFoundException ex) {
-// jdk1.1
-return null;
-} catch (Exception ex) {
-ex.printStackTrace();
-return null;
-}
-}
-
 public static String guessInstall(String installSysProp,
 String homeSysProp, String jarName) {
 return guessInstall(installSysProp, homeSysProp, jarName, null);
@@ -226,47 +129,6 @@ public final class IntrospectionUtils {
 }
 
 /**
- * Debug method, display the classpath
- * @deprecated Not used
- */
-@Deprecated
-public static void displayClassPath(String msg, URL[] cp) {
-if (log.isDe

svn commit: r1201242 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/IntrospectionUtils.java test/org/apache/catalina/tribes/demos/IntrospectionUtils.java webapps/docs/changelog.xml

2011-11-12 Thread kkolinko
Author: kkolinko
Date: Sat Nov 12 10:18:08 2011
New Revision: 1201242

URL: http://svn.apache.org/viewvc?rev=1201242&view=rev
Log:
Merged revisions 1201235-1201237 from tomcat/trunk:
Deprecate unused methods in IntrospectionUtils classes
Remove unused code from "tribes/demos" copy of IntrospectionUtils

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java

tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Nov 12 10:18:08 2011
@@ -1 +1 @@
-/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187
 
753,1187755,1187775,1187801,1187806,1187809,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735,1196825,1196827,1197158,1197261,1197263,1197299-1197300,1197305,1197339-1197340,1197343,1197382,1197386-1197387,1197480,1197578,1198497,1198528,1198552,1198602,1198604,1198607,1198622,1198640,1198696,1198707,1199418,1199432,1199436,1199513,1199529,1199980,116,1200056,1200089,1200106-1200107,1200263,1200316,1200320,1200398-1200399,1200445-1200446,1200555,1200627,1200696,1200725,1200937,1200941,1201069,1201087,1201180
+/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,11

svn commit: r1201251 - in /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool: ProxyConnection.java TrapException.java interceptor/AbstractQueryReport.java interceptor/StatementD

2011-11-12 Thread kkolinko
Author: kkolinko
Date: Sat Nov 12 12:01:48 2011
New Revision: 1201251

URL: http://svn.apache.org/viewvc?rev=1201251&view=rev
Log:
Simplify code: remove unneeded classcast.

Modified:

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ProxyConnection.java

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/TrapException.java

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ProxyConnection.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ProxyConnection.java?rev=1201251&r1=1201250&r2=1201251&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ProxyConnection.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ProxyConnection.java
 Sat Nov 12 12:01:48 2011
@@ -108,8 +108,7 @@ public class ProxyConnection extends Jdb
 return method.invoke(connection.getXAConnection(),args);
 }catch (Throwable t) {
 if (t instanceof InvocationTargetException) {
-InvocationTargetException it = 
(InvocationTargetException)t;
-throw it.getCause()!=null?it.getCause():it;
+throw t.getCause() != null ? t.getCause() : t;
 } else {
 throw t;
 }
@@ -130,8 +129,7 @@ public class ProxyConnection extends Jdb
 }
 }catch (Throwable t) {
 if (t instanceof InvocationTargetException) {
-InvocationTargetException it = (InvocationTargetException)t;
-throw it.getCause()!=null?it.getCause():it;
+throw t.getCause() != null ? t.getCause() : t;
 } else {
 throw t;
 }

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/TrapException.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/TrapException.java?rev=1201251&r1=1201250&r2=1201251&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/TrapException.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/TrapException.java
 Sat Nov 12 12:01:48 2011
@@ -42,7 +42,7 @@ public class TrapException extends JdbcI
 }catch (Exception t) {
 Throwable exception = t;
 if (t instanceof InvocationTargetException) {
-exception = t.getCause()!=null?t.getCause():t;
+exception = t.getCause() != null ? t.getCause() : t;
 }
 Class exceptionClass = exception.getClass();
 if (!isDeclaredException(method, exceptionClass)) {

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java?rev=1201251&r1=1201250&r2=1201251&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java
 Sat Nov 12 12:01:48 2011
@@ -236,8 +236,7 @@ public abstract class AbstractQueryRepor
 }catch (Throwable t) {
 reportFailedQuery(query,args,name,start,t);
 if (t instanceof InvocationTargetException) {
-InvocationTargetException it = 
(InvocationTargetException)t;
-throw it.getCause()!=null?it.getCause():it;
+throw t.getCause() != null ? t.getCause() : t;
 } else {
 throw t;
 }

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java?rev=1201251&r1=1201250&r2=1201251&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tom

[jira] [Commented] (MTOMCAT-100) support war overlay to add war external dependencies in tomcat run

2011-11-12 Thread Olivier Bazoud (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149091#comment-13149091
 ] 

Olivier Bazoud commented on MTOMCAT-100:


It seems to me that the resources(css, js, jsp, ...) available in the war 
overlayt are not served by the plugin.
For tomcat 6 plugin, this can help you : 
http://blog.bazoud.com/post/2009/05/12/Multiples-docbases-avec-tomcat
For tomcat 7 plugin, you can use alias resources.

> support war overlay to add war external dependencies in tomcat run 
> ---
>
> Key: MTOMCAT-100
> URL: https://issues.apache.org/jira/browse/MTOMCAT-100
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Improvement
>  Components: tomcat6, tomcat7
>Reporter: Olivier Lamy
>Assignee: Olivier Lamy
> Fix For: 2.0
>
>
>  /WEB-INF/lib/*.jar and /WEB-INF/classes will added to web app classloader 
> when using tomcat*:run to do as war overlays does.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



Re: [Taglibs] Is anyone looking after taglibs?

2011-11-12 Thread Henri Yandell
I'll take care of it as a part of the Jakarta retirement.

Hen

On Thu, Nov 3, 2011 at 10:33 AM, sebb  wrote:
> The Jakarta TLP is about to retire to the attic; however the taglibs
> site still refers to non-existent jakarta pages for the downloads.
>
> A bug [1] was raised for this for this some while ago, but there
> appears to be no-one interested in fixing the issue.
>
> [1] https://issues.apache.org/bugzilla/show_bug.cgi?id=51382
>
> -
> 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




[jira] [Commented] (MTOMCAT-100) support war overlay to add war external dependencies in tomcat run

2011-11-12 Thread Olivier Lamy (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149150#comment-13149150
 ] 

Olivier Lamy commented on MTOMCAT-100:
--

The issue I have here is to have a different behavior with the maven-war-plugin.
This one doesn't handle resources from war dependencies.
So usually folks use maven-dependency-plugin to unpack war dependencies to have 
those resources packaged with the war artifacts.

> support war overlay to add war external dependencies in tomcat run 
> ---
>
> Key: MTOMCAT-100
> URL: https://issues.apache.org/jira/browse/MTOMCAT-100
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Improvement
>  Components: tomcat6, tomcat7
>Reporter: Olivier Lamy
>Assignee: Olivier Lamy
> Fix For: 2.0
>
>
>  /WEB-INF/lib/*.jar and /WEB-INF/classes will added to web app classloader 
> when using tomcat*:run to do as war overlays does.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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