From a81879129a5887061cbcd6739e7c98888d8c4c28 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Wed, 3 Sep 2014 16:24:15 -0600 Subject: [PATCH] add a TODO comment about class comparison --- classpath/avian/Classes.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/classpath/avian/Classes.java b/classpath/avian/Classes.java index 17b7d864a8..0bd05310fb 100644 --- a/classpath/avian/Classes.java +++ b/classpath/avian/Classes.java @@ -394,6 +394,13 @@ public class Classes { } private static boolean match(VMClass a, VMClass b) { + // TODO: in theory we should be able to just do an == comparison + // here instead of recursively comparing array element types. + // However, the VM currently can create multiple array classes for + // the same element type. We should fix that so that there's only + // ever one of each per classloader, eliminating the need for a + // recursive comparison. See also the native implementation of + // isAssignableFrom. if (a.arrayDimensions > 0) { return match(a.arrayElementClass, b.arrayElementClass); } else {