[Jython-checkins] jython: Restore ordering of method list in PyJavaType.

jeff.allen jython-checkins at python.org
Thu Apr 19 17:25:51 EDT 2018


https://hg.python.org/jython/rev/2adcf0e29407
changeset:   8157:2adcf0e29407
user:        Jeff Allen <ja.py at farowl.co.uk>
date:        Thu Apr 19 22:16:21 2018 +0100
summary:
  Restore ordering of method list in PyJavaType.

Accidentally displaced in previous refactoring. (Oddly, Issue2391AttrOrderTest
passed.)

files:
  src/org/python/core/PyJavaType.java |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/src/org/python/core/PyJavaType.java b/src/org/python/core/PyJavaType.java
--- a/src/org/python/core/PyJavaType.java
+++ b/src/org/python/core/PyJavaType.java
@@ -410,8 +410,6 @@
                 }
             }
             methods = allMethods.toArray(new Method[allMethods.size()]);
-            // Methods must be in resolution order. See issue #2391 for detail.
-            Arrays.sort(methods, new MethodComparator(new ClassComparator()));
 
             // All the fields on just this class
             fields = forClass.getDeclaredFields();
@@ -430,6 +428,8 @@
                 }
             }
         }
+        // Methods must be in resolution order. See issue #2391 for detail.
+        Arrays.sort(methods, new MethodComparator(new ClassComparator()));
 
         // Add methods, also accumulating them in reflectedFuncs, and spotting Java Bean members.
         ArrayList<PyReflectedFunction> reflectedFuncs = new ArrayList<>(methods.length);

-- 
Repository URL: https://hg.python.org/jython


More information about the Jython-checkins mailing list