From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 321 invoked by alias); 15 Feb 2007 19:29:08 -0000 Received: (qmail 313 invoked by uid 22791); 15 Feb 2007 19:29:07 -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:29:03 +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 l1FJT1Aj020161 for ; Thu, 15 Feb 2007 14:29:01 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l1FJT0OC003453; Thu, 15 Feb 2007 14:29:00 -0500 Received: from opsy.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l1FJSxLS031559; Thu, 15 Feb 2007 14:28:59 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 91E14378362; Thu, 15 Feb 2007 10:16:29 -0700 (MST) To: Kyle Galloway Cc: Java Patch List Subject: Re: [RFA] JMTI Exception Events References: <45D383B0.8010807@redhat.com> <45D4A7EB.4050202@redhat.com> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Thu, 15 Feb 2007 19:29:00 -0000 In-Reply-To: <45D4A7EB.4050202@redhat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00500.txt.bz2 >>>>> "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. 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.) 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. Tom