Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 23054 invoked from network); 2 Jul 2010 06:12:17 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Jul 2010 06:12:17 -0000 Received: (qmail 1876 invoked by uid 500); 2 Jul 2010 06:12:17 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 1756 invoked by uid 500); 2 Jul 2010 06:12:17 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 1737 invoked by uid 99); 2 Jul 2010 06:12:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jul 2010 06:12:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jul 2010 06:12:13 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o626Bqj0006095 for ; Fri, 2 Jul 2010 06:11:52 GMT Message-ID: <21502193.167701278051112488.JavaMail.jira@thor> Date: Fri, 2 Jul 2010 02:11:52 -0400 (EDT) From: "Shi Jun Zhang (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-6565) [java6][classlib][instrument]NoSuchMethodException throws when Agent only implements premain(String) method In-Reply-To: <3096289.165881278039650660.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-6565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shi Jun Zhang updated HARMONY-6565: ----------------------------------- Attachment: HARMONY-6565.diff This patch includes the fix and the test case. I add a try/catch clause to try to invoke public static void premain(String agentArgs, Instrumentation inst); in Agent class first, if the method is not found, invoke public static void premain(String agentArgs); > [java6][classlib][instrument]NoSuchMethodException throws when Agent only implements premain(String) method > ----------------------------------------------------------------------------------------------------------- > > Key: HARMONY-6565 > URL: https://issues.apache.org/jira/browse/HARMONY-6565 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 6.0M2 > Environment: All > Reporter: Shi Jun Zhang > Attachments: HARMONY-6565.diff > > > In Java 6 spec, there can be an one argument method premain(java.lang.String) in Agent class if user doesn't implement the premain(java.lang.String, java.lang.instrument.Instrumentation). > NoSuchMethodException should not be thrown if there is either premain(java.lang.String) or premain(java.lang.String, java.lang.instrument.Instrumentation). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.