Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updated to Java commit 49f63b2 (2012.08.18): bases should return a se…

…q, not a Java array
  • Loading branch information...
commit f16381809b027bc55cbaa69e4a1f5bb7496c5c7f 1 parent 1988bd7
David Miller authored
5  Clojure/Clojure.Source/clojure/core.clj
@@ -4915,10 +4915,9 @@
4915 4915
    :static true}
4916 4916
   [^Type c]                             ;;;  Class ==> Type
4917 4917
   (when c
4918  
-    (let [i (.GetInterfaces c)             ;;;  .getInterfaces ==> .GetInterfaces
  4918
+    (let [i (seq (.GetInterfaces c))             ;;;  .getInterfaces ==> .GetInterfaces
4919 4919
           s (.BaseType c)]                 ;;;  .getSuperclass ==> BaseType
4920  
-      (not-empty
4921  
-        (if s (cons s i) i)))))
  4920
+      (if s (cons s i) i))))
4922 4921
 
4923 4922
 (defn supers
4924 4923
   "Returns the immediate and indirect superclasses and interfaces of c, if any"
7  Clojure/Clojure.Tests/clojure/test_clojure/java_interop.clj
@@ -127,6 +127,7 @@
127 127
 ;;;        (:missing b :default) :default
128 128
 ;;;        (get b :missing) nil
129 129
 ;;;        (get b :missing :default) :default
  130
+
130 131
 ;;;        (:class b) java.awt.Color )))
131 132
 
132 133
 
@@ -152,6 +153,12 @@
152 153
   (are [x y] (= x y)
153 154
       (bases  System.Math)                                      ;;; java.lang.Math)
154 155
         (list System.Object)                                    ;;; java.lang.Object)
  156
+      (bases System.Collections.ICollection)                    ;;; java.util.Collection)
  157
+        (list System.Collections.IEnumerable)                   ;;; java.lang.Iterable)
  158
+      (bases System.Object)                                     ;;; java.lang.Object)
  159
+        nil
  160
+      (bases System.IComparable)                                ;;; java.lang.Comparable)
  161
+        nil
155 162
       (bases System.Int32)                                      ;;; java.lang.Integer)
156 163
         (list System.ValueType System.IComparable System.IFormattable System.IConvertible |System.IComparable`1[System.Int32]| |System.IEquatable`1[System.Int32]|) ))  ;;; (java.lang.Number java.lang.Comparable)
157 164
 

0 notes on commit f163818

Please sign in to comment.
Something went wrong with that request. Please try again.