Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 35580 invoked from network); 20 Sep 2004 18:17:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Sep 2004 18:17:01 -0000 Received: (qmail 35256 invoked by uid 500); 20 Sep 2004 18:16:24 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 35187 invoked by uid 500); 20 Sep 2004 18:16:23 -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 35148 invoked by uid 99); 20 Sep 2004 18:16:23 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [192.18.42.13] (HELO nwkea-mail-1.sun.com) (192.18.42.13) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 20 Sep 2004 11:16:21 -0700 Received: from phys-d3-ha21sca-1 ([129.145.155.163]) by nwkea-mail-1.sun.com (8.12.10/8.12.9) with ESMTP id i8KIGK4d013408 for ; Mon, 20 Sep 2004 11:16:20 -0700 (PDT) Received: from conversion-daemon.ha21sca-mail1.sfbay.sun.com by ha21sca-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0I4C00301QPMS3@ha21sca-mail1.sfbay.sun.com> (original mail from amyroh@apache.org) for tomcat-dev@jakarta.apache.org; Mon, 20 Sep 2004 11:16:20 -0700 (PDT) Received: from AMYROH (vpn-129-150-26-92.SFBay.Sun.COM [129.150.26.92]) by ha21sca-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTP id <0I4C008KZQR7JO@ha21sca-mail1.sfbay.sun.com> for tomcat-dev@jakarta.apache.org; Mon, 20 Sep 2004 11:16:20 -0700 (PDT) Date: Mon, 20 Sep 2004 11:16:37 -0700 From: Amy Roh Subject: Re: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler SmapUtil.java To: Tomcat Developers List Message-id: <017901c49f3d$f85a5eb0$5c1a9681@AMYROH> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Mailer: Microsoft Outlook Express 6.00.2900.2180 Content-type: text/plain; format=flowed; charset=iso-8859-1; reply-type=response Content-transfer-encoding: 7BIT X-Priority: 3 X-MSMail-priority: Normal References: <20040920175128.20622.qmail@minotaur.apache.org> <414F19ED.3060403@apache.org> <013401c49f3c$8b2294d0$5c1a9681@AMYROH> <414F1F9C.8020907@progeeks.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > > Amy Roh wrote: > >>> amyroh@apache.org wrote: >>> >>>> amyroh 2004/09/20 10:51:28 >>>> >>>> Modified: jasper2/src/share/org/apache/jasper/compiler >>>> SmapUtil.java >>>> Log: >>>> Remove verbose. >>>> - if (verbose) { >>>> - if (log.isDebugEnabled()) >>>> - log.debug("constant pool count: " + >>>> constantPoolCount); >>>> - } >>>> + log("constant pool count: " + constantPoolCount); >>>> >>> You need to keep if (log.isDebugEnabled()), otherwise, zillions of >>> Strings will be created for no reason (as the parameter of your method >>> will have to be created). >> >> >> I have added the following log helper method so I don't have to do if >> (log.isDebugEnabled()) everytime I use log.debug() >> >> + >> + private static void log(String msg) { >> + if (log.isDebugEnabled()) >> + log.debug(msg); >> + } >> + >> } >> >> Amy > > >>> + log("constant pool count: " + constantPoolCount); > > But even to call your log() method, a String will need to be created that > combines the "constant pool count:" with a > String.valueOf(constantPoolCount). Even if it's just going to be thrown > away. > -Paul Ah, I see what you mean. I'll commit the fix. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org