From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4967 invoked by alias); 15 Feb 2007 19:37:16 -0000 Received: (qmail 4956 invoked by uid 22791); 15 Feb 2007 19:37:15 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 15 Feb 2007 19:37:08 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l1FJb6r5023966 for ; Thu, 15 Feb 2007 14:37:06 -0500 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l1FJb0N1006131; Thu, 15 Feb 2007 14:37:05 -0500 Received: from [172.16.14.104] (to-dhcp4.toronto.redhat.com [172.16.14.104]) by pobox.toronto.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l1FJax9V006375; Thu, 15 Feb 2007 14:36:59 -0500 Message-ID: <45D4B65C.4060400@redhat.com> Date: Thu, 15 Feb 2007 19:37:00 -0000 From: Kyle Galloway User-Agent: Thunderbird 1.5.0.9 (X11/20070103) MIME-Version: 1.0 To: tromey@redhat.com CC: Java Patch List Subject: Re: [RFA] JMTI Exception Events References: <45D383B0.8010807@redhat.com> <45D4A7EB.4050202@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2007-q1/txt/msg00501.txt.bz2 Tom Tromey wrote: >>>>>> "Kyle" == Kyle Galloway writes: >>>>>> > > Kyle> + if (!(_ex_map.get (thr).equals (ex))) > > >>> Without an equals() method in this class, I doubt this does what you >>> intend. As it is this equals() will always return false, because the >>> default equals() tests object identity, and a new object is never >>> identical to any existing one. >>> > > Kyle> In this case, however, I believe I want to only equal the exact same > Kyle> exception. > > Ah, thanks. I misread this, sorry about that. > > If you really intend to check identity, use '==' and not 'equals()'. > Otherwise things can be weird if a subclass happens to override equals. > Ok, no problem. > Kyle> What I have done now is add a method called post_exception_event, > Kyle> which checks to see if this is a repeated throw, and if not constucts > Kyle> an ExceptionEvent and alls send event to send the JVMTI event > Kyle> notification. > > Please use javaStyleNaming. I'm more a gnu-style person myself, but > we're stuck with that. (One of my little pet peeves is that the stack > trace stuff uses uppercase for the start of method names... weird and > somehow irritating.) > So you want, postExceptionEvent instead of post_exception_event. What about the two native calls should they be sendEvent and checkCatch. Also do you want the variable names changed to throwMeth, catchLoc etc? And while I'm at it, should it be funtion() or function () in java files outside of classpath, I think I've seen both?. I'm sorry to keep asking about/screwing this up but I find it can be a little confusing to know which conventions to use sometimes. > Kyle> + public static void post_exception_event (Thread thr, long throw_meth, > Kyle> + long throw_loc, Throwable ex, > Kyle> + long catch_meth, long catch_loc) > > I can't tell due to the patch stuff but the formatting of this looks > weird in my mail buffer; so please make sure it looks right before > committing. > Other than these is this ok to go in? - Kyle