summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2009-04-14 11:57:00 +0000
committerRich Hickey <richhickey@gmail.com>2009-04-14 11:57:00 +0000
commit3dd4c1cf18ea8456b5b4aec607cd54ecfdd85eea (patch)
treed38a6d0fb276a92e6d841ee6795c7b0cb57caa3b
parente05a1ad58a40a80f2a33e390184e109d5a8bce4f (diff)
added file names in reflection warnings, patch from Toralf Wittner
-rw-r--r--src/jvm/clojure/lang/Compiler.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/jvm/clojure/lang/Compiler.java b/src/jvm/clojure/lang/Compiler.java
index a465785b..51a64d27 100644
--- a/src/jvm/clojure/lang/Compiler.java
+++ b/src/jvm/clojure/lang/Compiler.java
@@ -180,7 +180,7 @@ static final public Var SOURCE = Var.intern(Namespace.findOrCreate(Symbol.create
//String
static final public Var SOURCE_PATH = Var.intern(Namespace.findOrCreate(Symbol.create("clojure.core")),
- Symbol.create("*file*"), null);
+ Symbol.create("*file*"), "NO_SOURCE_PATH");
//String
static final public Var COMPILE_PATH = Var.intern(Namespace.findOrCreate(Symbol.create("clojure.core")),
@@ -866,8 +866,8 @@ static class InstanceFieldExpr extends FieldExpr implements AssignableExpr{
if(field == null && RT.booleanCast(RT.WARN_ON_REFLECTION.deref()))
{
((PrintWriter) RT.ERR.deref())
- .format("Reflection warning, line: %d - reference to field %s can't be resolved.\n", line,
- fieldName);
+ .format("Reflection warning, %s:%d - reference to field %s can't be resolved.\n",
+ SOURCE_PATH.deref(), line, fieldName);
}
}
@@ -1129,7 +1129,8 @@ static class InstanceMethodExpr extends MethodExpr{
if(method == null && RT.booleanCast(RT.WARN_ON_REFLECTION.deref()))
{
((PrintWriter) RT.ERR.deref())
- .format("Reflection warning, line: %d - call to %s can't be resolved.\n", line, methodName);
+ .format("Reflection warning, %s:%d - call to %s can't be resolved.\n",
+ SOURCE_PATH.deref(), line, methodName);
}
}
@@ -1270,7 +1271,8 @@ static class StaticMethodExpr extends MethodExpr{
if(method == null && RT.booleanCast(RT.WARN_ON_REFLECTION.deref()))
{
((PrintWriter) RT.ERR.deref())
- .format("Reflection warning, line: %d - call to %s can't be resolved.\n", line, methodName);
+ .format("Reflection warning, %s:%d - call to %s can't be resolved.\n",
+ SOURCE_PATH.deref(), line, methodName);
}
}
@@ -2114,7 +2116,8 @@ public static class NewExpr implements Expr{
if(ctor == null && RT.booleanCast(RT.WARN_ON_REFLECTION.deref()))
{
((PrintWriter) RT.ERR.deref())
- .format("Reflection warning, line: %d - call to %s ctor can't be resolved.\n", line, c.getName());
+ .format("Reflection warning, %s:%d - call to %s ctor can't be resolved.\n",
+ SOURCE_PATH.deref(), line, c.getName());
}
}