public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Patch: FYI: Class.internalGetFields
@ 2007-08-15 16:50 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2007-08-15 16:50 UTC (permalink / raw)
  To: GCJ-patches

This changes Class.internalGetFields not to reorder fields.
This ought to let JNA work.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* 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++)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-15 16:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-15 16:50 Patch: FYI: Class.internalGetFields Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).