8000 Revert "CLJ-2890: WiP" · clojure/clojure@58d0225 · GitHub
[go: up one dir, main page]

Skip to content

Commit 58d0225

Browse files
committed
Revert "CLJ-2890: WiP"
This reverts commit 2bb190f.
1 parent 2bb190f commit 58d0225

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

src/clj/clojure/genclass.clj

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -101,27 +101,7 @@
101101
'char Character/TYPE
102102
'chars (Class/forName "[C")})
103103

104-
(defn- maybe-array-descriptor [x]
105-
(if-let [dim (and (symbol? x)
106-
(namespace x)
107-
(clojure.lang.Util/isPosDigit (name x))
108-
(-> x name (.charAt 0) int (- (int \0))))]
109-
(let [cn (namespace x)
110-
classname (if (some #{\.} cn) cn (str "java.lang." cn))]
111-
(str (String/join "" ^Iterable (repeat dim "[")) "L" classname ";"))
112-
(str x)))
113-
114-
(defn- ^Class the-class [x]
115-
(cond
116-
(class? x) x
117-
(contains? prim->class x) (prim->class x)
118-
:else (let [strx (maybe-array-descriptor x)]
119-
(clojure.lang.RT/classForName
120-
(if (some #{\. \[} strx)
121-
strx
122-
(str "java.lang." strx))))))
123-
124-
#_(defn- ^Class the-class [x]
104+
(defn- ^Class the-class [x]
125105
(cond
126106
(class? x) x
127107
(contains? prim->class x) (prim->class x)

src/jvm/clojure/lang/Util.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static public Object loadWithClass(String scriptbase, Class<?> loadFrom) throws
256256
}
257257
}
258258

259-
public static boolean isPosDigit(String s) {
259+
static boolean isPosDigit(String s) {
260260
if(s.length() != 1)
261261
return false;
262262
char ch = s.charAt(0);

0 commit comments

Comments
 (0)
0