issue_id
int64
2.04k
425k
title
stringlengths
9
251
body
stringlengths
4
32.8k
status
stringclasses
6 values
after_fix_sha
stringlengths
7
7
project_name
stringclasses
6 values
repo_url
stringclasses
6 values
repo_name
stringclasses
6 values
language
stringclasses
1 value
issue_url
null
before_fix_sha
null
pull_url
null
commit_datetime
timestamp[us, tz=UTC]
report_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
23
187
chunk_content
stringlengths
1
22k
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
public static boolean CHECK_STATE_FIRST = true; public static IStateListener stateListener = null; public static boolean FORCE_INCREMENTAL_DURING_TESTING = false; private final AjBuildManager buildManager; private boolean couldBeSubsequentIncrementalBuild = false; private INameEnvironment nameEnvironment; private AsmManager structureModel; /** * When looking at changes on the classpath, this set accumulates files in our state instance that affected by those changes. * Then if we can do an incremental build - these must be compiled. */ private final Set affectedFiles = new HashSet(); private long lastSuccessfulFullBuildTime = -1; private final Hashtable structuralChangesSinceLastFullBuild = new Hashtable(); private long lastSuccessfulBuildTime = -1; private long currentBuildTime = -1; private AjBuildConfig buildConfig; private boolean batchBuildRequiredThisTime = false; /** * Keeps a list of (FQN,Filename) pairs (as ClassFile objects) for types that resulted from the compilation of the given File. * Note :- the ClassFile objects contain no byte code, they are simply a Filename,typename pair. *
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
* Populated in noteResult and used in addDependentsOf(File) * * Added by AMC during state refactoring, 1Q06. */ private final MapfullyQualifiedTypeNamesResultingFromCompilationUnit = new HashMap(); /** * Source files defining aspects * * Populated in noteResult and used in processDeletedFiles * * Added by AMC during state refactoring, 1Q06. */ private final SetsourceFilesDefiningAspects = new HashSet(); /** * Populated in noteResult to record the set of types that should be recompiled if the given file is modified or deleted. * * Refered to during addAffectedSourceFiles when calculating incremental compilation set. */ private final Mapreferences = new HashMap(); /** * Holds UnwovenClassFiles (byte[]s) originating from the given file source. This could be a jar file, a directory, or an * individual .class file. This is an *expensive* map. It is cleared immediately following a batch build, and the cheaper * inputClassFilesBySource map is kept for processing of any subsequent incremental builds. * * Populated during AjBuildManager.initBcelWorld(). * * Passed into AjCompiler adapter as the set of binary input files to reweave if the weaver determines a full weave is required. * * Cleared during initBcelWorld prior to repopulation. *
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
* Used when a file is deleted during incremental compilation to delete all of the class files in the output directory that * resulted from the weaving of File. * * Used during getBinaryFilesToCompile when compiling incrementally to determine which files should be recompiled if a given * input file has changed. * */ private MapbinarySourceFiles = new HashMap(); /** * Initially a duplicate of the information held in binarySourceFiles, with the key difference that the values are ClassFiles * (type name, File) not UnwovenClassFiles (which also have all the byte code in them). After a batch build, binarySourceFiles * is cleared, leaving just this much lighter weight map to use in processing subsequent incremental builds. */ private final MapinputClassFilesBySource = new HashMap(); /** * A list of the .class files created by this state that contain aspects. */ private final ListaspectClassFiles = new ArrayList(); /** * Holds structure information on types as they were at the end of the last build. It would be nice to get rid of this too, but * can't see an easy way to do that right now. */ private final MapresolvedTypeStructuresFromLastBuild = new HashMap(); /** * Populated in noteResult to record the set of UnwovenClassFiles (intermediate results) that originated from compilation of the * class with the given fully-qualified name. * * Used in removeAllResultsOfLastBuild to remove .class files from output directory. * * Passed into StatefulNameEnvironment during incremental compilation to support findType lookups.
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
*/ private final MapclassesFromName = new HashMap(); /** * Populated by AjBuildManager to record the aspects with the file name in which they're contained. This is later used when * writing the outxml file in AjBuildManager. Need to record the file name because want to write an outxml file for each of the * output directories and in order to ask the OutputLocationManager for the output location for a given aspect we need the file * in which it is contained. */ private Map aspectsFromFileNames; private SetcompiledSourceFiles = new HashSet(); private final Listresources = new ArrayList(); private StringSet qualifiedStrings = new StringSet(3); private StringSet simpleStrings = new StringSet(3); private Set addedFiles; private Set deletedFiles; private Set addedBinaryFiles; private Set deletedBinaryFiles; private BcelWeaver weaver; private BcelWorld world; public AjState(AjBuildManager buildManager) { this.buildManager = buildManager; } public void setCouldBeSubsequentIncrementalBuild(boolean yesThereCould) { this.couldBeSubsequentIncrementalBuild = yesThereCould; } void successfulCompile(AjBuildConfig config, boolean wasFullBuild) { buildConfig = config;
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
lastSuccessfulBuildTime = currentBuildTime; if (stateListener != null) stateListener.buildSuccessful(wasFullBuild); if (wasFullBuild) lastSuccessfulFullBuildTime = currentBuildTime; } /** * Returns false if a batch build is needed. */ public boolean prepareForNextBuild(AjBuildConfig newBuildConfig) { currentBuildTime = System.currentTimeMillis(); if (!maybeIncremental()) { if (listenerDefined()) getListener().recordDecision( "Preparing for build: not going to be incremental because either not in AJDT or incremental deactivated"); return false; } if (this.batchBuildRequiredThisTime) { this.batchBuildRequiredThisTime = false; if (listenerDefined()) getListener().recordDecision( "Preparing for build: not going to be incremental this time because batch build explicitly forced"); return false; } if (lastSuccessfulBuildTime == -1 || buildConfig == null) { structuralChangesSinceLastFullBuild.clear(); if (listenerDefined()) getListener().recordDecision( "Preparing for build: not going to be incremental because no successful previous full build"); return false;
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} if (newBuildConfig.getOutputJar() != null) { structuralChangesSinceLastFullBuild.clear(); if (listenerDefined()) getListener().recordDecision("Preparing for build: not going to be incremental because outjar being used"); return false; } affectedFiles.clear(); if (pathChange(buildConfig, newBuildConfig)) { removeAllResultsOfLastBuild(); if (stateListener != null) { stateListener.pathChangeDetected(); } structuralChangesSinceLastFullBuild.clear(); if (listenerDefined()) getListener() .recordDecision( "Preparing for build: not going to be incremental because path change detected (one of classpath/aspectpath/inpath/injars)"); return false; } if (simpleStrings.elementSize > 20) { simpleStrings = new StringSet(3);
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} else { simpleStrings.clear(); } if (qualifiedStrings.elementSize > 20) { qualifiedStrings = new StringSet(3); } else { qualifiedStrings.clear(); } if ((newBuildConfig.getChanged() & PROJECTSOURCEFILES_CHANGED) == 0) { addedFiles = Collections.EMPTY_SET; deletedFiles = Collections.EMPTY_SET; } else { Set oldFiles = new HashSet(buildConfig.getFiles()); Set newFiles = new HashSet(newBuildConfig.getFiles()); addedFiles = new HashSet(newFiles); addedFiles.removeAll(oldFiles); deletedFiles = new HashSet(oldFiles); deletedFiles.removeAll(newFiles); } Set oldBinaryFiles = new HashSet(buildConfig.getBinaryFiles()); Set newBinaryFiles = new HashSet(newBuildConfig.getBinaryFiles()); addedBinaryFiles = new HashSet(newBinaryFiles); addedBinaryFiles.removeAll(oldBinaryFiles); deletedBinaryFiles = new HashSet(oldBinaryFiles); deletedBinaryFiles.removeAll(newBinaryFiles); boolean couldStillBeIncremental = processDeletedFiles(deletedFiles); if (!couldStillBeIncremental) { if (listenerDefined()) getListener().recordDecision("Preparing for build: not going to be incremental because an aspect was deleted"); return false;
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} if (listenerDefined()) getListener().recordDecision("Preparing for build: planning to be an incremental build"); return true; } /** * Checks if any of the files in the set passed in contains an aspect declaration. If one is found then we start the process of * batch building, i.e. we remove all the results of the last build, call any registered listener to tell them whats happened * and return false. * * @return false if we discovered an aspect declaration */ private boolean processDeletedFiles(Set deletedFiles) { for (Iterator iter = deletedFiles.iterator(); iter.hasNext();) { File aDeletedFile = (File) iter.next(); if (this.sourceFilesDefiningAspects.contains(aDeletedFile)) { removeAllResultsOfLastBuild(); if (stateListener != null) { stateListener.detectedAspectDeleted(aDeletedFile); } return false; } Listclasses = (List) fullyQualifiedTypeNamesResultingFromCompilationUnit.get(aDeletedFile); if (classes != null) { for (Iterator iterator = classes.iterator(); iterator.hasNext();) { ClassFile element = (ClassFile) iterator.next(); resolvedTypeStructuresFromLastBuild.remove(element.fullyQualifiedTypeName); } } }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
return true; } private Collection getModifiedFiles() { return getModifiedFiles(lastSuccessfulBuildTime); } Collection getModifiedFiles(long lastBuildTime) { Set ret = new HashSet(); ListmodifiedFiles = buildConfig.getModifiedFiles(); if (modifiedFiles == null) { for (Iterator i = buildConfig.getFiles().iterator(); i.hasNext();) { File file = (File) i.next(); if (!file.exists()) continue; long modTime = file.lastModified(); if (modTime + 1000 > lastBuildTime) { ret.add(file); } } } else { ret.addAll(modifiedFiles); } ret.addAll(affectedFiles); return ret; } private Collection getModifiedBinaryFiles() {
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
return getModifiedBinaryFiles(lastSuccessfulBuildTime); } Collection getModifiedBinaryFiles(long lastBuildTime) { List ret = new ArrayList(); for (Iterator i = buildConfig.getBinaryFiles().iterator(); i.hasNext();) { AjBuildConfig.BinarySourceFile bsfile = (AjBuildConfig.BinarySourceFile) i.next(); File file = bsfile.binSrc; if (!file.exists()) continue; long modTime = file.lastModified(); if (modTime + 1000 >= lastBuildTime) { ret.add(bsfile); } } return ret; } private static int CLASS_FILE_NO_CHANGES = 0; private static int CLASS_FILE_CHANGED_THAT_NEEDS_INCREMENTAL_BUILD = 1; private static int CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD = 2; private static int MAX_AFFECTED_FILES_BEFORE_FULL_BUILD = 30; public static final FileFilter classFileFilter = new FileFilter() { public boolean accept(File pathname) { return pathname.getName().endsWith(".class"); } }; /** * Analyse .class files in the directory specified, if they have changed since the last successful build then see if we can
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
* determine which source files in our project depend on the change. If we can then we can still do an incremental build, if we * can't then we have to do a full build. * */ private int classFileChangedInDirSinceLastBuildRequiringFullBuild(File dir) { if (!dir.isDirectory()) { return CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD; } AjState state = IncrementalStateManager.findStateManagingOutputLocation(dir); if (listenerDefined()) { if (state != null) { getListener().recordDecision("Found state instance managing output location : " + dir); } else { getListener().recordDecision("Failed to find a state instance managing output location : " + dir); } } if (state != null && !state.hasAnyStructuralChangesSince(lastSuccessfulBuildTime)) { if (listenerDefined()) { getListener().recordDecision("No reported changes in that state"); } return CLASS_FILE_NO_CHANGES; } List classFiles = FileUtil.listClassFiles(dir); for (Iterator iterator = classFiles.iterator(); iterator.hasNext();) { File classFile = (File) iterator.next();
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
if (CHECK_STATE_FIRST && state != null) { if (state.isAspect(classFile)) { return CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD; } if (state.hasStructuralChangedSince(classFile, lastSuccessfulBuildTime)) { if (listenerDefined()) { getListener().recordDecision("Structural change detected in : " + classFile); } if (isTypeWeReferTo(classFile)) { if (affectedFiles.size() > MAX_AFFECTED_FILES_BEFORE_FULL_BUILD) return CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD; } } } else { long modTime = classFile.lastModified(); if ((modTime + 1000) >= lastSuccessfulBuildTime) { if (state != null) { if (state.isAspect(classFile)) { return CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD; } if (state.hasStructuralChangedSince(classFile, lastSuccessfulBuildTime)) {
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
if (listenerDefined()) { getListener().recordDecision("Structural change detected in : " + classFile); } if (isTypeWeReferTo(classFile)) { if (affectedFiles.size() > MAX_AFFECTED_FILES_BEFORE_FULL_BUILD) return CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD; } } else { if (listenerDefined()) getListener().recordDecision("Change detected in " + classFile + " but it is not structural"); } } else { if (isTypeWeReferTo(classFile)) { if (affectedFiles.size() > MAX_AFFECTED_FILES_BEFORE_FULL_BUILD) return CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD; return CLASS_FILE_CHANGED_THAT_NEEDS_INCREMENTAL_BUILD; } else { return CLASS_FILE_NO_CHANGES; } } } } } return CLASS_FILE_NO_CHANGES; } private boolean isAspect(File file) { return aspectClassFiles.contains(file.getAbsolutePath()); } public static class SoftHashMap extends AbstractMap {
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
private final Map map; private final ReferenceQueue rq = new ReferenceQueue(); public SoftHashMap(Map map) { this.map = map; } public SoftHashMap() { this(new HashMap()); } public SoftHashMap(Map map, boolean b) { this(map); } class SoftReferenceKnownKey extends SoftReference {
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
private final Object key; SoftReferenceKnownKey(Object k, Object v) { super(v, rq); this.key = k; } } private void processQueue() { SoftReferenceKnownKey sv = null; while ((sv = (SoftReferenceKnownKey) rq.poll()) != null) { map.remove(sv.key); } } public Object get(Object key) { SoftReferenceKnownKey value = (SoftReferenceKnownKey) map.get(key); if (value == null) return null; if (value.get() == null) { map.remove(value.key); return null;
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} else { return value.get(); } } public Object put(Object k, Object v) { processQueue(); return map.put(k, new SoftReferenceKnownKey(k, v)); } public Set entrySet() { return map.entrySet(); } public void clear() { processQueue(); map.clear(); } public int size() { processQueue(); return map.size(); } public Object remove(Object k) { processQueue(); SoftReferenceKnownKey value = (SoftReferenceKnownKey) map.remove(k); if (value == null) return null; if (value.get() != null) { return value.get(); } return null; } }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
SoftHashMapfileToClassNameMap = new SoftHashMap(); /** * If a class file has changed in a path on our classpath, it may not be for a type that any of our source files care about. * This method checks if any of our source files have a dependency on the class in question and if not, we don't consider it an * interesting change. */ private boolean isTypeWeReferTo(File file) { String fpath = file.getAbsolutePath(); int finalSeparator = fpath.lastIndexOf(File.separator); String baseDir = fpath.substring(0, finalSeparator); String theFile = fpath.substring(finalSeparator + 1); SoftHashMap classNames = (SoftHashMap) fileToClassNameMap.get(baseDir); if (classNames == null) { classNames = new SoftHashMap(); fileToClassNameMap.put(baseDir, classNames); } char[] className = (char[]) classNames.get(theFile); if (className == null) { ClassFileReader cfr; try { cfr = ClassFileReader.read(file); } catch (ClassFormatException e) { return true; } catch (IOException e) { return true; } className = cfr.getName(); classNames.put(theFile, className);
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} char[][][] qualifiedNames = null; char[][] simpleNames = null; if (CharOperation.indexOf('/', className) != -1) { qualifiedNames = new char[1][][]; qualifiedNames[0] = CharOperation.splitOn('/', className); qualifiedNames = ReferenceCollection.internQualifiedNames(qualifiedNames); } else { simpleNames = new char[1][]; simpleNames[0] = className; simpleNames = ReferenceCollection.internSimpleNames(simpleNames, true); } for (Iterator i = references.entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); ReferenceCollection refs = (ReferenceCollection) entry.getValue(); if (refs != null && refs.includes(qualifiedNames, simpleNames)) { if (listenerDefined()) { getListener().recordDecision( toString() + ": type " + new String(className) + " is depended upon by '" + entry.getKey() + "'"); } affectedFiles.add(entry.getKey()); if (affectedFiles.size() > MAX_AFFECTED_FILES_BEFORE_FULL_BUILD) return true; } } if (affectedFiles.size() > 0)
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
return true; if (listenerDefined()) getListener().recordDecision(toString() + ": type " + new String(className) + " is not depended upon by this state"); return false; } public String toString() { StringBuffer sb = new StringBuffer(); sb.append("AjState(").append((buildConfig == null ? "NULLCONFIG" : buildConfig.getConfigFile().toString())).append(")"); return sb.toString(); } /** * Determine if a file has changed since a given time, using the local information recorded in the structural changes data
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
* structure. * * @param file the file we are wondering about * @param lastSuccessfulBuildTime the last build time for the state asking the question */ private boolean hasStructuralChangedSince(File file, long lastSuccessfulBuildTime) { Long l = (Long) structuralChangesSinceLastFullBuild.get(file.getAbsolutePath()); long strucModTime = -1; if (l != null) strucModTime = l.longValue(); else strucModTime = this.lastSuccessfulFullBuildTime; return (strucModTime > lastSuccessfulBuildTime); } /** * Determine if anything has changed since a given time. */ private boolean hasAnyStructuralChangesSince(long lastSuccessfulBuildTime) { Set entries = structuralChangesSinceLastFullBuild.entrySet(); for (Iterator iterator = entries.iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); Long l = (Long) entry.getValue(); if (l != null) { long lvalue = l.longValue(); if (lvalue > lastSuccessfulBuildTime) { if (listenerDefined()) { getListener().recordDecision(
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
"Seems this has changed " + entry.getKey() + "modtime=" + lvalue + " lsbt=" + this.lastSuccessfulFullBuildTime + " incoming check value=" + lastSuccessfulBuildTime); } return true; } } } return (this.lastSuccessfulFullBuildTime > lastSuccessfulBuildTime); } /** * Determine if something has changed on the classpath/inpath/aspectpath and a full build is required rather than an incremental * one. * * @param previousConfig the previous configuration used * @param newConfig the new configuration being used * @return true if full build required */ private boolean pathChange(AjBuildConfig previousConfig, AjBuildConfig newConfig) { int changes = newConfig.getChanged(); if ((changes & (CLASSPATH_CHANGED | ASPECTPATH_CHANGED | INPATH_CHANGED | OUTPUTDESTINATIONS_CHANGED | INJARS_CHANGED)) != 0) { List oldOutputLocs = getOutputLocations(previousConfig); Set alreadyAnalysedPaths = new HashSet(); List oldClasspath = previousConfig.getClasspath(); List newClasspath = newConfig.getClasspath(); if (stateListener != null) stateListener.aboutToCompareClasspaths(oldClasspath, newClasspath); if (classpathChangedAndNeedsFullBuild(oldClasspath, newClasspath, true, oldOutputLocs, alreadyAnalysedPaths)) return true; List oldAspectpath = previousConfig.getAspectpath(); List newAspectpath = newConfig.getAspectpath();
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
if (changedAndNeedsFullBuild(oldAspectpath, newAspectpath, true, oldOutputLocs, alreadyAnalysedPaths)) return true; List oldInPath = previousConfig.getInpath(); List newInPath = newConfig.getInpath(); if (changedAndNeedsFullBuild(oldInPath, newInPath, false, oldOutputLocs, alreadyAnalysedPaths)) return true; List oldInJars = previousConfig.getInJars(); List newInJars = newConfig.getInJars(); if (changedAndNeedsFullBuild(oldInJars, newInJars, false, oldOutputLocs, alreadyAnalysedPaths)) return true; } else if (newConfig.getClasspathElementsWithModifiedContents() != null) { ListmodifiedCpElements = newConfig.getClasspathElementsWithModifiedContents(); for (Iterator iterator = modifiedCpElements.iterator(); iterator.hasNext();) { File cpElement = new File((String) iterator.next()); if (cpElement.exists() && !cpElement.isDirectory()) { if (cpElement.lastModified() > lastSuccessfulBuildTime) { return true; } } else { int classFileChanges = classFileChangedInDirSinceLastBuildRequiringFullBuild(cpElement); if (classFileChanges == CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD) { return true; } } }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} return false; } /** * Return a list of the output locations - this includes any 'default' output location and then any known by a registered * CompilationResultDestinationManager. * * @param config the build configuration for which the output locations should be determined * @return a list of file objects */ private List getOutputLocations(AjBuildConfig config) { List outputLocs = new ArrayList(); if (config.getOutputDir() != null) { try { outputLocs.add(config.getOutputDir().getCanonicalFile()); } catch (IOException e) { } } if (config.getCompilationResultDestinationManager() != null) { List dirs = config.getCompilationResultDestinationManager().getAllOutputLocations(); for (Iterator iterator = dirs.iterator(); iterator.hasNext();) { File f = (File) iterator.next(); try { File cf = f.getCanonicalFile(); if (!outputLocs.contains(cf)) { outputLocs.add(cf); } } catch (IOException e) { }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} } return outputLocs; } /** * Check the old and new paths, if they vary by length or individual elements then that is considered a change. Or if the last * modified time of a path entry has changed (or last modified time of a classfile in that path entry has changed) then return * true. The outputlocations are supplied so they can be 'ignored' in the comparison. * * @param oldPath * @param newPath * @param checkClassFiles whether to examine individual class files within directories * @param outputLocs the output locations that should be ignored if they occur on the paths being compared * @return true if a change is detected that requires a full build */ private boolean changedAndNeedsFullBuild(List oldPath, List newPath, boolean checkClassFiles, List outputLocs, Set alreadyAnalysedPaths) { if (oldPath.size() != newPath.size()) { return true; } for (int i = 0; i < oldPath.size(); i++) { if (!oldPath.get(i).equals(newPath.get(i))) { return true; }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
Object o = oldPath.get(i); File f = null; if (o instanceof String) { f = new File((String) o); } else { f = (File) o; } if (f.exists() && !f.isDirectory() && (f.lastModified() >= lastSuccessfulBuildTime)) { return true; } if (checkClassFiles && f.exists() && f.isDirectory()) { boolean foundMatch = false; for (Iterator iterator = outputLocs.iterator(); !foundMatch && iterator.hasNext();) { File dir = (File) iterator.next(); if (f.equals(dir)) { foundMatch = true; } } if (!foundMatch) { if (!alreadyAnalysedPaths.contains(f.getAbsolutePath())) { alreadyAnalysedPaths.add(f.getAbsolutePath()); int classFileChanges = classFileChangedInDirSinceLastBuildRequiringFullBuild(f); if (classFileChanges == CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD) return true; } }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} } return false; } /** * Check the old and new paths, if they vary by length or individual elements then that is considered a change. Or if the last * modified time of a path entry has changed (or last modified time of a classfile in that path entry has changed) then return * true. The outputlocations are supplied so they can be 'ignored' in the comparison. * * @param oldPath * @param newPath * @param checkClassFiles whether to examine individual class files within directories * @param outputLocs the output locations that should be ignored if they occur on the paths being compared * @return true if a change is detected that requires a full build */ private boolean classpathChangedAndNeedsFullBuild(List oldPath, List newPath, boolean checkClassFiles, List outputLocs, Set alreadyAnalysedPaths) { if (oldPath.size() != newPath.size()) { return true; } for (int i = 0; i < oldPath.size(); i++) { if (!oldPath.get(i).equals(newPath.get(i))) { return true; }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
File f = new File((String) oldPath.get(i)); if (f.exists() && !f.isDirectory() && (f.lastModified() >= lastSuccessfulBuildTime)) { return true; } if (checkClassFiles && f.exists() && f.isDirectory()) { boolean foundMatch = false; for (Iterator iterator = outputLocs.iterator(); !foundMatch && iterator.hasNext();) { File dir = (File) iterator.next(); if (f.equals(dir)) { foundMatch = true; } } if (!foundMatch) { if (!alreadyAnalysedPaths.contains(f.getAbsolutePath())) { alreadyAnalysedPaths.add(f.getAbsolutePath()); int classFileChanges = classFileChangedInDirSinceLastBuildRequiringFullBuild(f); if (classFileChanges == CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD) return true; } } } } return false; } public Set getFilesToCompile(boolean firstPass) { Set thisTime = new HashSet();
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
if (firstPass) { compiledSourceFiles = new HashSet(); Collection modifiedFiles = getModifiedFiles(); thisTime.addAll(modifiedFiles); if (addedFiles != null) { for (Iterator fIter = addedFiles.iterator(); fIter.hasNext();) { Object o = fIter.next(); if (!thisTime.contains(o)) thisTime.add(o); } } deleteClassFiles(); addAffectedSourceFiles(thisTime, thisTime); } else { addAffectedSourceFiles(thisTime, compiledSourceFiles); } compiledSourceFiles = thisTime; return thisTime;
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} private boolean maybeIncremental() { return (FORCE_INCREMENTAL_DURING_TESTING || this.couldBeSubsequentIncrementalBuild); } public Map getBinaryFilesToCompile(boolean firstTime) { if (lastSuccessfulBuildTime == -1 || buildConfig == null || !maybeIncremental()) { return binarySourceFiles; } Map toWeave = new HashMap(); if (firstTime) { List addedOrModified = new ArrayList(); addedOrModified.addAll(addedBinaryFiles); addedOrModified.addAll(getModifiedBinaryFiles()); for (Iterator iter = addedOrModified.iterator(); iter.hasNext();) { AjBuildConfig.BinarySourceFile bsf = (AjBuildConfig.BinarySourceFile) iter.next(); UnwovenClassFile ucf = createUnwovenClassFile(bsf); if (ucf == null) continue; List ucfs = new ArrayList(); ucfs.add(ucf); recordTypeChanged(ucf.getClassName()); binarySourceFiles.put(bsf.binSrc.getPath(), ucfs); List cfs = new ArrayList(1); cfs.add(getClassFileFor(ucf)); this.inputClassFilesBySource.put(bsf.binSrc.getPath(), cfs); toWeave.put(bsf.binSrc.getPath(), ucfs); } deleteBinaryClassFiles(); } else {
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} return toWeave; } /** * Called when a path change is about to trigger a full build, but we haven't cleaned up from the last incremental build... */ private void removeAllResultsOfLastBuild() { for (Iterator iter = this.inputClassFilesBySource.values().iterator(); iter.hasNext();) { List cfs = (List) iter.next(); for (Iterator iterator = cfs.iterator(); iterator.hasNext();) { ClassFile cf = (ClassFile) iterator.next(); cf.deleteFromFileSystem(buildConfig); } } for (Iterator iterator = classesFromName.values().iterator(); iterator.hasNext();) { File f = (File) iterator.next(); new ClassFile("", f).deleteFromFileSystem(buildConfig); } for (Iterator iter = resources.iterator(); iter.hasNext();) { String resource = (String) iter.next(); List outputDirs = getOutputLocations(buildConfig); for (Iterator iterator = outputDirs.iterator(); iterator.hasNext();) { File dir = (File) iterator.next(); File f = new File(dir, resource); if (f.exists()) { f.delete(); } }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} } private void deleteClassFiles() { if (deletedFiles == null) { return; } for (Iterator i = deletedFiles.iterator(); i.hasNext();) { File deletedFile = (File) i.next(); addDependentsOf(deletedFile); List cfs = (List) this.fullyQualifiedTypeNamesResultingFromCompilationUnit.get(deletedFile); this.fullyQualifiedTypeNamesResultingFromCompilationUnit.remove(deletedFile); if (cfs != null) { for (Iterator iter = cfs.iterator(); iter.hasNext();) { ClassFile cf = (ClassFile) iter.next(); deleteClassFile(cf); } } } } private void deleteBinaryClassFiles() { for (Iterator iter = deletedBinaryFiles.iterator(); iter.hasNext();) { AjBuildConfig.BinarySourceFile deletedFile = (AjBuildConfig.BinarySourceFile) iter.next(); List cfs = (List) this.inputClassFilesBySource.get(deletedFile.binSrc.getPath()); for (Iterator iterator = cfs.iterator(); iterator.hasNext();) { deleteClassFile((ClassFile) iterator.next()); } this.inputClassFilesBySource.remove(deletedFile.binSrc.getPath()); } }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
private void deleteClassFile(ClassFile cf) { classesFromName.remove(cf.fullyQualifiedTypeName); weaver.deleteClassFile(cf.fullyQualifiedTypeName); cf.deleteFromFileSystem(buildConfig); } private UnwovenClassFile createUnwovenClassFile(AjBuildConfig.BinarySourceFile bsf) { UnwovenClassFile ucf = null; try { File outputDir = buildConfig.getOutputDir(); if (buildConfig.getCompilationResultDestinationManager() != null) { outputDir = buildConfig.getCompilationResultDestinationManager().getDefaultOutputLocation(); } ucf = weaver.addClassFile(bsf.binSrc, bsf.fromInPathDirectory, outputDir); } catch (IOException ex) {
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
IMessage msg = new Message("can't read class file " + bsf.binSrc.getPath(), new SourceLocation(bsf.binSrc, 0), false); buildManager.handler.handleMessage(msg); } return ucf; } public void noteResult(InterimCompilationResult result) { if (!maybeIncremental()) { return; } File sourceFile = new File(result.fileName()); CompilationResult cr = result.result(); references.put(sourceFile, new ReferenceCollection(cr.qualifiedReferences, cr.simpleNameReferences)); UnwovenClassFile[] unwovenClassFiles = result.unwovenClassFiles(); for (int i = 0; i < unwovenClassFiles.length; i++) { File lastTimeRound = (File) classesFromName.get(unwovenClassFiles[i].getClassName()); recordClassFile(unwovenClassFiles[i], lastTimeRound); classesFromName.put(unwovenClassFiles[i].getClassName(), new File(unwovenClassFiles[i].getFilename())); } recordWhetherCompilationUnitDefinedAspect(sourceFile, cr); deleteTypesThatWereInThisCompilationUnitLastTimeRoundButHaveBeenDeletedInThisIncrement(sourceFile, unwovenClassFiles); recordFQNsResultingFromCompilationUnit(sourceFile, result); } public void noteNewResult(CompilationResult cr) {
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} /** * @param sourceFile * @param unwovenClassFiles */ private void deleteTypesThatWereInThisCompilationUnitLastTimeRoundButHaveBeenDeletedInThisIncrement(File sourceFile, UnwovenClassFile[] unwovenClassFiles) { List classFiles = (List) this.fullyQualifiedTypeNamesResultingFromCompilationUnit.get(sourceFile); if (classFiles != null) { for (int i = 0; i < unwovenClassFiles.length; i++) {
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
removeFromClassFilesIfPresent(unwovenClassFiles[i].getClassName(), classFiles); } for (Iterator iter = classFiles.iterator(); iter.hasNext();) { ClassFile cf = (ClassFile) iter.next(); deleteClassFile(cf); } } } private void removeFromClassFilesIfPresent(String className, List classFiles) { ClassFile victim = null; for (Iterator iter = classFiles.iterator(); iter.hasNext();) { ClassFile cf = (ClassFile) iter.next(); if (cf.fullyQualifiedTypeName.equals(className)) { victim = cf; break; } } if (victim != null) { classFiles.remove(victim); } } /** * Record the fully-qualified names of the types that were declared in the given source file. * * @param sourceFile, the compilation unit * @param icr, the CompilationResult from compiling it */ private void recordFQNsResultingFromCompilationUnit(File sourceFile, InterimCompilationResult icr) { List classFiles = new ArrayList(); UnwovenClassFile[] types = icr.unwovenClassFiles();
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
for (int i = 0; i < types.length; i++) { classFiles.add(new ClassFile(types[i].getClassName(), new File(types[i].getFilename()))); } this.fullyQualifiedTypeNamesResultingFromCompilationUnit.put(sourceFile, classFiles); } /** * If this compilation unit defined an aspect, we need to know in case it is modified in a future increment. * * @param sourceFile * @param cr */ private void recordWhetherCompilationUnitDefinedAspect(File sourceFile, CompilationResult cr) { this.sourceFilesDefiningAspects.remove(sourceFile); if (cr != null) { Map compiledTypes = cr.compiledTypes; if (compiledTypes != null) { for (Iterator iterator = compiledTypes.keySet().iterator(); iterator.hasNext();) { char[] className = (char[]) iterator.next(); String typeName = new String(className).replace('/', '.'); if (typeName.indexOf(BcelWeaver.SYNTHETIC_CLASS_POSTFIX) == -1) { ResolvedType rt = world.resolve(typeName); if (rt.isMissing()) { } else if (rt.isAspect()) { this.sourceFilesDefiningAspects.add(sourceFile); break; } }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} } } } private void recordClassFile(UnwovenClassFile thisTime, File lastTime) { if (simpleStrings == null) { ResolvedType rType = world.resolve(thisTime.getClassName()); if (!rType.isMissing()) { try { ClassFileReader reader = new ClassFileReader(thisTime.getBytes(), null); this.resolvedTypeStructuresFromLastBuild.put(thisTime.getClassName(), new CompactTypeStructureRepresentation( reader)); } catch (ClassFormatException cfe) {
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
throw new BCException("Unexpected problem processing class", cfe); } } return; } CompactTypeStructureRepresentation existingStructure = (CompactTypeStructureRepresentation) this.resolvedTypeStructuresFromLastBuild .get(thisTime.getClassName()); ResolvedType newResolvedType = world.resolve(thisTime.getClassName()); if (!newResolvedType.isMissing()) { try { ClassFileReader reader = new ClassFileReader(thisTime.getBytes(), null); this.resolvedTypeStructuresFromLastBuild.put(thisTime.getClassName(), new CompactTypeStructureRepresentation(reader)); } catch (ClassFormatException cfe) { throw new BCException("Unexpected problem processing class", cfe); } } if (lastTime == null) { recordTypeChanged(thisTime.getClassName()); return; } if (newResolvedType.isMissing()) { return; } world.ensureAdvancedConfigurationProcessed(); byte[] newBytes = thisTime.getBytes(); try { ClassFileReader reader = new ClassFileReader(newBytes, lastTime.getAbsolutePath().toCharArray()); if (!(reader.isLocal() || reader.isAnonymous())) {
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
if (hasStructuralChanges(reader, existingStructure)) { if (world.forDEBUG_structuralChangesCode) System.err.println("Detected a structural change in " + thisTime.getFilename()); structuralChangesSinceLastFullBuild.put(thisTime.getFilename(), new Long(currentBuildTime)); recordTypeChanged(new String(reader.getName()).replace('/', '.')); } } } catch (ClassFormatException e) { recordTypeChanged(thisTime.getClassName()); } } private static final char[][] EMPTY_CHAR_ARRAY = new char[0][]; /** * Compare the class structure of the new intermediate (unwoven) class with the existingResolvedType of the same class that we * have in the world, looking for any structural differences (and ignoring aj members resulting from weaving....) * * Some notes from Andy... lot of problems here, which I've eventually resolved by building the compactstructure based on a * classfilereader, rather than on a ResolvedType. There are accessors for inner types and funky fields that the compiler * creates to support the language - for non-static inner types it also mangles ctors to be prefixed with an instance of the * surrounding type. * * Warning : long but boring method implementation... * * @param reader * @param existingType * @return */ private boolean hasStructuralChanges(ClassFileReader reader, CompactTypeStructureRepresentation existingType) { if (existingType == null) { return true;
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} if (!modifiersEqual(reader.getModifiers(), existingType.modifiers)) { return true; } if (!CharOperation.equals(reader.getGenericSignature(), existingType.genericSignature)) { return true; } if (!CharOperation.equals(reader.getSuperclassName(), existingType.superclassName)) { return true; } IBinaryAnnotation[] newAnnos = reader.getAnnotations(); if (newAnnos == null || newAnnos.length == 0) { if (existingType.annotations != null && existingType.annotations.length != 0) { return true; } } else { IBinaryAnnotation[] existingAnnos = existingType.annotations; if (existingAnnos == null || existingAnnos.length != newAnnos.length) { return true; } for (int i = 0; i < newAnnos.length; i++) { if (!CharOperation.equals(newAnnos[i].getTypeName(), existingAnnos[i].getTypeName())) { return true; }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} } char[][] existingIfs = existingType.interfaces; char[][] newIfsAsChars = reader.getInterfaceNames(); if (newIfsAsChars == null) { newIfsAsChars = EMPTY_CHAR_ARRAY; } if (existingIfs == null) { existingIfs = EMPTY_CHAR_ARRAY; } if (existingIfs.length != newIfsAsChars.length) return true; new_interface_loop: for (int i = 0; i < newIfsAsChars.length; i++) { for (int j = 0; j < existingIfs.length; j++) { if (CharOperation.equals(existingIfs[j], newIfsAsChars[i])) { continue new_interface_loop; } } return true; } IBinaryField[] newFields = reader.getFields(); if (newFields == null) { newFields = CompactTypeStructureRepresentation.NoField; }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
IBinaryField[] existingFs = existingType.binFields; if (newFields.length != existingFs.length) return true; new_field_loop: for (int i = 0; i < newFields.length; i++) { IBinaryField field = newFields[i]; char[] fieldName = field.getName(); for (int j = 0; j < existingFs.length; j++) { if (CharOperation.equals(existingFs[j].getName(), fieldName)) { if (!modifiersEqual(field.getModifiers(), existingFs[j].getModifiers())) { return true; } if (!CharOperation.equals(existingFs[j].getTypeName(), field.getTypeName())) { return true; } continue new_field_loop; } } return true; } IBinaryMethod[] newMethods = reader.getMethods();
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
if (newMethods == null) { newMethods = CompactTypeStructureRepresentation.NoMethod; }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
IBinaryMethod[] existingMs = existingType.binMethods; if (newMethods.length != existingMs.length) return true; new_method_loop: for (int i = 0; i < newMethods.length; i++) { IBinaryMethod method = newMethods[i]; char[] methodName = method.getSelector(); for (int j = 0; j < existingMs.length; j++) { if (CharOperation.equals(existingMs[j].getSelector(), methodName)) { if (!CharOperation.equals(method.getMethodDescriptor(), existingMs[j].getMethodDescriptor())) {
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
continue; } else { if (!modifiersEqual(method.getModifiers(), existingMs[j].getModifiers())) { return true; } continue new_method_loop; } } } return true; } return false; } private boolean modifiersEqual(int eclipseModifiers, int resolvedTypeModifiers) { resolvedTypeModifiers = resolvedTypeModifiers & ExtraCompilerModifiers.AccJustFlag; eclipseModifiers = eclipseModifiers & ExtraCompilerModifiers.AccJustFlag; return (eclipseModifiers == resolvedTypeModifiers);
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} private String stringifyList(Set l) { StringBuffer sb = new StringBuffer(); sb.append("{"); for (Iterator iter = l.iterator(); iter.hasNext();) { Object el = iter.next(); sb.append(el); if (iter.hasNext()) sb.append(","); } sb.append("}"); return sb.toString(); } protected void addAffectedSourceFiles(Set addTo, Set lastTimeSources) { if (qualifiedStrings.elementSize == 0 && simpleStrings.elementSize == 0) return; if (listenerDefined()) getListener().recordDecision( "Examining whether any other files now need compilation based on just compiling: '" + stringifyList(lastTimeSources) + "'"); char[][][] qualifiedNames = ReferenceCollection.internQualifiedNames(qualifiedStrings);
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
if (qualifiedNames.length < qualifiedStrings.elementSize) qualifiedNames = null; char[][] simpleNames = ReferenceCollection.internSimpleNames(simpleStrings); if (simpleNames.length < simpleStrings.elementSize) simpleNames = null; for (Iterator i = references.entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); ReferenceCollection refs = (ReferenceCollection) entry.getValue(); if (refs != null && refs.includes(qualifiedNames, simpleNames)) { File file = (File) entry.getKey(); if (file.exists()) { if (!lastTimeSources.contains(file)) { if (listenerDefined()) { getListener().recordDecision("Need to recompile '" + file.getName().toString() + "'"); } addTo.add(file); } } } } if (addTo.size() > 0) addTo.addAll(lastTimeSources);
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
qualifiedStrings.clear(); simpleStrings.clear(); } /** * Record that a particular type has been touched during a compilation run. Information is used to ensure any types depending * upon this one are also recompiled. * * @param typename (possibly qualified) type name */ protected void recordTypeChanged(String typename) { int lastDot = typename.lastIndexOf('.'); String typeName; if (lastDot != -1) { String packageName = typename.substring(0, lastDot).replace('.', '/'); qualifiedStrings.add(packageName); typeName = typename.substring(lastDot + 1); } else { qualifiedStrings.add(""); typeName = typename; } int memberIndex = typeName.indexOf('$'); if (memberIndex > 0) typeName = typeName.substring(0, memberIndex); simpleStrings.add(typeName);
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
} protected void addDependentsOf(File sourceFile) { List cfs = (List) this.fullyQualifiedTypeNamesResultingFromCompilationUnit.get(sourceFile); if (cfs != null) { for (Iterator iter = cfs.iterator(); iter.hasNext();) { ClassFile cf = (ClassFile) iter.next(); recordTypeChanged(cf.fullyQualifiedTypeName); } } } public void setStructureModel(AsmManager structureModel) { this.structureModel = structureModel; } public AsmManager getStructureModel() { return structureModel; } public void setWeaver(BcelWeaver bw) { weaver = bw; } public BcelWeaver getWeaver() { return weaver; } public void setWorld(BcelWorld bw) { world = bw; } public BcelWorld getBcelWorld() { return world; }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
public int getNumberOfStructuralChangesSinceLastFullBuild() { return structuralChangesSinceLastFullBuild.size(); } public long getLastBuildTime() { return lastSuccessfulBuildTime; } public long getLastFullBuildTime() { return lastSuccessfulFullBuildTime; } /** * @return Returns the buildConfig. */ public AjBuildConfig getBuildConfig() { return this.buildConfig; } public void clearBinarySourceFiles() { this.binarySourceFiles = new HashMap(); } public void recordBinarySource(String fromPathName, List unwovenClassFiles) { this.binarySourceFiles.put(fromPathName, unwovenClassFiles); if (this.maybeIncremental()) { List simpleClassFiles = new LinkedList();
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
for (Iterator iter = unwovenClassFiles.iterator(); iter.hasNext();) { UnwovenClassFile ucf = (UnwovenClassFile) iter.next(); ClassFile cf = getClassFileFor(ucf); simpleClassFiles.add(cf); } this.inputClassFilesBySource.put(fromPathName, simpleClassFiles); } } /** * @param ucf * @return */ private ClassFile getClassFileFor(UnwovenClassFile ucf) { return new ClassFile(ucf.getClassName(), new File(ucf.getFilename())); } public Map getBinarySourceMap() { return this.binarySourceFiles; } public Map getClassNameToFileMap() { return this.classesFromName; } public boolean hasResource(String resourceName) { return this.resources.contains(resourceName); } public void recordResource(String resourceName) { this.resources.add(resourceName); } /** * @return Returns the addedFiles. */
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
public Set getAddedFiles() { return this.addedFiles; } /** * @return Returns the deletedFiles. */ public Set getDeletedFiles() { return this.deletedFiles; } public void forceBatchBuildNextTimeAround() { this.batchBuildRequiredThisTime = true; } public boolean requiresFullBatchBuild() { return this.batchBuildRequiredThisTime; } private static class ClassFile { public String fullyQualifiedTypeName; public File locationOnDisk; public ClassFile(String fqn, File location) { this.fullyQualifiedTypeName = fqn; this.locationOnDisk = location; } public void deleteFromFileSystem(AjBuildConfig buildConfig) { String namePrefix = locationOnDisk.getName(); namePrefix = namePrefix.substring(0, namePrefix.lastIndexOf('.')); final String targetPrefix = namePrefix + BcelWeaver.CLOSURE_CLASS_PREFIX; File dir = locationOnDisk.getParentFile(); if (dir != null) { File[] weaverGenerated = dir.listFiles(new FilenameFilter() { public boolean accept(File dir, String name) {
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
return name.startsWith(targetPrefix); } }); if (weaverGenerated != null) { for (int i = 0; i < weaverGenerated.length; i++) { weaverGenerated[i].delete(); if (buildConfig != null && buildConfig.getCompilationResultDestinationManager() != null) { buildConfig.getCompilationResultDestinationManager() .reportClassFileRemove(weaverGenerated[i].getPath()); } } } } locationOnDisk.delete(); if (buildConfig != null && buildConfig.getCompilationResultDestinationManager() != null) { buildConfig.getCompilationResultDestinationManager().reportClassFileRemove(locationOnDisk.getPath()); } } } public void wipeAllKnowledge() { buildManager.state = null; } public Map getAspectNamesToFileNameMap() { return aspectsFromFileNames; } public void initializeAspectNamesToFileNameMap() { this.aspectsFromFileNames = new HashMap(); }
269,578
Bug 269578 Resource deletion in source folder on full build when source and output folders are the same.
On the clean before a full aspectj build resources are removed from the output folder. This is true even when the output and the source folder are the same. In this case, the resources are deleted from the source folder! When the source and output folders are the same, resources should never be deleted.
resolved fixed
5c49c0b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-21T01:38:50Z
2009-03-20T20:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
public boolean listenerDefined() { return stateListener != null; } public IStateListener getListener() { return stateListener; } public IBinaryType checkPreviousBuild(String name) { return (IBinaryType) resolvedTypeStructuresFromLastBuild.get(name); } public AjBuildManager getAjBuildManager() { return buildManager; } public INameEnvironment getNameEnvironment() { return this.nameEnvironment; } public void setNameEnvironment(INameEnvironment nameEnvironment) { this.nameEnvironment = nameEnvironment; } /** * Record an aspect that came in on the aspect path. When a .class file changes on the aspect path we can then recognize it as * an aspect and know to do more than just a tiny incremental build. <br> * TODO but this doesn't allow for a new aspect created on the aspectpath? * * @param aspectFile path to the file, eg. c:/temp/foo/Fred.class */ public void recordAspectClassFile(String aspectFile) { aspectClassFiles.add(aspectFile); } }
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
/* ******************************************************************* * Copyright (c) 2003 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http:www.eclipse.org/legal/epl-v10.html * * Contributors: * Mik Kersten initial implementation * Andy Clement Extensions for better IDE representation
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
* ******************************************************************/ package org.aspectj.asm.internal; import java.io.File; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import org.aspectj.asm.AsmManager; import org.aspectj.asm.IHierarchy; import org.aspectj.asm.IProgramElement; import org.aspectj.bridge.ISourceLocation; import org.aspectj.bridge.SourceLocation; /** * @author Mik Kersten */ public class AspectJElementHierarchy implements IHierarchy { private static final long serialVersionUID = 6462734311117048620L; private transient AsmManager asm; protected IProgramElement root = null; protected String configFile = null; private Map fileMap = null; private Map handleMap = new HashMap(); private Map typeMap = null; public AspectJElementHierarchy(AsmManager asm) { this.asm = asm; }
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
public IProgramElement getElement(String handle) { return findElementForHandleOrCreate(handle, false); } public void setAsmManager(AsmManager asm) { this.asm = asm; } public IProgramElement getRoot() { return root; } public void setRoot(IProgramElement root) { this.root = root; handleMap = new HashMap(); typeMap = new HashMap(); } public void addToFileMap(Object key, Object value) { fileMap.put(key, value); } public boolean removeFromFileMap(Object key) { if (fileMap.containsKey(key)) { return (fileMap.remove(key) != null); } return true; } public void setFileMap(HashMap fileMap) { this.fileMap = fileMap; } public Object findInFileMap(Object key) { return fileMap.get(key); } public Set getFileMapEntrySet() {
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
return fileMap.entrySet(); } public boolean isValid() { return root != null && fileMap != null; } /** * Returns the first match * * @param parent * @param kind not null * @return null if not found */ public IProgramElement findElementForSignature(IProgramElement parent, IProgramElement.Kind kind, String signature) { for (Iterator it = parent.getChildren().iterator(); it.hasNext();) { IProgramElement node = (IProgramElement) it.next(); if (node.getKind() == kind && signature.equals(node.toSignatureString())) { return node; } else { IProgramElement childSearch = findElementForSignature(node, kind, signature); if (childSearch != null) return childSearch; } } return null; } public IProgramElement findElementForLabel(IProgramElement parent, IProgramElement.Kind kind, String label) { for (Iterator it = parent.getChildren().iterator(); it.hasNext();) { IProgramElement node = (IProgramElement) it.next(); if (node.getKind() == kind && label.equals(node.toLabelString())) { return node;
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
} else { IProgramElement childSearch = findElementForLabel(node, kind, label); if (childSearch != null) return childSearch; } } return null; } /** * Find the entry in the model that represents a particular type. * * @param packageName the package in which the type is declared or null for the default package * @param typeName the name of the type * @return the IProgramElement representing the type, or null if not found */ public IProgramElement findElementForType(String packageName, String typeName) { StringBuffer keyb = (packageName == null) ? new StringBuffer() : new StringBuffer(packageName); keyb.append(".").append(typeName); String key = keyb.toString(); IProgramElement cachedValue = (IProgramElement) typeMap.get(key); if (cachedValue != null) { return cachedValue; } List packageNodes = findMatchingPackages(packageName); for (Iterator iterator = packageNodes.iterator(); iterator.hasNext();) { IProgramElement pkg = (IProgramElement) iterator.next(); for (Iterator it = pkg.getChildren().iterator(); it.hasNext();) { IProgramElement fileNode = (IProgramElement) it.next();
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
IProgramElement cNode = findClassInNodes(fileNode.getChildren(), typeName, typeName); if (cNode != null) { typeMap.put(key, cNode); return cNode; } } } return null;
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
} /** * Look for any package nodes matching the specified package name. There may be multiple in the case where the types within a * package are split across source folders. * * @param packagename the packagename being searched for * @return a list of package nodes that match that name */ public ListfindMatchingPackages(String packagename) { List children = root.getChildren(); if (children.size() == 0) { return Collections.EMPTY_LIST; } if (((IProgramElement) children.get(0)).getKind() == IProgramElement.Kind.SOURCE_FOLDER) { List matchingPackageNodes = new ArrayList(); for (Iterator iterator = children.iterator(); iterator.hasNext();) { IProgramElement sourceFolder = (IProgramElement) iterator.next(); List possiblePackageNodes = sourceFolder.getChildren(); for (Iterator iterator2 = possiblePackageNodes.iterator(); iterator2.hasNext();) { IProgramElement possiblePackageNode = (IProgramElement) iterator2.next();
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
if (possiblePackageNode.getKind() == IProgramElement.Kind.PACKAGE) { if (possiblePackageNode.getName().equals(packagename)) { matchingPackageNodes.add(possiblePackageNode); } } } } return matchingPackageNodes; } else { if (packagename == null) { List result = new ArrayList(); result.add(root); return result; } for (Iterator iterator = children.iterator(); iterator.hasNext();) { IProgramElement possiblePackage = (IProgramElement) iterator.next(); if (possiblePackage.getKind() == IProgramElement.Kind.PACKAGE) { if (possiblePackage.getName().equals(packagename)) { List result = new ArrayList(); result.add(possiblePackage); return result; } } if (possiblePackage.getKind() == IProgramElement.Kind.SOURCE_FOLDER) { if (possiblePackage.getName().equals("binaries")) { for (Iterator iter2 = possiblePackage.getChildren().iterator(); iter2.hasNext();) {
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
IProgramElement possiblePackage2 = (IProgramElement) iter2.next(); if (possiblePackage2.getKind() == IProgramElement.Kind.PACKAGE) { if (possiblePackage2.getName().equals(packagename)) { List result = new ArrayList(); result.add(possiblePackage2); return result; } } } } } } } return Collections.EMPTY_LIST; } private IProgramElement findClassInNodes(Collection nodes, String name, String typeName) { String baseName; String innerName; int dollar = name.indexOf('$'); if (dollar == -1) { baseName = name; innerName = null; } else { baseName = name.substring(0, dollar); innerName = name.substring(dollar + 1); } for (Iterator j = nodes.iterator(); j.hasNext();) { IProgramElement classNode = (IProgramElement) j.next(); if (baseName.equals(classNode.getName())) { if (innerName == null)
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
return classNode; else return findClassInNodes(classNode.getChildren(), innerName, typeName); } else if (name.equals(classNode.getName())) { return classNode; } else if (typeName.equals(classNode.getBytecodeSignature())) { return classNode; } else if (classNode.getChildren() != null && !classNode.getChildren().isEmpty()) { IProgramElement node = findClassInNodes(classNode.getChildren(), name, typeName); if (node != null) { return node; } } } return null; } /** * @param sourceFilePath modified to '/' delimited path for consistency * @return a new structure node for the file if it was not found in the model */ public IProgramElement findElementForSourceFile(String sourceFile) { try { if (!isValid() || sourceFile == null) { return IHierarchy.NO_STRUCTURE; } else { String correctedPath = asm.getCanonicalFilePath(new File(sourceFile)); IProgramElement node = (IProgramElement) findInFileMap(correctedPath); if (node != null) { return node;
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
} else { return createFileStructureNode(correctedPath); } } } catch (Exception e) { return IHierarchy.NO_STRUCTURE; } } /** * TODO: discriminate columns */ public IProgramElement findElementForSourceLine(ISourceLocation location) { try { return findElementForSourceLine(asm.getCanonicalFilePath(location.getSourceFile()), location.getLine()); } catch (Exception e) { return null; } } /** * Never returns null * * @param sourceFilePath canonicalized path for consistency * @param lineNumber if 0 or 1 the corresponding file node will be returned * @return a new structure node for the file if it was not found in the model */ public IProgramElement findElementForSourceLine(String sourceFilePath, int lineNumber) { String canonicalSFP = asm.getCanonicalFilePath(new File(sourceFilePath));
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
IProgramElement node = findNodeForSourceFile(root, canonicalSFP); if (node == null) { return createFileStructureNode(sourceFilePath); } IProgramElement closernode = findCloserMatchForLineNumber(node, lineNumber); if (closernode == null) { return node; } else { return closernode; } } /** * Discover the node representing a particular source file. * * @param node where in the model to start looking (usually the root on the initial call) * @param sourcefilePath the source file being searched for * @return the node representing that source file or null if it cannot be found */ private IProgramElement findNodeForSourceFile(IProgramElement node, String sourcefilePath) { if ((node.getKind().isSourceFile() && !node.getName().equals("<root>")) || node.getKind().isFile()) { ISourceLocation nodeLoc = node.getSourceLocation(); if (nodeLoc != null && nodeLoc.getSourceFile().getAbsolutePath().equals(sourcefilePath)) { return node; } return null; } else {
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
for (Iterator iterator = node.getChildren().iterator(); iterator.hasNext();) { IProgramElement foundit = findNodeForSourceFile((IProgramElement) iterator.next(), sourcefilePath); if (foundit != null) { return foundit; } } return null; } } public IProgramElement findElementForOffSet(String sourceFilePath, int lineNumber, int offSet) { String canonicalSFP = asm.getCanonicalFilePath(new File(sourceFilePath)); IProgramElement node = findNodeForSourceLineHelper(root, canonicalSFP, lineNumber, offSet); if (node != null) { return node; } else { return createFileStructureNode(sourceFilePath); } } private IProgramElement createFileStructureNode(String sourceFilePath) { int lastSlash = sourceFilePath.lastIndexOf('\\'); if (lastSlash == -1) { lastSlash = sourceFilePath.lastIndexOf('/'); } int i = sourceFilePath.lastIndexOf('!'); int j = sourceFilePath.indexOf(".class"); if (i > lastSlash && i != -1 && j != -1) { lastSlash = i;
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
} String fileName = sourceFilePath.substring(lastSlash + 1); IProgramElement fileNode = new ProgramElement(asm, fileName, IProgramElement.Kind.FILE_JAVA, new SourceLocation(new File( sourceFilePath), 1, 1), 0, null, null); fileNode.addChild(NO_STRUCTURE); return fileNode; } /** * For a specified node, check if any of the children more accurately represent the specified line. * * @param node where to start looking * @param lineno the line number * @return any closer match below 'node' or null if nothing is a more accurate match */ public IProgramElement findCloserMatchForLineNumber(IProgramElement node, int lineno) { if (node == null || node.getChildren() == null) { return null; } for (Iterator childrenIter = node.getChildren().iterator(); childrenIter.hasNext();) { IProgramElement child = (IProgramElement) childrenIter.next(); ISourceLocation childLoc = child.getSourceLocation(); if (childLoc != null) { if (childLoc.getLine() <= lineno && childLoc.getEndLine() >= lineno) { IProgramElement evenCloserMatch = findCloserMatchForLineNumber(child, lineno); if (evenCloserMatch == null) { return child; } else { return evenCloserMatch;
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
} } else if (child.getKind().isType()) { IProgramElement evenCloserMatch = findCloserMatchForLineNumber(child, lineno); if (evenCloserMatch != null) { return evenCloserMatch; } } } } return null; } private IProgramElement findNodeForSourceLineHelper(IProgramElement node, String sourceFilePath, int lineno, int offset) { if (matches(node, sourceFilePath, lineno, offset) && !hasMoreSpecificChild(node, sourceFilePath, lineno, offset)) { return node; } if (node != null) { for (Iterator it = node.getChildren().iterator(); it.hasNext();) { IProgramElement foundNode = findNodeForSourceLineHelper((IProgramElement) it.next(), sourceFilePath, lineno, offset); if (foundNode != null) { return foundNode; } } } return null; } private boolean matches(IProgramElement node, String sourceFilePath, int lineNumber, int offSet) {
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
ISourceLocation nodeSourceLocation = (node != null ? node.getSourceLocation() : null); return node != null && nodeSourceLocation != null && nodeSourceLocation.getSourceFile().getAbsolutePath().equals(sourceFilePath) && ((offSet != -1 && nodeSourceLocation.getOffset() == offSet) || offSet == -1) && ((nodeSourceLocation.getLine() <= lineNumber && nodeSourceLocation.getEndLine() >= lineNumber) || (lineNumber <= 1 && node .getKind().isSourceFile())); } private boolean hasMoreSpecificChild(IProgramElement node, String sourceFilePath, int lineNumber, int offSet) { for (Iterator it = node.getChildren().iterator(); it.hasNext();) { IProgramElement child = (IProgramElement) it.next(); if (matches(child, sourceFilePath, lineNumber, offSet)) return true; } return false; } public String getConfigFile() { return configFile; } public void setConfigFile(String configFile) { this.configFile = configFile; } public IProgramElement findElementForHandle(String handle) { return findElementForHandleOrCreate(handle, true);
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
} public IProgramElement findElementForHandleOrCreate(String handle, boolean create) { IProgramElement ipe = (IProgramElement) handleMap.get(handle); if (ipe != null) { return ipe; } ipe = findElementForHandle(root, handle); if (ipe == null && create) { ipe = createFileStructureNode(getFilename(handle)); } if (ipe != null) { cache(handle, ipe); } return ipe; } private IProgramElement findElementForHandle(IProgramElement parent, String handle) { for (Iterator it = parent.getChildren().iterator(); it.hasNext();) { IProgramElement node = (IProgramElement) it.next(); String nodeHid = node.getHandleIdentifier(); if (handle.equals(nodeHid)) { return node; } else { if (handle.startsWith(nodeHid)) { IProgramElement childSearch = findElementForHandle(node, handle); if (childSearch != null)
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
return childSearch; } } } return null; } protected void cache(String handle, IProgramElement pe) { if (!AsmManager.isCompletingTypeBindings()) { handleMap.put(handle, pe); } }
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
public void flushTypeMap() { typeMap.clear(); } public void flushHandleMap() { handleMap.clear(); } public void flushFileMap() { fileMap.clear(); } public void updateHandleMap(Set deletedFiles) { List forRemoval = new ArrayList(); Set k = handleMap.keySet(); for (Iterator iter = k.iterator(); iter.hasNext();) { String handle = (String) iter.next(); IProgramElement ipe = (IProgramElement) handleMap.get(handle); if (deletedFiles.contains(getCanonicalFilePath(ipe))) forRemoval.add(handle); } for (Iterator iter = forRemoval.iterator(); iter.hasNext();) { String handle = (String) iter.next(); handleMap.remove(handle); } forRemoval.clear(); k = typeMap.keySet(); for (Iterator iter = k.iterator(); iter.hasNext();) { String typeName = (String) iter.next(); IProgramElement ipe = (IProgramElement) typeMap.get(typeName); if (deletedFiles.contains(getCanonicalFilePath(ipe)))
269,840
Bug 269840 [model] package search fails in binary aspect in same package as a source type
If type a.b.c.C is advised by an aspect a.b.c.X from the aspectpath the model search logic breaks for finding 'X' because it hits the package node for a.b.c and stops looking
resolved fixed
7a7d6f0
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T16:43:38Z
2009-03-24T15:53:20Z
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
forRemoval.add(typeName); } for (Iterator iter = forRemoval.iterator(); iter.hasNext();) { String typeName = (String) iter.next(); typeMap.remove(typeName); } forRemoval.clear(); k = fileMap.keySet(); for (Iterator iter = k.iterator(); iter.hasNext();) { String filePath = (String) iter.next(); IProgramElement ipe = (IProgramElement) fileMap.get(filePath); if (deletedFiles.contains(getCanonicalFilePath(ipe))) forRemoval.add(filePath); } for (Iterator iter = forRemoval.iterator(); iter.hasNext();) { String filePath = (String) iter.next(); fileMap.remove(filePath); } } private String getFilename(String hid) { return asm.getHandleProvider().getFileForHandle(hid); } private String getCanonicalFilePath(IProgramElement ipe) { if (ipe.getSourceLocation() != null) { return asm.getCanonicalFilePath(ipe.getSourceLocation().getSourceFile()); } return ""; } }
269,867
Bug 269867 Non synchronized access to WeakHashMap causes infinite loop
The non synchronized access from AjTypeSystem.getAjType(clazz) to a static instance of WeakHashMap may cause an infinite loop at start up in a multi threaded system. The thread dump shows that 32 of 33 threads of the application stuck in WeakHashMap.get(Object) line 355: "BundleStarterThreadQcCtrl24" prio=3 tid=0x00957c00 nid=0x39 runnable [0xd42fb000..0xd42ffa70] java.lang.Thread.State: RUNNABLE at java.util.WeakHashMap.get(WeakHashMap.java:355) at org.aspectj.lang.reflect.AjTypeSystem.getAjType(AjTypeSystem.java:37) at org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate.initialize(Java15ReflectionBasedReferenceTypeDelegate.java:66) at org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegateFactory.create15Delegate(ReflectionBasedReferenceTypeDelegateFactory.java:56) at org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegateFactory.createDelegate(ReflectionBasedReferenceTypeDelegateFactory.java:42) at org.aspectj.weaver.reflect.ReflectionWorld.resolveDelegate(ReflectionWorld.java:111) at org.aspectj.weaver.World.resolveToReferenceType(World.java:388) at org.aspectj.weaver.World.resolve(World.java:279) at org.aspectj.weaver.World.resolve(World.java:199) at org.aspectj.weaver.World.resolve(World.java:348) at org.aspectj.weaver.reflect.ReflectionWorld.resolve(ReflectionWorld.java:103) at org.aspectj.weaver.reflect.ReflectionWorld.resolve(ReflectionWorld.java:93) at org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegateFactory.toResolvedTypeArray(ReflectionBasedReferenceTypeDelegateFactory.java:214) at org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegateFactory.createResolvedMethod(ReflectionBasedReferenceTypeDelegateFactory.java:107) at org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegateFactory.createResolvedMember(ReflectionBasedReferenceTypeDelegateFactory.java:98) at org.aspectj.weaver.reflect.ReflectionShadow.makeExecutionShadow(ReflectionShadow.java:53) at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.matchesExecution(PointcutExpressionImpl.java:100) at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.matchesMethodExecution(PointcutExpressionImpl.java:92) at org.springframework.aop.aspectj.AspectJExpressionPointcut.getShadowMatch(AspectJExpressionPointcut.java:370)
resolved fixed
752f895
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T22:04:41Z
2009-03-24T18:40:00Z
aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java
/* ******************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.lang.reflect; import java.lang.ref.WeakReference; import java.util.Map; import java.util.WeakHashMap; import org.aspectj.internal.lang.reflect.AjTypeImpl; /** * This is the anchor for the AspectJ runtime type system. * Typical usage to get the AjType representation of a given type * at runtime is to call <code>AjType<Foo> fooType = AjTypeSystem.getAjType(Foo.class);</code> */ public class AjTypeSystem {
269,867
Bug 269867 Non synchronized access to WeakHashMap causes infinite loop
The non synchronized access from AjTypeSystem.getAjType(clazz) to a static instance of WeakHashMap may cause an infinite loop at start up in a multi threaded system. The thread dump shows that 32 of 33 threads of the application stuck in WeakHashMap.get(Object) line 355: "BundleStarterThreadQcCtrl24" prio=3 tid=0x00957c00 nid=0x39 runnable [0xd42fb000..0xd42ffa70] java.lang.Thread.State: RUNNABLE at java.util.WeakHashMap.get(WeakHashMap.java:355) at org.aspectj.lang.reflect.AjTypeSystem.getAjType(AjTypeSystem.java:37) at org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate.initialize(Java15ReflectionBasedReferenceTypeDelegate.java:66) at org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegateFactory.create15Delegate(ReflectionBasedReferenceTypeDelegateFactory.java:56) at org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegateFactory.createDelegate(ReflectionBasedReferenceTypeDelegateFactory.java:42) at org.aspectj.weaver.reflect.ReflectionWorld.resolveDelegate(ReflectionWorld.java:111) at org.aspectj.weaver.World.resolveToReferenceType(World.java:388) at org.aspectj.weaver.World.resolve(World.java:279) at org.aspectj.weaver.World.resolve(World.java:199) at org.aspectj.weaver.World.resolve(World.java:348) at org.aspectj.weaver.reflect.ReflectionWorld.resolve(ReflectionWorld.java:103) at org.aspectj.weaver.reflect.ReflectionWorld.resolve(ReflectionWorld.java:93) at org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegateFactory.toResolvedTypeArray(ReflectionBasedReferenceTypeDelegateFactory.java:214) at org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegateFactory.createResolvedMethod(ReflectionBasedReferenceTypeDelegateFactory.java:107) at org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegateFactory.createResolvedMember(ReflectionBasedReferenceTypeDelegateFactory.java:98) at org.aspectj.weaver.reflect.ReflectionShadow.makeExecutionShadow(ReflectionShadow.java:53) at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.matchesExecution(PointcutExpressionImpl.java:100) at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.matchesMethodExecution(PointcutExpressionImpl.java:92) at org.springframework.aop.aspectj.AspectJExpressionPointcut.getShadowMatch(AspectJExpressionPointcut.java:370)
resolved fixed
752f895
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-24T22:04:41Z
2009-03-24T18:40:00Z
aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java
private static Map<Class, WeakReference<AjType>> ajTypes = new WeakHashMap<Class,WeakReference<AjType>>(); /** * Return the AspectJ runtime type representation of the given Java type. * Unlike java.lang.Class, AjType understands pointcuts, advice, declare statements, * and other AspectJ type members. AjType is the recommended reflection API for * AspectJ programs as it offers everything that java.lang.reflect does, with * AspectJ-awareness on top. */ public static <T> AjType<T> getAjType(Class<T> fromClass) { WeakReference<AjType> weakRefToAjType = ajTypes.get(fromClass); if (weakRefToAjType!=null) { AjType<T> theAjType = weakRefToAjType.get(); if (theAjType != null) { return theAjType; } else { theAjType = new AjTypeImpl<T>(fromClass); ajTypes.put(fromClass, new WeakReference<AjType>(theAjType)); return theAjType; } } AjType<T> theAjType = new AjTypeImpl<T>(fromClass); ajTypes.put(fromClass, new WeakReference<AjType>(theAjType)); return theAjType; } }
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
/* ******************************************************************* * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
* All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http:www.eclipse.org/legal/epl-v10.html * * Contributors: * PARC initial implementation * ******************************************************************/ package org.aspectj.ajdt.internal.core.builder; import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileFilter; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.jar.Attributes; import java.util.jar.JarFile; import java.util.jar.JarInputStream;
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
import java.util.jar.JarOutputStream; import java.util.jar.Manifest; import java.util.zip.ZipEntry; import org.aspectj.ajdt.internal.compiler.AjCompilerAdapter; import org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter; import org.aspectj.ajdt.internal.compiler.CompilationResultDestinationManager; import org.aspectj.ajdt.internal.compiler.IBinarySourceProvider; import org.aspectj.ajdt.internal.compiler.ICompilerAdapter; import org.aspectj.ajdt.internal.compiler.ICompilerAdapterFactory; import org.aspectj.ajdt.internal.compiler.IIntermediateResultsRequestor; import org.aspectj.ajdt.internal.compiler.IOutputClassFileNameProvider; import org.aspectj.ajdt.internal.compiler.InterimCompilationResult; import org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment; import org.aspectj.ajdt.internal.compiler.lookup.AnonymousClassPublisher; import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory; import org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter; import org.aspectj.asm.AsmManager; import org.aspectj.asm.IHierarchy; import org.aspectj.asm.IProgramElement; import org.aspectj.asm.internal.ProgramElement; import org.aspectj.bridge.AbortException; import org.aspectj.bridge.CountingMessageHandler; import org.aspectj.bridge.ILifecycleAware; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.IMessageHandler; import org.aspectj.bridge.IProgressListener; import org.aspectj.bridge.Message; import org.aspectj.bridge.MessageUtil; import org.aspectj.bridge.SourceLocation; import org.aspectj.bridge.Version;
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
import org.aspectj.bridge.context.CompilationAndWeavingContext; import org.aspectj.bridge.context.ContextFormatter; import org.aspectj.bridge.context.ContextToken; import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation; import org.aspectj.org.eclipse.jdt.core.compiler.IProblem; import org.aspectj.org.eclipse.jdt.internal.compiler.ClassFile; import org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult; import org.aspectj.org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies; import org.aspectj.org.eclipse.jdt.internal.compiler.ICompilerRequestor; import org.aspectj.org.eclipse.jdt.internal.compiler.IProblemFactory; import org.aspectj.org.eclipse.jdt.internal.compiler.batch.ClasspathLocation; import org.aspectj.org.eclipse.jdt.internal.compiler.batch.CompilationUnit; import org.aspectj.org.eclipse.jdt.internal.compiler.batch.FileSystem; import org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit; import org.aspectj.org.eclipse.jdt.internal.compiler.env.INameEnvironment; import org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions; import org.aspectj.org.eclipse.jdt.internal.compiler.parser.Parser; import org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation; import org.aspectj.org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory; import org.aspectj.tools.ajc.Main; import org.aspectj.util.FileUtil; import org.aspectj.weaver.CustomMungerFactory; import org.aspectj.weaver.Dump; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.World; import org.aspectj.weaver.bcel.BcelWeaver; import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.bcel.UnwovenClassFile; import org.eclipse.core.runtime.OperationCanceledException; public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySourceProvider, ICompilerAdapterFactory {
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
private static final String CROSSREFS_FILE_NAME = "build.lst"; private static final String CANT_WRITE_RESULT = "unable to write compilation result"; private static final String MANIFEST_NAME = "META-INF/MANIFEST.MF"; public static boolean COPY_INPATH_DIR_RESOURCES = false; private static boolean DO_RUNTIME_VERSION_CHECK = false; static final boolean FAIL_IF_RUNTIME_NOT_FOUND = false; private static final FileFilter binarySourceFilter = new FileFilter() { public boolean accept(File f) { return f.getName().endsWith(".class"); } }; /** * This builder is static so that it can be subclassed and reset. However, note that there is only one builder present, so if * two extendsion reset it, only the latter will get used. */ public static AsmHierarchyBuilder asmHierarchyBuilder = new AsmHierarchyBuilder(); static { CompilationAndWeavingContext.registerFormatter(CompilationAndWeavingContext.BATCH_BUILD, new AjBuildContexFormatter()); CompilationAndWeavingContext .registerFormatter(CompilationAndWeavingContext.INCREMENTAL_BUILD, new AjBuildContexFormatter()); } private IProgressListener progressListener = null; private boolean environmentSupportsIncrementalCompilation = false; private int compiledCount; private int sourceFileCount; private JarOutputStream zos;
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
private boolean batchCompile = true; private INameEnvironment environment; private Map binarySourcesForTheNextCompile = new HashMap(); public AjBuildConfig buildConfig; private boolean ignoreOutxml; private boolean wasFullBuild = true; AjState state = new AjState(this); /** * Enable check for runtime version, used only by Ant/command-line Main. * * @param main Main unused except to limit to non-null clients. */ public static void enableRuntimeVersionCheck(Main caller) { DO_RUNTIME_VERSION_CHECK = null != caller; } public BcelWeaver getWeaver() { return state.getWeaver(); } public BcelWorld getBcelWorld() { return state.getBcelWorld(); } public CountingMessageHandler handler; private CustomMungerFactory customMungerFactory; public AjBuildManager(IMessageHandler holder) { super(); this.handler = CountingMessageHandler.makeCountingMessageHandler(holder); } public void environmentSupportsIncrementalCompilation(boolean itDoes) {
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
this.environmentSupportsIncrementalCompilation = itDoes; } public boolean doGenerateModel() { return buildConfig.isGenerateModelMode(); } public boolean batchBuild(AjBuildConfig buildConfig, IMessageHandler baseHandler) throws IOException, AbortException { return performBuild(buildConfig, baseHandler, true); } public boolean incrementalBuild(AjBuildConfig buildConfig, IMessageHandler baseHandler) throws IOException, AbortException { return performBuild(buildConfig, baseHandler, false); } /** * Perform a build. * * @return true if the build was successful (ie. no errors) */ private boolean performBuild(AjBuildConfig buildConfig, IMessageHandler baseHandler, boolean isFullBuild) throws IOException, AbortException { boolean ret = true; batchCompile = isFullBuild; wasFullBuild = isFullBuild; if (baseHandler instanceof ILifecycleAware) { ((ILifecycleAware) baseHandler).buildStarting(!isFullBuild); } CompilationAndWeavingContext.reset(); int phase = isFullBuild ? CompilationAndWeavingContext.BATCH_BUILD : CompilationAndWeavingContext.INCREMENTAL_BUILD; ContextToken ct = CompilationAndWeavingContext.enteringPhase(phase, buildConfig); try { if (isFullBuild) {
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
this.state = new AjState(this); } this.state.setCouldBeSubsequentIncrementalBuild(this.environmentSupportsIncrementalCompilation); boolean canIncremental = state.prepareForNextBuild(buildConfig); if (!canIncremental && !isFullBuild) { CompilationAndWeavingContext.leavingPhase(ct); if (state.listenerDefined()) state.getListener().recordDecision("Falling back to batch compilation"); return performBuild(buildConfig, baseHandler, true); } this.handler = CountingMessageHandler.makeCountingMessageHandler(baseHandler); if (buildConfig == null || buildConfig.isCheckRuntimeVersion()) { if (DO_RUNTIME_VERSION_CHECK) { String check = checkRtJar(buildConfig); if (check != null) { if (FAIL_IF_RUNTIME_NOT_FOUND) { MessageUtil.error(handler, check); CompilationAndWeavingContext.leavingPhase(ct); return false; } else { MessageUtil.warn(handler, check); } } } } setBuildConfig(buildConfig); } if (isFullBuild || !AsmManager.attemptIncrementalModelRepairs) {
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
setupModel(buildConfig); } } if (isFullBuild) { initBcelWorld(handler); } if (handler.hasErrors()) { CompilationAndWeavingContext.leavingPhase(ct); return false; } if (buildConfig.getOutputJar() != null) { if (!openOutputStream(buildConfig.getOutputJar())) { CompilationAndWeavingContext.leavingPhase(ct); return false; } } if (isFullBuild) { if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode()) { AsmManager.setLastActiveStructureModel(state.getStructureModel()); getWorld().setModel(state.getStructureModel()); } binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(true); performCompilation(buildConfig.getFiles()); state.clearBinarySourceFiles(); if (!proceedOnError() && handler.hasErrors()) { CompilationAndWeavingContext.leavingPhase(ct); if (AsmManager.isReporting()) { state.getStructureModel().reportModelInfo("After a batch build");
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
} return false; } if (AsmManager.isReporting()) { state.getStructureModel().reportModelInfo("After a batch build"); } } else { } AsmManager.setLastActiveStructureModel(state.getStructureModel()); binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(true); Set files = state.getFilesToCompile(true); if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode()) { if (AsmManager.attemptIncrementalModelRepairs) { state.getStructureModel().resetDeltaProcessing(); state.getStructureModel().processDelta(files, state.getAddedFiles(), state.getDeletedFiles()); } } boolean hereWeGoAgain = !(files.isEmpty() && binarySourcesForTheNextCompile.isEmpty()); for (int i = 0; (i < 5) && hereWeGoAgain; i++) { if (state.listenerDefined()) state.getListener() .recordInformation("Starting incremental compilation loop " + (i + 1) + " of possibly 5"); performCompilation(files); if ((!proceedOnError() && handler.hasErrors()) || (progressListener != null && progressListener.isCancelledRequested())) {
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
CompilationAndWeavingContext.leavingPhase(ct); return false; } if (state.requiresFullBatchBuild()) { if (state.listenerDefined()) state.getListener().recordInformation(" Dropping back to full build"); return batchBuild(buildConfig, baseHandler); } binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(false); files = state.getFilesToCompile(false); hereWeGoAgain = !(files.isEmpty() && binarySourcesForTheNextCompile.isEmpty()); if (hereWeGoAgain) { if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode()) if (AsmManager.attemptIncrementalModelRepairs) state.getStructureModel().processDelta(files, state.getAddedFiles(), state.getDeletedFiles()); } } if (!files.isEmpty()) { CompilationAndWeavingContext.leavingPhase(ct); return batchBuild(buildConfig, baseHandler); } else { if (AsmManager.isReporting()) { state.getStructureModel().reportModelInfo("After an incremental build"); } }
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
} if (buildConfig.isEmacsSymMode()) { new org.aspectj.ajdt.internal.core.builder.EmacsStructureModelManager().externalizeModel(state.getStructureModel()); } if (buildConfig.isGenerateCrossRefsMode()) { File configFileProxy = new File(buildConfig.getOutputDir(), CROSSREFS_FILE_NAME); state.getStructureModel().writeStructureModel(configFileProxy.getAbsolutePath()); } state.successfulCompile(buildConfig, isFullBuild); if (isFullBuild) { copyResourcesToDestination(); } if (buildConfig.getOutxmlName() != null) { writeOutxmlFile(); } if (buildConfig.isGenerateModelMode()) { state.getStructureModel().fireModelUpdated(); } CompilationAndWeavingContext.leavingPhase(ct); } finally {
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
if (baseHandler instanceof ILifecycleAware) { ((ILifecycleAware) baseHandler).buildFinished(!isFullBuild); } if (zos != null) { closeOutputStream(buildConfig.getOutputJar()); } ret = !handler.hasErrors(); if (getBcelWorld() != null) getBcelWorld().tidyUp(); if (getWeaver() != null) getWeaver().tidyUp(); } return ret; } /** * Open an output jar file in which to write the compiler output. * * @param outJar the jar file to open * @return true if successful */ private boolean openOutputStream(File outJar) { try { OutputStream os = FileUtil.makeOutputStream(buildConfig.getOutputJar()); zos = new JarOutputStream(os, getWeaver().getManifest(true)); } catch (IOException ex) { IMessage message = new Message("Unable to open outjar " + outJar.getPath() + "(" + ex.getMessage() + ")", new SourceLocation(outJar, 0), true); handler.handleMessage(message);
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
return false; } return true; } private void closeOutputStream(File outJar) { try { if (zos != null) { zos.close(); if (buildConfig.getCompilationResultDestinationManager() != null) { buildConfig.getCompilationResultDestinationManager().reportFileWrite(outJar.getPath(), CompilationResultDestinationManager.FILETYPE_OUTJAR); } } zos = null; if (handler.hasErrors()) { outJar.delete(); if (buildConfig.getCompilationResultDestinationManager() != null) { buildConfig.getCompilationResultDestinationManager().reportFileRemove(outJar.getPath(), CompilationResultDestinationManager.FILETYPE_OUTJAR); } } } catch (IOException ex) { IMessage message = new Message("Unable to write outjar " + outJar.getPath() + "(" + ex.getMessage() + ")", new SourceLocation(outJar, 0), true); handler.handleMessage(message); } } private void copyResourcesToDestination() throws IOException {
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
for (Iterator i = buildConfig.getInJars().iterator(); i.hasNext();) { File inJar = (File) i.next(); copyResourcesFromJarFile(inJar); } for (Iterator i = buildConfig.getInpath().iterator(); i.hasNext();) { File inPathElement = (File) i.next(); if (inPathElement.isDirectory()) { copyResourcesFromDirectory(inPathElement); } else { copyResourcesFromJarFile(inPathElement); } } if (buildConfig.getSourcePathResources() != null) { for (Iterator i = buildConfig.getSourcePathResources().keySet().iterator(); i.hasNext();) { String resource = (String) i.next(); File from = (File) buildConfig.getSourcePathResources().get(resource); copyResourcesFromFile(from, resource, from); } } writeManifest(); } private void copyResourcesFromJarFile(File jarFile) throws IOException { JarInputStream inStream = null; try { inStream = new JarInputStream(new FileInputStream(jarFile)); while (true) { ZipEntry entry = inStream.getNextEntry(); if (entry == null) break; String filename = entry.getName();
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
if (entry.isDirectory()) { writeDirectory(filename, jarFile); } else if (acceptResource(filename, false)) { byte[] bytes = FileUtil.readAsByteArray(inStream); writeResource(filename, bytes, jarFile); } inStream.closeEntry(); } } finally { if (inStream != null) inStream.close(); } } private void copyResourcesFromDirectory(File dir) throws IOException { if (!COPY_INPATH_DIR_RESOURCES) return; File[] files = FileUtil.listFiles(dir, new FileFilter() { public boolean accept(File f) { boolean accept = !(f.isDirectory() || f.getName().endsWith(".class")); return accept; } }); for (int i = 0; i < files.length; i++) { String filename = files[i].getAbsolutePath().substring(dir.getAbsolutePath().length() + 1); copyResourcesFromFile(files[i], filename, dir);
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
} } private void copyResourcesFromFile(File f, String filename, File src) throws IOException { if (!acceptResource(filename, true)) return; FileInputStream fis = null; try { fis = new FileInputStream(f); byte[] bytes = FileUtil.readAsByteArray(fis); writeResource(filename, bytes, src); } finally { if (fis != null) fis.close(); } } /** * Add a directory entry to the output zip file. Don't do anything if not writing out to a zip file. A directory entry is one * whose filename ends with '/' * * @param directory the directory path * @param srcloc the src of the directory entry, for use when creating a warning message * @throws IOException if something goes wrong creating the new zip entry */ private void writeDirectory(String directory, File srcloc) throws IOException { if (state.hasResource(directory)) { IMessage msg = new Message("duplicate resource: '" + directory + "'", IMessage.WARNING, null, new SourceLocation( srcloc, 0)); handler.handleMessage(msg); return;
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
} if (zos != null) { ZipEntry newEntry = new ZipEntry(directory); zos.putNextEntry(newEntry); zos.closeEntry(); state.recordResource(directory, srcloc); } } private void writeResource(String filename, byte[] content, File srcLocation) throws IOException { if (state.hasResource(filename)) { IMessage msg = new Message("duplicate resource: '" + filename + "'", IMessage.WARNING, null, new SourceLocation( srcLocation, 0)); handler.handleMessage(msg); return; } if (filename.equals(buildConfig.getOutxmlName())) { ignoreOutxml = true; IMessage msg = new Message("-outxml/-outxmlfile option ignored because resource already exists: '" + filename + "'", IMessage.WARNING, null, new SourceLocation(srcLocation, 0)); handler.handleMessage(msg); } if (zos != null) { ZipEntry newEntry = new ZipEntry(filename); zos.putNextEntry(newEntry); zos.write(content); zos.closeEntry(); } else { File destDir = buildConfig.getOutputDir(); if (buildConfig.getCompilationResultDestinationManager() != null) {
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
destDir = buildConfig.getCompilationResultDestinationManager().getOutputLocationForResource(srcLocation); } try { File outputLocation = new File(destDir, filename); OutputStream fos = FileUtil.makeOutputStream(outputLocation); fos.write(content); fos.close(); if (buildConfig.getCompilationResultDestinationManager() != null) { buildConfig.getCompilationResultDestinationManager().reportFileWrite(outputLocation.getPath(), CompilationResultDestinationManager.FILETYPE_RESOURCE); } } catch (FileNotFoundException fnfe) { IMessage msg = new Message("unable to copy resource to output folder: '" + filename + "' - reason: " + fnfe.getMessage(), IMessage.ERROR, null, new SourceLocation(srcLocation, 0)); handler.handleMessage(msg); } } state.recordResource(filename, srcLocation); } /* * If we are writing to an output directory copy the manifest but only if we already have one */ private void writeManifest() throws IOException { Manifest manifest = getWeaver().getManifest(false); if (manifest != null && zos == null) { File outputDir = buildConfig.getOutputDir(); if (buildConfig.getCompilationResultDestinationManager() != null) {
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
outputDir = buildConfig.getCompilationResultDestinationManager().getDefaultOutputLocation(); } if (outputDir == null) { return; } File outputLocation = new File(outputDir, MANIFEST_NAME); OutputStream fos = FileUtil.makeOutputStream(outputLocation); manifest.write(fos); fos.close(); if (buildConfig.getCompilationResultDestinationManager() != null) { buildConfig.getCompilationResultDestinationManager().reportFileWrite(outputLocation.getPath(), CompilationResultDestinationManager.FILETYPE_RESOURCE); } } } private boolean acceptResource(String resourceName, boolean fromFile) { if ((resourceName.startsWith("CVS/")) || (resourceName.indexOf("/CVS/") != -1) || (resourceName.endsWith("/CVS")) || (resourceName.endsWith(".class")) || (resourceName.startsWith(".svn/")) || (resourceName.indexOf("/.svn/") != -1) || (resourceName.endsWith("/.svn")) || (resourceName.toUpperCase().equals(MANIFEST_NAME) && (!fromFile || zos != null))) { return false; } else { return true; } } private void writeOutxmlFile() throws IOException { if (ignoreOutxml) return; String filename = buildConfig.getOutxmlName();
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
Map outputDirsAndAspects = findOutputDirsForAspects(); Set outputDirs = outputDirsAndAspects.entrySet(); for (Iterator iterator = outputDirs.iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); File outputDir = (File) entry.getKey(); List aspects = (List) entry.getValue(); ByteArrayOutputStream baos = getOutxmlContents(aspects); if (zos != null) { ZipEntry newEntry = new ZipEntry(filename); zos.putNextEntry(newEntry); zos.write(baos.toByteArray()); zos.closeEntry(); } else { File outputFile = new File(outputDir, filename); OutputStream fos = FileUtil.makeOutputStream(outputFile); fos.write(baos.toByteArray()); fos.close(); if (buildConfig.getCompilationResultDestinationManager() != null) { buildConfig.getCompilationResultDestinationManager().reportFileWrite(outputFile.getPath(), CompilationResultDestinationManager.FILETYPE_RESOURCE); } } } } private ByteArrayOutputStream getOutxmlContents(List aspectNames) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos); ps.println("<aspectj>"); ps.println("<aspects>");
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
if (aspectNames != null) { for (Iterator i = aspectNames.iterator(); i.hasNext();) { String name = (String) i.next(); ps.println("<aspect name=\"" + name + "\"/>"); } } ps.println("</aspects>"); ps.println("</aspectj>"); ps.println(); ps.close(); return baos; } /** * Returns a map where the keys are File objects corresponding to all the output directories and the values are a list of * aspects which are sent to that ouptut directory */ private Map findOutputDirsForAspects() { Map outputDirsToAspects = new HashMap(); Map aspectNamesToFileNames = state.getAspectNamesToFileNameMap(); if (buildConfig.getCompilationResultDestinationManager() == null || buildConfig.getCompilationResultDestinationManager().getAllOutputLocations().size() == 1) { File outputDir = buildConfig.getOutputDir(); if (buildConfig.getCompilationResultDestinationManager() != null) { outputDir = buildConfig.getCompilationResultDestinationManager().getDefaultOutputLocation(); } List aspectNames = new ArrayList(); if (aspectNamesToFileNames != null) { Set keys = aspectNamesToFileNames.keySet(); for (Iterator iterator = keys.iterator(); iterator.hasNext();) {
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
String name = (String) iterator.next(); aspectNames.add(name); } } outputDirsToAspects.put(outputDir, aspectNames); } else { List outputDirs = buildConfig.getCompilationResultDestinationManager().getAllOutputLocations(); for (Iterator iterator = outputDirs.iterator(); iterator.hasNext();) { File outputDir = (File) iterator.next(); outputDirsToAspects.put(outputDir, new ArrayList()); } Set entrySet = aspectNamesToFileNames.entrySet(); for (Iterator iterator = entrySet.iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); String aspectName = (String) entry.getKey(); char[] fileName = (char[]) entry.getValue(); File outputDir = buildConfig.getCompilationResultDestinationManager().getOutputLocationForClass( new File(new String(fileName))); if (!outputDirsToAspects.containsKey(outputDir)) { outputDirsToAspects.put(outputDir, new ArrayList()); } ((List) outputDirsToAspects.get(outputDir)).add(aspectName); } } return outputDirsToAspects; }
269,912
Bug 269912 wasted time building message context when it is only used for command line builds
The context for a message is created even when AspectJ is used inside AJDT - but the context only ever gets used when printing messages to System.out. Under AJDT we ought to be able to 'switch it off'
resolved fixed
c732808
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-03-25T16:19:48Z
2009-03-25T00:13:20Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
} } } } /** * Responsible for managing the ASM model between builds. Contains the policy for maintaining the persistance of elements in the * model. * * This code is driven before each 'fresh' (batch) build to create a new model. */ private void setupModel(AjBuildConfig config) { if (!(config.isEmacsSymMode() || config.isGenerateModelMode())) { return; } AsmManager structureModel = AsmManager.createNewStructureModel();