From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14025 invoked by alias); 15 Aug 2007 16:50:08 -0000 Received: (qmail 13934 invoked by uid 22791); 15 Aug 2007 16:50:06 -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; Wed, 15 Aug 2007 16:50:02 +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 l7FGo0ZH021134 for ; Wed, 15 Aug 2007 12:50:00 -0400 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 l7FGnxkw026800 for ; Wed, 15 Aug 2007 12:49:59 -0400 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 l7FGnwjB001862; Wed, 15 Aug 2007 12:49:58 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 48C55378B14; Wed, 15 Aug 2007 10:31:07 -0600 (MDT) To: GCJ-patches Subject: Patch: FYI: Class.internalGetFields From: Tom Tromey Reply-To: Tom Tromey X-Attribution: Tom Date: Wed, 15 Aug 2007 16:50:00 -0000 Message-ID: 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-q3/txt/msg00175.txt.bz2 This changes Class.internalGetFields not to reorder fields. This ought to let JNA work. Tom Index: ChangeLog from Tom Tromey * java/lang/Class.java (internalGetFields): Use LinkedHashSet. * classpath/lib/java/lang/Class.class: Rebuilt. Index: java/lang/Class.java =================================================================== --- java/lang/Class.java (revision 127484) +++ java/lang/Class.java (working copy) @@ -56,7 +56,7 @@ import java.security.ProtectionDomain; import java.util.ArrayList; import java.util.Arrays; -import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.HashMap; import java.util.Collection; import java.lang.reflect.AnnotatedElement; @@ -473,7 +473,7 @@ */ private Field[] internalGetFields() { - HashSet set = new HashSet(); + LinkedHashSet set = new LinkedHashSet(); set.addAll(Arrays.asList(getDeclaredFields(true))); Class[] interfaces = getInterfaces(); for (int i = 0; i < interfaces.length; i++)