From: aclement Date: Fri, 24 Oct 2008 20:38:35 +0000 (+0000) Subject: 251940: fix X-Git-Tag: V1_6_3rc1~137 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6f955f1680d2622538cbded6bbe9e70e3468b0f5;p=aspectj.git 251940: fix --- 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 c4533f5f5..771528dc6 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 @@ -1016,7 +1016,8 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour public void acceptResult(CompilationResult unitResult) { // end of compile, must now write the results to the output destination // this is either a jar file or a file in a directory - if (!unitResult.hasErrors() || proceedOnError()) { + boolean hasErrors = unitResult.hasErrors(); + if (!hasErrors || proceedOnError()) { Collection classFiles = unitResult.compiledTypes.values(); boolean shouldAddAspectName = (buildConfig.getOutxmlName() != null); for (Iterator iter = classFiles.iterator(); iter.hasNext();) { @@ -1024,19 +1025,22 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour String filename = new String(classFile.fileName()); String classname = filename.replace('/', '.'); filename = filename.replace('/', File.separatorChar) + ".class"; + try { if (buildConfig.getOutputJar() == null) { String outfile = writeDirectoryEntry(unitResult, classFile, filename); if (environmentSupportsIncrementalCompilation) { - ResolvedType type = getBcelWorld().resolve(classname); - if (type.isAspect()) { - state.recordAspectClassFile(outfile); + if (!classname.endsWith("$ajcMightHaveAspect")) { + ResolvedType type = getBcelWorld().resolve(classname); + if (type.isAspect()) { + state.recordAspectClassFile(outfile); + } } } } else { writeZipEntry(classFile, filename); } - if (shouldAddAspectName) + if (shouldAddAspectName && !classname.endsWith("$ajcMightHaveAspect")) addAspectName(classname, unitResult.getFileName()); } catch (IOException ex) { IMessage message = EclipseAdapterUtils.makeErrorMessage(new String(unitResult.fileName),