Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 68293 invoked from network); 25 Mar 2008 06:07:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Mar 2008 06:07:35 -0000 Received: (qmail 55505 invoked by uid 500); 25 Mar 2008 06:07:34 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 55412 invoked by uid 500); 25 Mar 2008 06:07:33 -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 55403 invoked by uid 99); 25 Mar 2008 06:07:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Mar 2008 23:07:33 -0700 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Mar 2008 06:06:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 69763234C0AC for ; Mon, 24 Mar 2008 23:05:27 -0700 (PDT) Message-ID: <1713331520.1206425127430.JavaMail.jira@brutus> Date: Mon, 24 Mar 2008 23:05:27 -0700 (PDT) From: "Alexey Varlamov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-5622) [drlvm][kernel][geronimo] Method.getGeneric*() methods throw NPE for parametrized interface methods In-Reply-To: <1200480618.1206008604342.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-5622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581785#action_12581785 ] Alexey Varlamov commented on HARMONY-5622: ------------------------------------------ Vasily, could you please add a regression testcase for this issue? I think it is better to add a testcase to kernel tests for this issue, rather than to regression suite. > [drlvm][kernel][geronimo] Method.getGeneric*() methods throw NPE for parametrized interface methods > --------------------------------------------------------------------------------------------------- > > Key: HARMONY-5622 > URL: https://issues.apache.org/jira/browse/HARMONY-5622 > Project: Harmony > Issue Type: Bug > Components: App-Oriented Bug Reports, DRLVM > Affects Versions: 5.0M5 > Reporter: Vasily Zakharov > Assignee: Vasily Zakharov > Priority: Critical > Fix For: 5.0M6 > > Attachments: Harmony-5622.patch, Harmony-5622.patch > > > Class Method methods getGenericParameterTypes(), getGenericReturnType() and toGenericString() throw NPE if called for a parametrized method in an interface. > Here's the test demonstrating the problem: > import java.lang.reflect.Method; > public class Test { > public static void main(String[] args) { > boolean success = true; > try { > Method method = Sample.class.getMethods()[0]; > for (int i = 0; i < 5; i++) { > try { > switch (i) { > case 0: method.getGenericParameterTypes(); > break; > case 1: method.getGenericReturnType(); > break; > case 2: method.getGenericExceptionTypes(); > break; > case 3: method.getTypeParameters(); > break; > case 4: method.toGenericString(); > break; > } > } catch (Exception e) { > success = false; > System.out.print("FAIL: "); > e.printStackTrace(System.out); > } > } > System.out.println(success ? "SUCCESS" : "FAILURE"); > } catch (Exception e) { > System.out.print("ERROR: "); > e.printStackTrace(System.out); > } > } > } > interface Sample { > public T test(T param) throws E; > } > Output on RI: > SUCCESS > Output on Harmony: > FAIL: java.lang.NullPointerException > at org.apache.harmony.lang.reflect.support.AuxiliaryFinder.findTypeVariable(AuxiliaryFinder.java:293) > at org.apache.harmony.lang.reflect.parser.Parser.getGenericParameterTypes(Parser.java:742) > at java.lang.reflect.Method.getGenericParameterTypes(Method.java:110) > at Test.main(Test.java:10) > FAIL: java.lang.NullPointerException > at org.apache.harmony.lang.reflect.support.AuxiliaryFinder.findTypeVariable(AuxiliaryFinder.java:293) > at org.apache.harmony.lang.reflect.parser.Parser.getGenericReturnTypeImpl(Parser.java:447) > at java.lang.reflect.Method.getGenericReturnType(Method.java:126) > at Test.main(Test.java:12) > FAIL: java.lang.NullPointerException > at org.apache.harmony.lang.reflect.support.AuxiliaryFinder.findTypeVariable(AuxiliaryFinder.java:293) > at org.apache.harmony.lang.reflect.parser.Parser.getGenericParameterTypes(Parser.java:742) > at java.lang.reflect.Method.toGenericString(Method.java:150) > at Test.main(Test.java:18) > FAILURE > This issue is critical as it prevents Geronimo Deployer from working on Harmony. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.