summaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core/src
diff options
context:
space:
mode:
authoraclement <aclement>2004-05-14 09:26:03 +0000
committeraclement <aclement>2004-05-14 09:26:03 +0000
commit66818c77ef60abcd8562e0482fe44541ad185c0a (patch)
tree268f52b41dbd77f78cc3735c47ead84227d10070 /org.aspectj.ajdt.core/src
parenta4afa08a96f66c4de0edc676f9c4723cf0819f9e (diff)
downloadaspectj-66818c77ef60abcd8562e0482fe44541ad185c0a.tar.gz
aspectj-66818c77ef60abcd8562e0482fe44541ad185c0a.zip
Fix for Bugzilla Bug 62073
false ambigous binding error (introduced in 1.2rc2)
Diffstat (limited to 'org.aspectj.ajdt.core/src')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/WeaverMessageHandler.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/WeaverMessageHandler.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/WeaverMessageHandler.java
index 5f2f49f72..71017a6c3 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/WeaverMessageHandler.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/WeaverMessageHandler.java
@@ -49,6 +49,19 @@ public class WeaverMessageHandler implements IMessageHandler {
if (! (message.isError() || message.isWarning()) ) return sink.handleMessage(message);
// we only care about warnings and errors here...
ISourceLocation sLoc = message.getSourceLocation();
+
+ // See bug 62073. We should assert that the caller pass the correct primary source location.
+ // But for AJ1.2 final we will simply do less processing of the locations if that is not the
+ // case (By calling sink.handleMessage()) - this ensures we don't put out bogus source context info.
+ if (sLoc instanceof EclipseSourceLocation) {
+ EclipseSourceLocation esLoc = (EclipseSourceLocation)sLoc;
+ if (currentlyWeaving!=null && esLoc.getCompilationResult()!=null) {
+ if (!currentlyWeaving.equals(((EclipseSourceLocation)sLoc).getCompilationResult()))
+ return sink.handleMessage(message);
+ // throw new RuntimeException("Primary source location must match the file we are currently processing!");
+ }
+ }
+
CompilationResult problemSource = currentlyWeaving;
if (problemSource == null) {
// must be a problem found during completeTypeBindings phase of begin to compile