Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 17529 invoked from network); 23 Apr 2008 10:02:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Apr 2008 10:02:45 -0000 Received: (qmail 25612 invoked by uid 500); 23 Apr 2008 10:02:46 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 25586 invoked by uid 500); 23 Apr 2008 10:02:46 -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 25575 invoked by uid 99); 23 Apr 2008 10:02:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2008 03:02:46 -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; Wed, 23 Apr 2008 10:02:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6A956234C0F1 for ; Wed, 23 Apr 2008 02:59:21 -0700 (PDT) Message-ID: <1409837616.1208944761423.JavaMail.jira@brutus> Date: Wed, 23 Apr 2008 02:59:21 -0700 (PDT) From: "Davanum Srinivas (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-5780) NPE in ParameterizedTypeImpl.equals MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org NPE in ParameterizedTypeImpl.equals ----------------------------------- Key: HARMONY-5780 URL: https://issues.apache.org/jira/browse/HARMONY-5780 Project: Harmony Issue Type: Bug Reporter: Davanum Srinivas This problem causes a failure in axis2 jaxbri maven module test case. ============== Diagnostic Patch ============= Index: vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/implementation/ParameterizedTypeImpl.java =================================================================== --- vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/implementation/ParameterizedTypeImpl.java (revision 650806) +++ vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/implementation/ParameterizedTypeImpl.java (working copy) @@ -48,6 +48,12 @@ return false; } } + System.out.println("equals 1: " + rawType); + System.out.println("equals 2: " + typeOwner); + System.out.println("equals 3: " + other); + System.out.println("equals 4: " + ((ParameterizedType)other).getRawType()); + System.out.println("equals 5: " + ((ParameterizedType)other).getOwnerType()); + return rawType.equals(((ParameterizedType)other).getRawType()) && typeOwner.equals(((ParameterizedType)other).getOwnerType()); } @@ -102,4 +108,4 @@ } return sb.toString(); } -} \ No newline at end of file +} ===================== Stack Trace ======================== [dims@dims-desktop test]$java -cp . Main equals 1: class JAXBElement equals 2: null equals 3: JAXBElement equals 4: class JAXBElement equals 5: null Uncaught exception in main: java.lang.NullPointerException at org.apache.harmony.lang.reflect.implementation.ParameterizedTypeImpl.equals(ParameterizedTypeImpl.java:57) at Main.main(Main.java:24) ========================= Test Case ======================= import java.lang.reflect.Method; import java.lang.reflect.Type; public class Main { public static void main(String[] args) throws Exception { Method[] methods = CalendarStringArray.class.getDeclaredMethods(); for (int i = 0; i < methods.length; i++) { Method method = methods[i]; for (int j = 0; j < methods.length; j++) { Method method2 = methods[j]; Type[] types = method.getGenericParameterTypes(); if (types.length <= 0) continue; Type parameterType = types[0]; Type returnType = method2.getGenericReturnType(); if (parameterType.equals(returnType)) { System.out.println(" Method : " + method.getName() + " Method2 : " + method2.getName()); System.out.println(" Type : " + parameterType); } } } } } class JAXBElement { } class CalendarStringArray { protected JAXBElement calendarStringArray; public JAXBElement getCalendarStringArray() { return calendarStringArray; } public void setCalendarStringArray(JAXBElement value) { this.calendarStringArray = ((JAXBElement) value); } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.