diff options
author | acolyer <acolyer> | 2004-04-02 12:47:35 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-04-02 12:47:35 +0000 |
commit | c336c84dab93f27bc473b7a6987259cdca5815ec (patch) | |
tree | e6b0571f7fee58738f76058a8624ffefde2d6dce /org.aspectj.ajdt.core | |
parent | 0521e79aea0550b1357a7ccc6a5050f8ce27ce9b (diff) | |
download | aspectj-c336c84dab93f27bc473b7a6987259cdca5815ec.tar.gz aspectj-c336c84dab93f27bc473b7a6987259cdca5815ec.zip |
fix for NPE EclipseAdaptorUtils.java:147
as reported by Wes.
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | 2 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EclipseAdapterUtils.java | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java index 0b93dc564..608aea62d 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java @@ -648,7 +648,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc } } catch (IOException ex) { IMessage message = EclipseAdapterUtils.makeErrorMessage( - unitResult.compilationUnit, + new String(unitResult.fileName), CANT_WRITE_RESULT, ex); handler.handleMessage(message); diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EclipseAdapterUtils.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EclipseAdapterUtils.java index e75143db5..1b834853e 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EclipseAdapterUtils.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EclipseAdapterUtils.java @@ -149,6 +149,13 @@ public class EclipseAdapterUtils { IMessage msg = new Message(text,IMessage.ERROR,ex,loc); return msg; } + + public static IMessage makeErrorMessage(String srcFile, String text, Exception ex) { + ISourceLocation loc = new SourceLocation(new File(srcFile), + 0,0,0,""); + IMessage msg = new Message(text,IMessage.ERROR,ex,loc); + return msg; + } private EclipseAdapterUtils() { } |