aboutsummaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'bridge')
-rw-r--r--bridge/src/main/java/org/aspectj/bridge/MessageUtil.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java b/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java
index 7ef4e92ab..4f5e6067b 100644
--- a/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java
+++ b/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java
@@ -798,10 +798,14 @@ public class MessageUtil {
return "((IMessage) null)";
}
+ String result = message.getKind().toString();
ISourceLocation loc = message.getSourceLocation();
- String locString = (null == loc ? "" : " at " + loc);
-
- String result = message.getKind() + locString + " " + message.getMessage();
+ if (loc != null) {
+ String context = loc.getContext();
+ result += context == null || context.trim().isEmpty() ? " at " : " at\n";
+ result += loc;
+ }
+ result += " " + message.getMessage();
Throwable thrown = message.getThrown();
if (thrown != null) {