diff options
| author | Aaron Bedra <aaron@aaronbedra.com> | 2011-01-07 15:09:01 -0500 |
|---|---|---|
| committer | Stuart Halloway <stu@Stuart-Halloways-MacBook-Air.local> | 2011-02-25 14:34:03 -0500 |
| commit | 8cea3d8a2b4b4374668d8d24845de74c505d3a3a (patch) | |
| tree | 20fd7b1ce158cdb188b3142df1310f3424493de6 | |
| parent | cc28586e490b5aebc6633c6060397a3369094e5e (diff) | |
use clojure.lang.Util.classOf() instead of getClass() to avoid NPE in (case nil ... ) inside of constantType. Don't do the work and just return java.lang.Object if class is NULL.
Signed-off-by: Stuart Halloway <stu@Stuart-Halloways-MacBook-Air.local>
| -rw-r--r-- | src/jvm/clojure/lang/Compiler.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jvm/clojure/lang/Compiler.java b/src/jvm/clojure/lang/Compiler.java index 4a2deb2c..1fc3aceb 100644 --- a/src/jvm/clojure/lang/Compiler.java +++ b/src/jvm/clojure/lang/Compiler.java @@ -4571,8 +4571,8 @@ static public class ObjExpr implements Expr{ Type constantType(int id){ Object o = constants.nth(id); - Class c = o.getClass(); - if(Modifier.isPublic(c.getModifiers())) + Class c = clojure.lang.Util.classOf(o); + if(c!= null && Modifier.isPublic(c.getModifiers())) { //can't emit derived fn types due to visibility if(LazySeq.class.isAssignableFrom(c)) |
