Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 66600 invoked from network); 23 Apr 2008 11:56:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Apr 2008 11:56:49 -0000 Received: (qmail 19241 invoked by uid 500); 23 Apr 2008 11:56:50 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 19201 invoked by uid 500); 23 Apr 2008 11:56:50 -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 19150 invoked by uid 99); 23 Apr 2008 11:56:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2008 04:56:50 -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 11:56:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A3D83234C0FC for ; Wed, 23 Apr 2008 04:53:21 -0700 (PDT) Message-ID: <690167867.1208951601669.JavaMail.jira@brutus> Date: Wed, 23 Apr 2008 04:53:21 -0700 (PDT) From: "Alexey Varlamov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Resolved: (HARMONY-5780) [drlvm][kernel] NPE in ParameterizedTypeImpl.equals In-Reply-To: <1409837616.1208944761423.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-5780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey Varlamov resolved HARMONY-5780. -------------------------------------- Resolution: Fixed Fix Version/s: 5.0M6 Fixed at revision: 650838. > [drlvm][kernel] NPE in ParameterizedTypeImpl.equals > --------------------------------------------------- > > Key: HARMONY-5780 > URL: https://issues.apache.org/jira/browse/HARMONY-5780 > Project: Harmony > Issue Type: Bug > Components: App-Oriented Bug Reports, DRLVM > Reporter: Davanum Srinivas > Assignee: Alexey Varlamov > Fix For: 5.0M6 > > > 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.