Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 72099 invoked from network); 19 Jul 2003 00:23:42 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 19 Jul 2003 00:23:42 -0000 Received: (qmail 14134 invoked by uid 97); 19 Jul 2003 00:26:21 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@nagoya.betaversion.org Received: (qmail 14127 invoked from network); 19 Jul 2003 00:26:20 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 19 Jul 2003 00:26:20 -0000 Received: (qmail 71273 invoked by uid 500); 19 Jul 2003 00:23:35 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 71254 invoked from network); 19 Jul 2003 00:23:34 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 19 Jul 2003 00:23:34 -0000 Received: (qmail 72512 invoked from network); 19 Jul 2003 00:23:33 -0000 Received: from unknown (HELO apache.org) (127.0.0.1) by localhost.apache.org with SMTP; 19 Jul 2003 00:23:33 -0000 Message-ID: <3F188F8D.6090408@apache.org> Date: Sat, 19 Jul 2003 02:23:41 +0200 From: Remy Maucherat User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/compat Jdk14Compat.java JdkCompat.java References: <20030718222438.51026.qmail@icarus.apache.org> <3F188B36.8050606@joedog.org> In-Reply-To: <3F188B36.8050606@joedog.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: localhost.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Tim Funk wrote: > I have no issue with substring use for jdk1.3 > getPartialServletStackTrace() since it should not get called often so > the performance shouldn't be an issue (or am I missing something more > subtle). Yes, zero performance impact. > Possible alternative (for the 1.3 version). > public String getPartialServletStackTrace(Throwable t) { > StringWriter stackTrace = new StringWriter(); > t.printStackTrace(new PrintWriter(stackTrace)); > String st = stackTrace.toString(); > int i = st.lastIndexOf("javax.servlet."); > if (i>-1) > return st.substring(0, i); > else > return st; > } Sounds like a good start. There should be a " at " prefix in front of each line (which is something I don't like with traces, since the "at" can never be i18n ready). I'll try to hack that a little bit tomorrow, unless it gets automagically done while I sleep :) Remy --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org