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
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
COMMAND_EDITOR = editor; } private boolean verbose; private boolean listFileArgs; private boolean failonerror; private boolean fork; private String maxMem; private TaskLogger logger; protected GuardedCommand cmd; private Path srcdir; private Path injars; private Path inpath; private Path classpath; private Path bootclasspath; private Path forkclasspath; private Path extdirs; private Path aspectpath; private Path argfiles; private List ignored; private Path sourceRoots; private File xweaveDir; private String xdoneSignal; private List adapterFiles;
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
private String[] adapterArguments; private IMessageHolder messageHolder; private ICommandEditor commandEditor; private boolean copyInjars; private boolean copyInpath; private String sourceRootCopyFilter; private String inpathDirCopyFilter; private File destDir; private File outjar; private boolean outjarFixedup; /** * When possibly copying resources to the output jar, * pass ajc a fake output jar to copy from, * so we don't change the modification time of the output jar * when copying injars/inpath into the actual outjar. */ private File tmpOutjar; private boolean executing; private Main main;
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
private boolean executingInOtherVM; private boolean inIncrementalMode; private boolean inIncrementalFileMode; private boolean logCommand; private CommandlineJava javaCmd = new CommandlineJava(); public AjcTask() { reset(); } public void reset() { adapterArguments = null; adapterFiles = new ArrayList(); argfiles = null; executing = false; aspectpath = null; bootclasspath = null; classpath = null; cmd = new GuardedCommand(); copyInjars = false; copyInpath = false; destDir = DEFAULT_DESTDIR;
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
executing = false; executingInOtherVM = false; extdirs = null; failonerror = true; forkclasspath = null; inIncrementalMode = false; inIncrementalFileMode = false; ignored = new ArrayList(); injars = null; inpath = null; listFileArgs = false; maxMem = null; messageHolder = null; outjar = null; sourceRootCopyFilter = null; inpathDirCopyFilter = null; sourceRoots = null; srcdir = null; tmpOutjar = null; verbose = false; xweaveDir = null; xdoneSignal = null; logCommand = false; javaCmd = new CommandlineJava(); } protected void ignore(String ignored) { this.ignored.add(ignored + " at " + getLocation()); }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
protected String validCommaList(String list, List valid, String label) { return validCommaList(list, valid, label, valid.size()); } protected String validCommaList(String list, List valid, String label, int max) { StringBuffer result = new StringBuffer(); StringTokenizer st = new StringTokenizer(list, ","); int num = 0; while (st.hasMoreTokens()) { String token = st.nextToken().trim(); num++; if (num > max) { ignore("too many entries for -" + label + ": " + token); break; } if (!valid.contains(token)) { ignore("bad commaList entry for -" + label + ": " + token); } else { if (0 < result.length()) { result.append(","); } result.append(token); }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
} return (0 == result.length() ? null : result.toString()); } public void setIncremental(boolean incremental) { cmd.addFlag("-incremental", incremental); inIncrementalMode = incremental; } public void setLogCommand(boolean logCommand) { this.logCommand = logCommand; } public void setHelp(boolean help) { cmd.addFlag("-help", help); } public void setVersion(boolean version) { cmd.addFlag("-version", version); } public void setXTerminateAfterCompilation(boolean b) { cmd.addFlag("-XterminateAfterCompilation", b); } public void setXReweavable(boolean reweavable) { cmd.addFlag("-Xreweavable",reweavable); } public void setXJoinpoints(String optionalJoinpoints) { cmd.addFlag("-Xjoinpoints:"+optionalJoinpoints,true); } public void setCheckRuntimeVersion(boolean b) { cmd.addFlag("-checkRuntimeVersion:"+b,true);
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
} public void setXNoWeave(boolean b) { if (logger!=null) logger.warning("the noweave option is no longer required and is being ignored"); } public void setNoWeave(boolean b) { if (logger!=null) logger.warning("the noweave option is no longer required and is being ignored"); } public void setXNotReweavable(boolean notReweavable) { cmd.addFlag("-XnotReweavable",notReweavable); } public void setXaddSerialVersionUID(boolean addUID) { cmd.addFlag("-XaddSerialVersionUID",addUID); } public void setXNoInline(boolean noInline) { cmd.addFlag("-XnoInline",noInline); } public void setShowWeaveInfo(boolean showweaveinfo) { cmd.addFlag("-showWeaveInfo",showweaveinfo); } public void setNowarn(boolean nowarn) { cmd.addFlag("-nowarn", nowarn); } public void setDeprecation(boolean deprecation) { cmd.addFlag("-deprecation", deprecation); } public void setWarn(String warnings) {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
warnings = validCommaList(warnings, VALID_WARNINGS, "warn"); cmd.addFlag("-warn:" + warnings, (null != warnings)); } public void setDebug(boolean debug) { cmd.addFlag("-g", debug); } public void setDebugLevel(String level) { level = validCommaList(level, VALID_DEBUG, "g"); cmd.addFlag("-g:" + level, (null != level)); } public void setEmacssym(boolean emacssym) { cmd.addFlag("-emacssym", emacssym); } public void setCrossrefs(boolean on) { cmd.addFlag("-crossrefs", on); } /** * -Xlint - set default level of -Xlint messages to warning * (same as </code>-Xlint:warning</code>) */ public void setXlintwarnings(boolean xlintwarnings) { cmd.addFlag("-Xlint", xlintwarnings); } /** -Xlint:{error|warning|info} - set default level for -Xlint messages * @param xlint the String with one of error, warning, ignored */ public void setXlint(String xlint) {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
xlint = validCommaList(xlint, VALID_XLINT, "Xlint", 1); cmd.addFlag("-Xlint:" + xlint, (null != xlint)); } /** * -Xlintfile {lint.properties} - enable or disable specific forms * of -Xlint messages based on a lint properties file * (default is * <code>org/aspectj/weaver/XLintDefault.properties</code>) * @param xlintFile the File with lint properties */ public void setXlintfile(File xlintFile) { cmd.addFlagged("-Xlintfile", xlintFile.getAbsolutePath()); } public void setPreserveAllLocals(boolean preserveAllLocals) { cmd.addFlag("-preserveAllLocals", preserveAllLocals); } public void setNoImportError(boolean noImportError) { cmd.addFlag("-warn:-unusedImport", noImportError); } public void setEncoding(String encoding) { cmd.addFlagged("-encoding", encoding); } public void setLog(File file) { cmd.addFlagged("-log", file.getAbsolutePath()); } public void setProceedOnError(boolean proceedOnError) { cmd.addFlag("-proceedOnError", proceedOnError); } public void setVerbose(boolean verbose) {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
cmd.addFlag("-verbose", verbose); this.verbose = verbose; } public void setListFileArgs(boolean listFileArgs) { this.listFileArgs = listFileArgs; } public void setReferenceInfo(boolean referenceInfo) { cmd.addFlag("-referenceInfo", referenceInfo); } public void setTime(boolean time) { cmd.addFlag("-time", time); } public void setNoExit(boolean noExit) { cmd.addFlag("-noExit", noExit); } public void setFailonerror(boolean failonerror) { this.failonerror = failonerror; } /** * @return true if fork was set */ public boolean isForked() { return fork; } public void setFork(boolean fork) { this.fork = fork; }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
public void setMaxmem(String maxMem) { this.maxMem = maxMem; } public Commandline.Argument createJvmarg() { return this.javaCmd.createVmArgument(); } public void setTagFile(File file) { inIncrementalMode = true; cmd.addFlagged(Main.CommandController.TAG_FILE_OPTION, file.getAbsolutePath()); inIncrementalFileMode = true; } public void setOutjar(File file) { if (DEFAULT_DESTDIR != destDir) { String e = "specifying both output jar (" + file + ") and destination dir (" + destDir + ")"; throw new BuildException(e); } outjar = file; outjarFixedup = false; tmpOutjar = null; } public void setOutxml(boolean outxml) {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
cmd.addFlag("-outxml",outxml); } public void setOutxmlfile(String name) { cmd.addFlagged("-outxmlfile", name); } public void setDestdir(File dir) { if (null != outjar) { String e = "specifying both output jar (" + outjar + ") and destination dir (" + dir + ")"; throw new BuildException(e); } cmd.addFlagged("-d", dir.getAbsolutePath()); destDir = dir; } /** * @param input a String in TARGET_INPUTS */ public void setTarget(String input) { String ignore = cmd.addOption("-target", TARGET_INPUTS, input); if (null != ignore) { ignore(ignore); } } /** * Language compliance level.
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
* If not set explicitly, eclipse default holds. * @param input a String in COMPLIANCE_INPUTS */ public void setCompliance(String input) { String ignore = cmd.addOption(null, COMPLIANCE_INPUTS, input); if (null != ignore) { ignore(ignore); } } /** * Source compliance level. * If not set explicitly, eclipse default holds. * @param input a String in SOURCE_INPUTS */ public void setSource(String input) { String ignore = cmd.addOption("-source", SOURCE_INPUTS, input); if (null != ignore) { ignore(ignore); } } /** * Flag to copy all non-.class contents of injars * to outjar after compile completes. * Requires both injars and outjar. * @param doCopy */ public void setCopyInjars(boolean doCopy){ ignore("copyInJars"); log("copyInjars not required since 1.1.1.\n", Project.MSG_WARN);
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
} /** * Option to copy all files from * all source root directories * except those specified here. * If this is specified and sourceroots are specified, * then this will copy all files except * those specified in the filter pattern. * Requires sourceroots. * * @param filter a String acceptable as an excludes * filter for an Ant Zip fileset. */ public void setSourceRootCopyFilter(String filter){ this.sourceRootCopyFilter = filter; } /** * Option to copy all files from * all inpath directories * except the files specified here. * If this is specified and inpath directories are specified, * then this will copy all files except * those specified in the filter pattern. * Requires inpath. * If the input does not contain "**\/*.class", then * this prepends it, to avoid overwriting woven classes * with unwoven input. * @param filter a String acceptable as an excludes
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
* filter for an Ant Zip fileset. */ public void setInpathDirCopyFilter(String filter){ if (null != filter) { if (-1 == filter.indexOf("**/*.class")) { filter = "**/*.class," + filter; } } this.inpathDirCopyFilter = filter; } public void setX(String input) { StringTokenizer tokens = new StringTokenizer(input, ",", false); while (tokens.hasMoreTokens()) { String token = tokens.nextToken().trim(); if (1 < token.length()) { if (VALID_XOPTIONS.contains(token) || token.indexOf("set:")==0 || token.indexOf("joinpoints:")==0) { cmd.addFlag("-X" + token, true); } else { ignore("-X" + token); } } } } public void setXDoneSignal(String doneSignal) { this.xdoneSignal = doneSignal; } public void setMessageHolder(IMessageHolder holder) {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
this.messageHolder = holder; } /** * Setup custom message handling. * @param className the String fully-qualified-name of a class * reachable from this object's class loader, * implementing IMessageHolder, and * having a public no-argument constructor. * @throws BuildException if unable to create instance of className */ public void setMessageHolderClass(String className) { try { Class mclass = Class.forName(className); IMessageHolder holder = (IMessageHolder) mclass.newInstance(); setMessageHolder(holder); } catch (Throwable t) { String m = "unable to instantiate message holder: " + className; throw new BuildException(m, t); } } public void setCommandEditor(ICommandEditor editor) { this.commandEditor = editor; } /** * Setup command-line filter. * To do this staticly, define the environment variable
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
* <code>org.aspectj.tools.ant.taskdefs.AjcTask.COMMAND_EDITOR</code> * with the <code>className</code> parameter. * @param className the String fully-qualified-name of a class * reachable from this object's class loader, * implementing ICommandEditor, and * having a public no-argument constructor. * @throws BuildException if unable to create instance of className */ public void setCommandEditorClass(String className) { try { Class mclass = Class.forName(className); setCommandEditor((ICommandEditor) mclass.newInstance()); } catch (Throwable t) { String m = "unable to instantiate command editor: " + className; throw new BuildException(m, t); } } /** * Add path elements to source path and return result. * Elements are added even if they do not exist. * @param source the Path to add to - may be null * @param toAdd the Path to add - may be null * @return the (never-null) Path that results */ protected Path incPath(Path source, Path toAdd) { if (null == source) { source = new Path(project); } if (null != toAdd) {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
source.append(toAdd); } return source; } public void setSourcerootsref(Reference ref) { createSourceRoots().setRefid(ref); } public void setSourceRoots(Path roots) { sourceRoots = incPath(sourceRoots, roots); } public Path createSourceRoots() { if (sourceRoots == null) { sourceRoots = new Path(project); } return sourceRoots.createPath(); } public void setXWeaveDir(File file) { if ((null != file) && file.isDirectory() && file.canRead()) { xweaveDir = file; } } public void setInjarsref(Reference ref) { createInjars().setRefid(ref); } public void setInpathref(Reference ref) { createInpath().setRefid(ref);
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
} public void setInjars(Path path) { injars = incPath(injars, path); } public void setInpath(Path path) { inpath = incPath(inpath,path); } public Path createInjars() { if (injars == null) { injars = new Path(project); } return injars.createPath(); } public Path createInpath() { if (inpath == null) { inpath = new Path(project); } return inpath.createPath(); } public void setClasspath(Path path) { classpath = incPath(classpath, path); } public void setClasspathref(Reference classpathref) { createClasspath().setRefid(classpathref); }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
public Path createClasspath() { if (classpath == null) { classpath = new Path(project); } return classpath.createPath(); } public void setBootclasspath(Path path) { bootclasspath = incPath(bootclasspath, path); } public void setBootclasspathref(Reference bootclasspathref) { createBootclasspath().setRefid(bootclasspathref); } public Path createBootclasspath() { if (bootclasspath == null) { bootclasspath = new Path(project); } return bootclasspath.createPath(); } public void setForkclasspath(Path path) { forkclasspath = incPath(forkclasspath, path); } public void setForkclasspathref(Reference forkclasspathref) { createForkclasspath().setRefid(forkclasspathref); } public Path createForkclasspath() {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
if (forkclasspath == null) { forkclasspath = new Path(project); } return forkclasspath.createPath(); } public void setExtdirs(Path path) { extdirs = incPath(extdirs, path); } public void setExtdirsref(Reference ref) { createExtdirs().setRefid(ref); } public Path createExtdirs() { if (extdirs == null) { extdirs = new Path(project); } return extdirs.createPath(); } public void setAspectpathref(Reference ref) { createAspectpath().setRefid(ref); } public void setAspectpath(Path path) { aspectpath = incPath(aspectpath, path); } public Path createAspectpath() { if (aspectpath == null) { aspectpath = new Path(project); }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
return aspectpath.createPath(); } public void setSrcDir(Path path) { srcdir = incPath(srcdir, path); } public Path createSrc() { return createSrcdir(); } public Path createSrcdir() { if (srcdir == null) { srcdir = new Path(project); } return srcdir.createPath(); } public boolean isInIncrementalMode() { return inIncrementalMode; } public boolean isInIncrementalFileMode() { return inIncrementalFileMode; } public void setArgfilesref(Reference ref) { createArgfiles().setRefid(ref); } public void setArgfiles(Path path) { argfiles = incPath(argfiles, path); }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
public Path createArgfiles() { if (argfiles == null) { argfiles = new Path(project); } return argfiles.createPath(); } /** * Compile using ajc per settings. * @exception BuildException if the compilation has problems * or if there were compiler errors and failonerror is true. */ public void execute() throws BuildException { this.logger = new TaskLogger(this); if (executing) { throw new IllegalStateException("already executing"); } else { executing = true; } setupOptions(); verifyOptions(); try { String[] args = makeCommand(); if (logCommand) { log("ajc " + Arrays.asList(args)); } else { logVerbose("ajc " + Arrays.asList(args)); }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
if (!fork) { executeInSameVM(args); } else { executeInOtherVM(args); } } catch (BuildException e) { throw e; } catch (Throwable x) { this.logger.error(Main.renderExceptionForUser(x)); throw new BuildException("IGNORE -- See " + LangUtil.unqualifiedClassName(x) + " rendered to ant logger"); } finally { executing = false; if (null != tmpOutjar) { tmpOutjar.delete(); } } } /** * Halt processing. * This tells main in the same vm to quit. * It fails when running in forked mode. * @return true if not in forked mode * and main has quit or been told to quit */ public boolean quit() { if (executingInOtherVM) { return false; }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
Main me = main; if (null != me) { me.quit(); } return true; } String[] makeCommand() { ArrayList result = new ArrayList(); if (0 < ignored.size()) { for (Iterator iter = ignored.iterator(); iter.hasNext();) { logVerbose("ignored: " + iter.next()); } } if ((null != outjar) && !outjarFixedup) { if (copyInjars || copyInpath || (null != sourceRootCopyFilter) || (null != inpathDirCopyFilter)) { String path = outjar.getAbsolutePath(); int len = FileUtil.zipSuffixLength(path); path = path.substring(0, path.length()-len) + ".tmp.jar"; tmpOutjar = new File(path); } if (null == tmpOutjar) { cmd.addFlagged("-outjar", outjar.getAbsolutePath()); } else { cmd.addFlagged("-outjar", tmpOutjar.getAbsolutePath()); } outjarFixedup = true;
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
} result.addAll(cmd.extractArguments()); addListArgs(result); String[] command = (String[]) result.toArray(new String[0]); if (null != commandEditor) { command = commandEditor.editCommand(command); } else if (null != COMMAND_EDITOR) { command = COMMAND_EDITOR.editCommand(command); } return command; } /** * Create any pseudo-options required to implement * some of the macro options * @throws BuildException if options conflict */ protected void setupOptions() { if (null != xweaveDir) { if (DEFAULT_DESTDIR != destDir) { throw new BuildException("weaveDir forces destdir"); } if (null != outjar) { throw new BuildException("weaveDir forces outjar"); } if (null != injars) { throw new BuildException("weaveDir incompatible with injars now"); } if (null != inpath) { throw new BuildException("weaveDir incompatible with inpath now"); }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
File injar = zipDirectory(xweaveDir); setInjars(new Path(getProject(), injar.getAbsolutePath())); setDestdir(xweaveDir); } } protected File zipDirectory(File dir) { File tempDir = new File("."); try { tempDir = File.createTempFile("AjcTest", ".tmp"); tempDir.mkdirs(); tempDir.deleteOnExit(); } catch (IOException e) { } String filename = "AjcTask-" + System.currentTimeMillis() + ".zip"; File result = new File(filename); Zip zip = new Zip(); zip.setProject(getProject()); zip.setDestFile(result); zip.setTaskName(getTaskName() + " - zip"); FileSet fileset = new FileSet(); fileset.setDir(dir); zip.addFileset(fileset); zip.execute(); Delete delete = new Delete();
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
delete.setProject(getProject()); delete.setTaskName(getTaskName() + " - delete"); delete.setDir(dir); delete.execute(); Mkdir mkdir = new Mkdir(); mkdir.setProject(getProject()); mkdir.setTaskName(getTaskName() + " - mkdir"); mkdir.setDir(dir); mkdir.execute(); return result; } /** * @throw BuildException if options conflict */ protected void verifyOptions() { StringBuffer sb = new StringBuffer(); if (fork && isInIncrementalMode() && !isInIncrementalFileMode()) { sb.append("can fork incremental only using tag file.\n"); } if (((null != inpathDirCopyFilter) || (null != sourceRootCopyFilter)) && (null == outjar) && (DEFAULT_DESTDIR == destDir)) { final String REQ = " requires dest dir or output jar.\n"; if (null == inpathDirCopyFilter) { sb.append("sourceRootCopyFilter"); } else if (null == sourceRootCopyFilter) { sb.append("inpathDirCopyFilter"); } else { sb.append("sourceRootCopyFilter and inpathDirCopyFilter"); }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
sb.append(REQ); } if (0 < sb.length()) { throw new BuildException(sb.toString()); } } /** * Run the compile in the same VM by * loading the compiler (Main), * setting up any message holders, * doing the compile, * and converting abort/failure and error messages * to BuildException, as appropriate. * @throws BuildException if abort or failure messages * or if errors and failonerror. * */ protected void executeInSameVM(String[] args) { if (null != maxMem) { log("maxMem ignored unless forked: " + maxMem, Project.MSG_WARN); } IMessageHolder holder = messageHolder; int numPreviousErrors; if (null == holder) { MessageHandler mhandler = new MessageHandler(true); final IMessageHandler delegate; delegate = new AntMessageHandler(this.logger,this.verbose, false); mhandler.setInterceptor(delegate); holder = mhandler; numPreviousErrors = 0;
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
} else { numPreviousErrors = holder.numMessages(IMessage.ERROR, true); } { Main newmain = new Main(); newmain.setHolder(holder); newmain.setCompletionRunner(new Runnable() { public void run() { doCompletionTasks(); } }); if (null != main) { MessageUtil.fail(holder, "still running prior main"); return; } main = newmain; } main.runMain(args, false); if (failonerror) { int errs = holder.numMessages(IMessage.ERROR, false); errs -= numPreviousErrors; if (0 < errs) { String m = errs + " errors"; MessageUtil.print(System.err, holder, "", MessageUtil.MESSAGE_ALL, MessageUtil.PICK_ERROR, true); throw new BuildException(m); } }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
{ IMessage[] fails = holder.getMessages(IMessage.FAIL, true); if (!LangUtil.isEmpty(fails)) { StringBuffer sb = new StringBuffer(); String prefix = "fail due to "; int numThrown = 0; for (int i = 0; i < fails.length; i++) { String message = fails[i].getMessage(); if (LangUtil.isEmpty(message)) { message = "<no message>"; } else if (-1 != message.indexOf(USAGE_SUBSTRING)) { continue; } Throwable t = fails[i].getThrown(); if (null != t) { numThrown++; sb.append(prefix); sb.append(LangUtil.unqualifiedClassName(t.getClass())); String thrownMessage = t.getMessage(); if (!LangUtil.isEmpty(thrownMessage)) { sb.append(" \"" + thrownMessage + "\""); } } sb.append("\"" + message + "\"");
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
prefix = ", "; } if (0 < sb.length()) { sb.append(" (" + numThrown + " exceptions)"); throw new BuildException(sb.toString()); } } } } /** * Execute in a separate VM. * Differences from normal same-VM execution: * <ul> * <li>ignores any message holder {class} set</li> * <li>No resource-copying between interative runs</li> * <li>failonerror fails when process interface fails * to return negative values</li> * </ul> * @param args String[] of the complete compiler command to execute * * @see DefaultCompilerAdapter#executeExternalCompile(String[], int) * @throws BuildException if ajc aborts (negative value) * or if failonerror and there were compile errors. */ protected void executeInOtherVM(String[] args) { javaCmd.setClassname(org.aspectj.tools.ajc.Main.class.getName()); final Path vmClasspath = javaCmd.createClasspath(getProject()); {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
File aspectjtools = null; int vmClasspathSize = vmClasspath.size(); if ((null != forkclasspath) && (0 != forkclasspath.size())) { vmClasspath.addExisting(forkclasspath); } else { aspectjtools = findAspectjtoolsJar(); if (null != aspectjtools) { vmClasspath.createPathElement().setLocation(aspectjtools); } } int newVmClasspathSize = vmClasspath.size(); if (vmClasspathSize == newVmClasspathSize) { String m = "unable to find aspectjtools to fork - "; if (null != aspectjtools) { m += "tried " + aspectjtools.toString(); } else if (null != forkclasspath) { m += "tried " + forkclasspath.toString(); } else { m += "define forkclasspath or put aspectjtools on classpath"; } throw new BuildException(m); } } if (null != maxMem) { javaCmd.setMaxmemory(maxMem); } File tempFile = null; int numArgs = args.length; args = GuardedCommand.limitTo(args, MAX_COMMANDLINE, getLocation());
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
if (args.length != numArgs) { tempFile = new File(args[1]); } try { boolean setMessageHolderOnForking = (this.messageHolder != null); String[] javaArgs = javaCmd.getCommandline(); String[] both = new String[javaArgs.length + args.length + (setMessageHolderOnForking ? 2 : 0)]; System.arraycopy(javaArgs,0,both,0,javaArgs.length); System.arraycopy(args,0,both,javaArgs.length,args.length); if (setMessageHolderOnForking) { both[both.length - 2] = "-messageHolder"; both[both.length - 1] = this.messageHolder.getClass().getName(); } if (both[0].endsWith("java.exe")) { String path = both[0]; path = path.substring(0, path.length()-4); path = path + "w.exe"; File javaw = new File(path); if (javaw.canRead() && javaw.isFile()) { both[0] = path; } } logVerbose("forking " + Arrays.asList(both)); int result = execInOtherVM(both); if (0 > result) { throw new BuildException("failure[" + result + "] running ajc"); } else if (failonerror && (0 < result)) { throw new BuildException("compile errors: " + result); }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
doCompletionTasks(); } finally { if (null != tempFile) { tempFile.delete(); } } } /** * Execute in another process using the same JDK * and the base directory of the project. XXX correct? * @param args * @return */ protected int execInOtherVM(String[] args) { try { Project project = getProject(); PumpStreamHandler handler = new LogStreamHandler(this, verbose ? Project.MSG_VERBOSE : Project.MSG_INFO, Project.MSG_WARN); Execute exe = new Execute(handler); exe.setAntRun(project); exe.setWorkingDirectory(project.getBaseDir()); exe.setCommandline(args); try { if (executingInOtherVM) { String s = "already running in other vm?";
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
throw new BuildException(s, location); } executingInOtherVM = true; exe.execute(); } finally { executingInOtherVM = false; } return exe.getExitValue(); } catch (IOException e) { String m = "Error executing command " + Arrays.asList(args); throw new BuildException(m, e, location); } } protected static void addFlaggedPath(String flag, Path path, List list) { if (!LangUtil.isEmpty(flag) && ((null != path) && (0 < path.size()))) { list.add(flag); list.add(path.toString()); } } /** * Add to list any path or plural arguments. */ protected void addListArgs(List list) throws BuildException { addFlaggedPath("-classpath", classpath, list); addFlaggedPath("-bootclasspath", bootclasspath, list); addFlaggedPath("-extdirs", extdirs, list);
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
addFlaggedPath("-aspectpath", aspectpath, list); addFlaggedPath("-injars", injars, list); addFlaggedPath("-inpath", inpath, list); addFlaggedPath("-sourceroots", sourceRoots, list); if (argfiles != null) { String[] files = argfiles.list(); for (int i = 0; i < files.length; i++) { File argfile = project.resolveFile(files[i]); if (check(argfile, files[i], false, location)) { list.add("-argfile"); list.add(argfile.getAbsolutePath()); } } } if (srcdir != null) { String[] dirs = srcdir.list(); for (int i = 0; i < dirs.length; i++) { File dir = project.resolveFile(dirs[i]); check(dir, dirs[i], true, location); String[] files = getDirectoryScanner(dir).getIncludedFiles(); for (int j = 0; j < files.length; j++) { File file = new File(dir, files[j]); if (FileUtil.hasSourceSuffix(file)) { list.add(file.getAbsolutePath()); } } }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
} if (0 < adapterFiles.size()) { for (Iterator iter = adapterFiles.iterator(); iter.hasNext();) { File file = (File) iter.next(); if (file.canRead() && FileUtil.hasSourceSuffix(file)) { list.add(file.getAbsolutePath()); } else { this.logger.warning("skipping file: " + file); } } } } /** * Throw BuildException unless file is valid. * @param file the File to check * @param name the symbolic name to print on error * @param isDir if true, verify file is a directory * @param loc the Location used to create sensible BuildException * @return * @throws BuildException unless file valid */ protected final boolean check(File file, String name, boolean isDir, Location loc) { loc = loc != null ? loc : location; if (file == null) { throw new BuildException(name + " is null!", loc); } if (!file.exists()) { throw new BuildException(file + " doesn't exist!", loc); }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
if (isDir ^ file.isDirectory()) { String e = file + " should" + (isDir ? "" : "n't") + " be a directory!"; throw new BuildException(e, loc); } return true; } /** * Called when compile or incremental compile is completing, * this completes the output jar or directory * by copying resources if requested. * Note: this is a callback run synchronously by the compiler. * That means exceptions thrown here are caught by Main.run(..) * and passed to the message handler. */ protected void doCompletionTasks() { if (!executing) { throw new IllegalStateException("should be executing"); } if (null != outjar) { completeOutjar(); } else { completeDestdir(); } if (null != xdoneSignal) { MessageUtil.info(messageHolder, xdoneSignal); } }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
/** * Complete the destination directory * by copying resources from the source root directories * (if the filter is specified) * and non-.class files from the input jars * (if XCopyInjars is enabled). */ private void completeDestdir() { if (!copyInjars && (null == sourceRootCopyFilter) && (null == inpathDirCopyFilter)) { return; } else if ((destDir == DEFAULT_DESTDIR) || !destDir.canWrite()) { String s = "unable to copy resources to destDir: " + destDir; throw new BuildException(s); } final Project project = getProject(); if (copyInjars) { if (null != inpath) { log("copyInjars does not support inpath.\n", Project.MSG_WARN); } String taskName = getTaskName() + " - unzip"; String[] paths = injars.list(); if (!LangUtil.isEmpty(paths)) { PatternSet patternSet = new PatternSet(); patternSet.setProject(project); patternSet.setIncludes("**/*"); patternSet.setExcludes("**/*.class"); for (int i = 0; i < paths.length; i++) { Expand unzip = new Expand();
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
unzip.setProject(project); unzip.setTaskName(taskName); unzip.setDest(destDir); unzip.setSrc(new File(paths[i])); unzip.addPatternset(patternSet); unzip.execute(); } } } if ((null != sourceRootCopyFilter) && (null != sourceRoots)) { String[] paths = sourceRoots.list(); if (!LangUtil.isEmpty(paths)) { Copy copy = new Copy(); copy.setProject(project); copy.setTodir(destDir); for (int i = 0; i < paths.length; i++) { FileSet fileSet = new FileSet(); fileSet.setDir(new File(paths[i])); fileSet.setIncludes("**/*"); fileSet.setExcludes(sourceRootCopyFilter); copy.addFileset(fileSet); } copy.execute(); } } if ((null != inpathDirCopyFilter) && (null != inpath)) { String[] paths = inpath.list(); if (!LangUtil.isEmpty(paths)) { Copy copy = new Copy(); copy.setProject(project);
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
copy.setTodir(destDir); boolean gotDir = false; for (int i = 0; i < paths.length; i++) { File inpathDir = new File(paths[i]); if (inpathDir.isDirectory() && inpathDir.canRead()) { if (!gotDir) { gotDir = true; } FileSet fileSet = new FileSet(); fileSet.setDir(inpathDir); fileSet.setIncludes("**/*"); fileSet.setExcludes(inpathDirCopyFilter); copy.addFileset(fileSet); } } if (gotDir) { copy.execute(); } } } } /** * Complete the output jar * by copying resources from the source root directories * if the filter is specified. * and non-.class files from the input jars if enabled. */ private void completeOutjar() { if (((null == tmpOutjar) || !tmpOutjar.canRead())
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|| (!copyInjars && (null == sourceRootCopyFilter) && (null == inpathDirCopyFilter))) { return; } Zip zip = new Zip(); Project project = getProject(); zip.setProject(project); zip.setTaskName(getTaskName() + " - zip"); zip.setDestFile(outjar); ZipFileSet zipfileset = new ZipFileSet(); zipfileset.setProject(project); zipfileset.setSrc(tmpOutjar); zipfileset.setIncludes("**/*.class"); zip.addZipfileset(zipfileset); if (copyInjars) { String[] paths = injars.list(); if (!LangUtil.isEmpty(paths)) { for (int i = 0; i < paths.length; i++) { File jarFile = new File(paths[i]); zipfileset = new ZipFileSet(); zipfileset.setProject(project); zipfileset.setSrc(jarFile); zipfileset.setIncludes("**/*"); zipfileset.setExcludes("**/*.class"); zip.addZipfileset(zipfileset); } } } if ((null != sourceRootCopyFilter) && (null != sourceRoots)) { String[] paths = sourceRoots.list();
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
if (!LangUtil.isEmpty(paths)) { for (int i = 0; i < paths.length; i++) { File srcRoot = new File(paths[i]); FileSet fileset = new FileSet(); fileset.setProject(project); fileset.setDir(srcRoot); fileset.setIncludes("**/*"); fileset.setExcludes(sourceRootCopyFilter); zip.addFileset(fileset); } } } if ((null != inpathDirCopyFilter) && (null != inpath)) { String[] paths = inpath.list(); if (!LangUtil.isEmpty(paths)) { for (int i = 0; i < paths.length; i++) { File inpathDir = new File(paths[i]); if (inpathDir.isDirectory() && inpathDir.canRead()) { FileSet fileset = new FileSet(); fileset.setProject(project); fileset.setDir(inpathDir); fileset.setIncludes("**/*"); fileset.setExcludes(inpathDirCopyFilter); zip.addFileset(fileset); } } } } zip.execute(); }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
/** * Add specified source files. */ void addFiles(File[] paths) { for (int i = 0; i < paths.length; i++) { addFile(paths[i]); } } /** * Add specified source file. */ void addFile(File path) { if (null != path) { adapterFiles.add(path); } } /** * Read arguments in as if from a command line, * mainly to support compiler adapter compilerarg subelement. * * @param args the String[] of arguments to read */ public void readArguments(String[] args) { if ((null == args) || (0 == args.length)) { return; } class Args {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
final String[] args; int index = 0; Args(String[] args) { this.args = args; } boolean hasNext() { return index < args.length; } String next() { String err = null; if (!hasNext()) { err = "need arg for flag " + args[args.length-1]; } else { String s = args[index++]; if (null == s) { err = "null value"; } else { s = s.trim(); if (0 == s.trim().length()) { err = "no value"; } else { return s; } } } err += " at [" + index + "] of " + Arrays.asList(args); throw new BuildException(err); }
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
} Args in = new Args(args); String flag; while (in.hasNext()) { flag = in.next(); if ("-1.3".equals(flag)) { setCompliance(flag); } else if ("-1.4".equals(flag)) { setCompliance(flag); } else if ("-1.5".equals(flag)) { setCompliance("1.5"); } else if ("-argfile".equals(flag)) { setArgfiles(new Path(project, in.next())); } else if ("-aspectpath".equals(flag)) { setAspectpath(new Path(project, in.next())); } else if ("-classpath".equals(flag)) { setClasspath(new Path(project, in.next())); } else if ("-extdirs".equals(flag)) { setExtdirs(new Path(project, in.next())); } else if ("-Xcopyinjars".equals(flag)) { setCopyInjars(true); } else if ("-g".equals(flag)) { setDebug(true); } else if (flag.startsWith("-g:")) { setDebugLevel(flag.substring(2)); } else if ("-deprecation".equals(flag)) { setDeprecation(true); } else if ("-d".equals(flag)) { setDestdir(new File(in.next())); } else if ("-crossrefs".equals(flag)) {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
setCrossrefs(true); } else if ("-emacssym".equals(flag)) { setEmacssym(true); } else if ("-encoding".equals(flag)) { setEncoding(in.next()); } else if ("-Xfailonerror".equals(flag)) { setFailonerror(true); } else if ("-fork".equals(flag)) { setFork(true); } else if ("-forkclasspath".equals(flag)) { setForkclasspath(new Path(project, in.next())); } else if ("-help".equals(flag)) { setHelp(true); } else if ("-incremental".equals(flag)) { setIncremental(true); } else if ("-injars".equals(flag)) { setInjars(new Path(project, in.next())); } else if ("-inpath".equals(flag)) { setInpath(new Path(project,in.next())); } else if ("-Xlistfileargs".equals(flag)) { setListFileArgs(true); } else if ("-Xmaxmem".equals(flag)) { setMaxmem(in.next()); } else if ("-Xmessageholderclass".equals(flag)) { setMessageHolderClass(in.next()); } else if ("-noexit".equals(flag)) { setNoExit(true); } else if ("-noimport".equals(flag)) { setNoExit(true); } else if ("-noExit".equals(flag)) {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
setNoExit(true); } else if ("-noImportError".equals(flag)) { setNoImportError(true); } else if ("-noWarn".equals(flag)) { setNowarn(true); } else if ("-noexit".equals(flag)) { setNoExit(true); } else if ("-outjar".equals(flag)) { setOutjar(new File(in.next())); } else if ("-outxml".equals(flag)) { setOutxml(true); } else if ("-outxmlfile".equals(flag)) { setOutxmlfile(in.next()); } else if ("-preserveAllLocals".equals(flag)) { setPreserveAllLocals(true); } else if ("-proceedOnError".equals(flag)) { setProceedOnError(true); } else if ("-referenceInfo".equals(flag)) { setReferenceInfo(true); } else if ("-source".equals(flag)) { setSource(in.next()); } else if ("-Xsourcerootcopyfilter".equals(flag)) { setSourceRootCopyFilter(in.next()); } else if ("-sourceroots".equals(flag)) { setSourceRoots(new Path(project, in.next())); } else if ("-Xsrcdir".equals(flag)) { setSrcDir(new Path(project, in.next())); } else if ("-Xtagfile".equals(flag)) { setTagFile(new File(in.next())); } else if ("-target".equals(flag)) {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
setTarget(in.next()); } else if ("-time".equals(flag)) { setTime(true); } else if ("-time".equals(flag)) { setTime(true); } else if ("-verbose".equals(flag)) { setVerbose(true); } else if ("-showWeaveInfo".equals(flag)) { setShowWeaveInfo(true); } else if ("-version".equals(flag)) { setVersion(true); } else if ("-warn".equals(flag)) { setWarn(in.next()); } else if (flag.startsWith("-warn:")) { setWarn(flag.substring(6)); } else if ("-Xlint".equals(flag)) { setXlintwarnings(true); } else if (flag.startsWith("-Xlint:")) { setXlint(flag.substring(7)); } else if ("-Xlintfile".equals(flag)) { setXlintfile(new File(in.next())); } else if ("-XterminateAfterCompilation".equals(flag)) { setXTerminateAfterCompilation(true); } else if ("-Xreweavable".equals(flag)) { setXReweavable(true); } else if ("-XnotReweavable".equals(flag)) { setXNotReweavable(true); } else if (flag.startsWith("@")) { File file = new File(flag.substring(1)); if (file.canRead()) {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
setArgfiles(new Path(project, file.getPath())); } else { ignore(flag); } } else { File file = new File(flag); if (file.isFile() && file.canRead() && FileUtil.hasSourceSuffix(file)) { addFile(file); } else { ignore(flag); } } } } protected void logVerbose(String text) { if (this.verbose) { this.logger.info(text); } else { this.logger.verbose(text); } } /** * Commandline wrapper that * only permits addition of non-empty values * and converts to argfile form if necessary. */ public static class GuardedCommand {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
Commandline command; static boolean isEmpty(String s) { return ((null == s) || (0 == s.trim().length())); } GuardedCommand() { command = new Commandline();
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
} void addFlag(String flag, boolean doAdd) { if (doAdd && !isEmpty(flag)) { command.createArgument().setValue(flag); } } String addOption(String prefix, String[] validOptions, String input) { if (isEmpty(input)) { return null; } for (int i = 0; i < validOptions.length; i++) { if (input.equals(validOptions[i])) { if (isEmpty(prefix)) { addFlag(input, true); } else { addFlagged(prefix, input); } return null; } } return (null == prefix ? input : prefix + " " + input); } void addFlagged(String flag, String argument) { if (!isEmpty(flag) && !isEmpty(argument)) { command.addArguments(new String[] {flag, argument});
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
} } List extractArguments() { ArrayList result = new ArrayList(); String[] cmds = command.getArguments(); if (!LangUtil.isEmpty(cmds)) { result.addAll(Arrays.asList(cmds)); } return result; } /** * Adjust args for size if necessary by creating * an argument file, which should be deleted by the client * after the compiler run has completed. * @param max the int maximum length of the command line (in char) * @return the temp File for the arguments (if generated), * for deletion when done. * @throws IllegalArgumentException if max is negative */ static String[] limitTo(String[] args, int max, Location location) { if (max < 0) { throw new IllegalArgumentException("negative max: " + max); } int size = 0; for (int i = 0; (i < args.length) && (size < max); i++) { size += 1 + (null == args[i] ? 0 : args[i].length());
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
} if (size <= max) { return args; } File tmpFile = null; PrintWriter out = null; try { String userDirName = System.getProperty("user.dir"); File userDir = new File(userDirName); tmpFile = File.createTempFile("argfile", "", userDir); out = new PrintWriter(new FileWriter(tmpFile)); for (int i = 0; i < args.length; i++) { out.println(args[i]); } out.flush(); return new String[] {"-argfile", tmpFile.getAbsolutePath()}; } catch (IOException e) { throw new BuildException("Error creating temporary file", e, location); } finally { if (out != null) { try {out.close();} catch (Throwable t) {} } } } } private static class AntMessageHandler implements IMessageHandler { private TaskLogger logger; private final boolean taskLevelVerbose;
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
private final boolean handledMessage; public AntMessageHandler(TaskLogger logger, boolean taskVerbose, boolean handledMessage) { this.logger = logger; this.taskLevelVerbose = taskVerbose; this.handledMessage = handledMessage; } /* (non-Javadoc) * @see org.aspectj.bridge.IMessageHandler#handleMessage(org.aspectj.bridge.IMessage) */ public boolean handleMessage(IMessage message) throws AbortException { Kind messageKind = message.getKind(); String messageText = message.toString(); if (messageKind == IMessage.ABORT) { this.logger.error(messageText); } else if (messageKind == IMessage.DEBUG) { this.logger.debug(messageText); } else if (messageKind == IMessage.ERROR) { this.logger.error(messageText); } else if (messageKind == IMessage.FAIL){ this.logger.error(messageText); } else if (messageKind == IMessage.INFO) { if (this.taskLevelVerbose) { this.logger.info(messageText); } else { this.logger.verbose(messageText); } } else if (messageKind == IMessage.WARNING) {
261,808
Bug 261808 iajc-Ant-Task fails "type already defined"
null
resolved fixed
1da1f7c
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-01-31T04:33:22Z
2009-01-21T12:13:20Z
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
this.logger.warning(messageText); } else if (messageKind == IMessage.WEAVEINFO) { this.logger.info(messageText); } else if (messageKind == IMessage.TASKTAG) { } else { throw new BuildException("Unknown message kind from AspectJ compiler: " + messageKind.toString()); } return handledMessage; } /* (non-Javadoc) * @see org.aspectj.bridge.IMessageHandler#isIgnoring(org.aspectj.bridge.IMessage.Kind) */ public boolean isIgnoring(Kind kind) { return false; } /* (non-Javadoc) * @see org.aspectj.bridge.IMessageHandler#dontIgnore(org.aspectj.bridge.IMessage.Kind) */ public void dontIgnore(Kind kind) { } /* (non-Javadoc) * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind) */ public void ignore(Kind kind) { } } }
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
/* ******************************************************************* * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). * 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.weaver.bcel; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.classfile.ConstantPool; import org.aspectj.apache.bcel.classfile.Method;
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen; import org.aspectj.apache.bcel.generic.FieldGen; import org.aspectj.apache.bcel.generic.FieldInstruction; import org.aspectj.apache.bcel.generic.Instruction; import org.aspectj.apache.bcel.generic.InstructionBranch; import org.aspectj.apache.bcel.generic.InstructionCP; import org.aspectj.apache.bcel.generic.InstructionConstants; import org.aspectj.apache.bcel.generic.InstructionFactory; import org.aspectj.apache.bcel.generic.InstructionHandle; import org.aspectj.apache.bcel.generic.InstructionLV; import org.aspectj.apache.bcel.generic.InstructionList; import org.aspectj.apache.bcel.generic.InstructionSelect; import org.aspectj.apache.bcel.generic.InstructionTargeter; import org.aspectj.apache.bcel.generic.InvokeInstruction; import org.aspectj.apache.bcel.generic.LineNumberTag; import org.aspectj.apache.bcel.generic.LocalVariableTag; import org.aspectj.apache.bcel.generic.MULTIANEWARRAY; import org.aspectj.apache.bcel.generic.MethodGen; import org.aspectj.apache.bcel.generic.ObjectType; import org.aspectj.apache.bcel.generic.RET; import org.aspectj.apache.bcel.generic.Tag; import org.aspectj.apache.bcel.generic.Type; import org.aspectj.asm.AsmManager; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.ISourceLocation; import org.aspectj.bridge.Message; import org.aspectj.bridge.MessageUtil; import org.aspectj.bridge.WeaveMessage; import org.aspectj.bridge.context.CompilationAndWeavingContext; import org.aspectj.bridge.context.ContextToken;
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
import org.aspectj.util.PartialOrder; import org.aspectj.weaver.AjAttribute; import org.aspectj.weaver.AjcMemberMaker; import org.aspectj.weaver.AnnotationAJ; import org.aspectj.weaver.BCException; import org.aspectj.weaver.ConcreteTypeMunger; import org.aspectj.weaver.IClassWeaver; import org.aspectj.weaver.IntMap; import org.aspectj.weaver.Member; import org.aspectj.weaver.MissingResolvedTypeWithKnownSignature; import org.aspectj.weaver.NameMangler; import org.aspectj.weaver.NewConstructorTypeMunger; import org.aspectj.weaver.NewFieldTypeMunger; import org.aspectj.weaver.NewMethodTypeMunger; import org.aspectj.weaver.ResolvedMember; import org.aspectj.weaver.ResolvedMemberImpl; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.ResolvedTypeMunger; import org.aspectj.weaver.Shadow; import org.aspectj.weaver.ShadowMunger; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.WeaverMessages; import org.aspectj.weaver.WeaverStateInfo; import org.aspectj.weaver.World; import org.aspectj.weaver.model.AsmRelationshipProvider; import org.aspectj.weaver.patterns.DeclareAnnotation; import org.aspectj.weaver.patterns.ExactTypePattern; import org.aspectj.weaver.tools.Trace; import org.aspectj.weaver.tools.TraceFactory; class BcelClassWeaver implements IClassWeaver {
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
private static Trace trace = TraceFactory.getTraceFactory().getTrace(BcelClassWeaver.class); /** * This is called from {@link BcelWeaver} to perform the per-class weaving process. */ public static boolean weave(BcelWorld world, LazyClassGen clazz, List shadowMungers, List typeMungers, List lateTypeMungers) { boolean b = new BcelClassWeaver(world, clazz, shadowMungers, typeMungers, lateTypeMungers).weave(); return b; } private final LazyClassGen clazz; private final List shadowMungers; private final List typeMungers; private final List lateTypeMungers; private final BcelObjectType ty; private final BcelWorld world; private final ConstantPool cpg; private final InstructionFactory fact; private final List addedLazyMethodGens = new ArrayList(); private final Set addedDispatchTargets = new HashSet(); private static boolean inReweavableMode = false; private List addedSuperInitializersAsList = null; private final Map addedSuperInitializers = new HashMap(); private final List addedThisInitializers = new ArrayList(); private final List addedClassInitializers = new ArrayList(); >
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
private final Map mapToAnnotations = new HashMap(); /** * This holds the initialization and pre-initialization shadows for this class that were actually matched by mungers (if no * match, then we don't even create the shadows really). */ private final List initializationShadows = new ArrayList(1); private BcelClassWeaver(BcelWorld world, LazyClassGen clazz, List shadowMungers, List typeMungers, List lateTypeMungers) { super(); this.world = world; this.clazz = clazz; this.shadowMungers = shadowMungers; this.typeMungers = typeMungers; this.lateTypeMungers = lateTypeMungers; this.ty = clazz.getBcelObjectType(); this.cpg = clazz.getConstantPool(); this.fact = clazz.getFactory(); fastMatchShadowMungers(shadowMungers); initializeSuperInitializerMap(ty.getResolvedTypeX()); if (!checkedXsetForLowLevelContextCapturing) { Properties p = world.getExtraConfiguration(); if (p != null) { String s = p.getProperty(World.xsetCAPTURE_ALL_CONTEXT, "false"); captureLowLevelContext = s.equalsIgnoreCase("true"); if (captureLowLevelContext) world.getMessageHandler().handleMessage( MessageUtil.info("[" + World.xsetCAPTURE_ALL_CONTEXT + "=true] Enabling collection of low level context for debug/crash messages")); }
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
checkedXsetForLowLevelContextCapturing = true; } } private List[] perKindShadowMungers; private boolean canMatchBodyShadows = false; private void fastMatchShadowMungers(List shadowMungers) { perKindShadowMungers = new List[Shadow.MAX_SHADOW_KIND + 1]; for (int i = 0; i < perKindShadowMungers.length; i++) { perKindShadowMungers[i] = new ArrayList(0); } for (Iterator iter = shadowMungers.iterator(); iter.hasNext();) { ShadowMunger munger = (ShadowMunger) iter.next(); int couldMatchKinds = munger.getPointcut().couldMatchKinds(); for (int i = 0; i < Shadow.SHADOW_KINDS.length; i++) { Shadow.Kind kind = Shadow.SHADOW_KINDS[i]; if (kind.isSet(couldMatchKinds)) perKindShadowMungers[kind.getKey()].add(munger); } } } for (int i = 0; i < Shadow.SHADOW_KINDS.length; i++) {
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
Shadow.Kind kind = Shadow.SHADOW_KINDS[i]; if (!kind.isEnclosingKind() && !perKindShadowMungers[i + 1].isEmpty()) { canMatchBodyShadows = true; } if (perKindShadowMungers[i + 1].isEmpty()) { perKindShadowMungers[i + 1] = null; } } } private boolean canMatch(Shadow.Kind kind) { return perKindShadowMungers[kind.getKey()] != null; } } } private void initializeSuperInitializerMap(ResolvedType child) { ResolvedType[] superInterfaces = child.getDeclaredInterfaces(); for (int i = 0, len = superInterfaces.length; i < len; i++) { if (ty.getResolvedTypeX().isTopmostImplementor(superInterfaces[i])) { if (addSuperInitializer(superInterfaces[i])) { initializeSuperInitializerMap(superInterfaces[i]); }
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
} } } private boolean addSuperInitializer(ResolvedType onType) { if (onType.isRawType() || onType.isParameterizedType()) onType = onType.getGenericType(); IfaceInitList l = (IfaceInitList) addedSuperInitializers.get(onType); if (l != null) return false; l = new IfaceInitList(onType); addedSuperInitializers.put(onType, l); return true; } public void addInitializer(ConcreteTypeMunger cm) { NewFieldTypeMunger m = (NewFieldTypeMunger) cm.getMunger(); ResolvedType onType = m.getSignature().getDeclaringType().resolve(world); if (onType.isRawType()) onType = onType.getGenericType(); if (m.getSignature().isStatic()) { addedClassInitializers.add(cm); } else { if (onType == ty.getResolvedTypeX()) { addedThisInitializers.add(cm); } else { IfaceInitList l = (IfaceInitList) addedSuperInitializers.get(onType); l.list.add(cm); } } } private static class IfaceInitList implements PartialOrder.PartialComparable {
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
final ResolvedType onType; List list = new ArrayList(); IfaceInitList(ResolvedType onType) { this.onType = onType; } public int compareTo(Object other) { IfaceInitList o = (IfaceInitList) other; if (onType.isAssignableFrom(o.onType)) return +1; else if (o.onType.isAssignableFrom(onType)) return -1;
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
else return 0; } public int fallbackCompareTo(Object other) { return 0; } } public boolean addDispatchTarget(ResolvedMember m) { return addedDispatchTargets.add(m); } public void addLazyMethodGen(LazyMethodGen gen) { addedLazyMethodGens.add(gen); } public void addOrReplaceLazyMethodGen(LazyMethodGen mg) { if (alreadyDefined(clazz, mg)) return; for (Iterator i = addedLazyMethodGens.iterator(); i.hasNext();) { LazyMethodGen existing = (LazyMethodGen) i.next(); if (signaturesMatch(mg, existing)) { if (existing.definingType == null) { return; } else if (mg.definingType.isAssignableFrom(existing.definingType)) { return; } else if (existing.definingType.isAssignableFrom(mg.definingType)) { i.remove(); addedLazyMethodGens.add(mg);
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
return; } else { throw new BCException("conflict between: " + mg + " and " + existing); } } } addedLazyMethodGens.add(mg); } private boolean alreadyDefined(LazyClassGen clazz, LazyMethodGen mg) { for (Iterator i = clazz.getMethodGens().iterator(); i.hasNext();) { LazyMethodGen existing = (LazyMethodGen) i.next(); if (signaturesMatch(mg, existing)) { if (!mg.isAbstract() && existing.isAbstract()) { i.remove(); return false; } return true; } } return false; } private boolean signaturesMatch(LazyMethodGen mg, LazyMethodGen existing) { return mg.getName().equals(existing.getName()) && mg.getSignature().equals(existing.getSignature()); } protected static LazyMethodGen makeBridgeMethod(LazyClassGen gen, ResolvedMember member) { int mods = member.getModifiers(); if (Modifier.isAbstract(mods)) mods = mods - Modifier.ABSTRACT; LazyMethodGen ret = new LazyMethodGen(mods, BcelWorld.makeBcelType(member.getReturnType()), member.getName(), BcelWorld
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
.makeBcelTypes(member.getParameterTypes()), UnresolvedType.getNames(member.getExceptions()), gen); return ret; } /** * Create a single bridge method called 'theBridgeMethod' that bridges to 'whatToBridgeTo' */ private static void createBridgeMethod(BcelWorld world, LazyMethodGen whatToBridgeToMethodGen, LazyClassGen clazz, ResolvedMember theBridgeMethod) { InstructionList body; InstructionFactory fact; int pos = 0; ResolvedMember whatToBridgeTo = whatToBridgeToMethodGen.getMemberView(); if (whatToBridgeTo == null) { whatToBridgeTo = new ResolvedMemberImpl(Member.METHOD, whatToBridgeToMethodGen.getEnclosingClass().getType(), whatToBridgeToMethodGen.getAccessFlags(), whatToBridgeToMethodGen.getName(), whatToBridgeToMethodGen .getSignature()); } LazyMethodGen bridgeMethod = makeBridgeMethod(clazz, theBridgeMethod); int newflags = bridgeMethod.getAccessFlags() | 0x00000040; if ((newflags & 0x00000100) != 0) { newflags = newflags - 0x100; } bridgeMethod.setAccessFlags(newflags); Type returnType = BcelWorld.makeBcelType(theBridgeMethod.getReturnType()); Type[] paramTypes = BcelWorld.makeBcelTypes(theBridgeMethod.getParameterTypes()); Type[] newParamTypes = whatToBridgeToMethodGen.getArgumentTypes(); body = bridgeMethod.getBody();
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
fact = clazz.getFactory(); if (!whatToBridgeToMethodGen.isStatic()) { body.append(InstructionFactory.createThis()); pos++; } for (int i = 0, len = paramTypes.length; i < len; i++) { Type paramType = paramTypes[i]; body.append(InstructionFactory.createLoad(paramType, pos)); if (!newParamTypes[i].equals(paramTypes[i])) { if (world.forDEBUG_bridgingCode) System.err.println("Bridging: Cast " + newParamTypes[i] + " from " + paramTypes[i]); body.append(fact.createCast(paramTypes[i], newParamTypes[i])); } pos += paramType.getSize(); } body.append(Utility.createInvoke(fact, world, whatToBridgeTo)); body.append(InstructionFactory.createReturn(returnType)); clazz.addMethodGen(bridgeMethod); } public boolean weave() { if (clazz.isWoven() && !clazz.isReweavable()) { world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ALREADY_WOVEN, clazz.getType().getName()), ty .getSourceLocation(), null); return false; } Set aspectsAffectingType = null; if (inReweavableMode || clazz.getType().isAspect()) aspectsAffectingType = new HashSet(); boolean isChanged = false;
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
if (clazz.getType().isAspect()) isChanged = true; for (Iterator i = typeMungers.iterator(); i.hasNext();) { Object o = i.next(); if (!(o instanceof BcelTypeMunger)) { continue; } BcelTypeMunger munger = (BcelTypeMunger) o; boolean typeMungerAffectedType = munger.munge(this); if (typeMungerAffectedType) { isChanged = true; if (inReweavableMode || clazz.getType().isAspect()) aspectsAffectingType.add(munger.getAspectType().getName()); } } isChanged = weaveDeclareAtMethodCtor(clazz) || isChanged; isChanged = weaveDeclareAtField(clazz) || isChanged; addedSuperInitializersAsList = new ArrayList(addedSuperInitializers.values()); addedSuperInitializersAsList = PartialOrder.sort(addedSuperInitializersAsList); if (addedSuperInitializersAsList == null) { throw new BCException("circularity in inter-types"); }
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
LazyMethodGen staticInit = clazz.getStaticInitializer(); staticInit.getBody().insert(genInitInstructions(addedClassInitializers, true)); List methodGens = new ArrayList(clazz.getMethodGens()); for (Iterator i = methodGens.iterator(); i.hasNext();) { LazyMethodGen mg = (LazyMethodGen) i.next(); if (!mg.hasBody()) continue; if (world.isJoinpointSynchronizationEnabled() && world.areSynchronizationPointcutsInUse() && mg.getMethod().isSynchronized()) { transformSynchronizedMethod(mg); } boolean shadowMungerMatched = match(mg); if (shadowMungerMatched) { if (inReweavableMode || clazz.getType().isAspect()) aspectsAffectingType.addAll(findAspectsForMungers(mg)); isChanged = true; } } for (Iterator i = methodGens.iterator(); i.hasNext();) { LazyMethodGen mg = (LazyMethodGen) i.next(); if (!mg.hasBody()) continue;
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
implement(mg); } if (!initializationShadows.isEmpty()) { while (inlineSelfConstructors(methodGens)) ; positionAndImplement(initializationShadows); } if (lateTypeMungers != null) { for (Iterator i = lateTypeMungers.iterator(); i.hasNext();) { BcelTypeMunger munger = (BcelTypeMunger) i.next(); if (munger.matches(clazz.getType())) { boolean typeMungerAffectedType = munger.munge(this); if (typeMungerAffectedType) { isChanged = true; if (inReweavableMode || clazz.getType().isAspect()) aspectsAffectingType.add(munger.getAspectType().getName()); } } } } );
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
if (isChanged) { clazz.getOrCreateWeaverStateInfo(inReweavableMode); weaveInAddedMethods(); } if (inReweavableMode) { WeaverStateInfo wsi = clazz.getOrCreateWeaverStateInfo(true); wsi.addAspectsAffectingType(aspectsAffectingType); wsi.setUnwovenClassFileData(ty.getJavaClass().getBytes()); wsi.setReweavable(true); } else { clazz.getOrCreateWeaverStateInfo(false).setReweavable(false); } for (Iterator i = methodGens.iterator(); i.hasNext();) { LazyMethodGen mg = (LazyMethodGen) i.next(); BcelMethod bM = mg.getMemberView(); if (bM != null) bM.wipeJoinpointSignatures(); } return isChanged; } /** * Check if a particular method is overriding another - refactored into this helper so it can be used from multiple places. */
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
private static ResolvedMember isOverriding(ResolvedType typeToCheck, ResolvedMember methodThatMightBeGettingOverridden, String mname, String mrettype, int mmods, boolean inSamePackage, UnresolvedType[] methodParamsArray) { if (methodThatMightBeGettingOverridden.isStatic()) return null; if (methodThatMightBeGettingOverridden.isPrivate()) return null; if (!methodThatMightBeGettingOverridden.getName().equals(mname)) return null; if (methodThatMightBeGettingOverridden.getParameterTypes().length != methodParamsArray.length) return null; if (!isVisibilityOverride(mmods, methodThatMightBeGettingOverridden, inSamePackage)) return null; if (typeToCheck.getWorld().forDEBUG_bridgingCode) System.err.println(" Bridging:seriously considering this might be getting overridden '" + methodThatMightBeGettingOverridden + "'"); boolean sameParams = true; for (int p = 0; p < methodThatMightBeGettingOverridden.getParameterTypes().length; p++) { if (!methodThatMightBeGettingOverridden.getParameterTypes()[p].getErasureSignature().equals( methodParamsArray[p].getErasureSignature())) sameParams = false; }
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
if (sameParams) { if (typeToCheck.isParameterizedType()) { return methodThatMightBeGettingOverridden.getBackingGenericMember(); } else if (!methodThatMightBeGettingOverridden.getReturnType().getErasureSignature().equals(mrettype)) { ResolvedType superReturn = typeToCheck.getWorld().resolve( UnresolvedType.forSignature(methodThatMightBeGettingOverridden.getReturnType().getErasureSignature())); ResolvedType subReturn = typeToCheck.getWorld().resolve(UnresolvedType.forSignature(mrettype)); if (superReturn.isAssignableFrom(subReturn)) return methodThatMightBeGettingOverridden; } } return null; } /** * Looks at the visibility modifiers between two methods, and knows whether they are from classes in the same package, and * decides whether one overrides the other. * * @return true if there is an overrides rather than a 'hides' relationship */ static boolean isVisibilityOverride(int methodMods, ResolvedMember inheritedMethod, boolean inSamePackage) { if (inheritedMethod.isStatic()) return false; if (methodMods == inheritedMethod.getModifiers())
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
return true; if (inheritedMethod.isPrivate()) return false; boolean isPackageVisible = !inheritedMethod.isPrivate() && !inheritedMethod.isProtected() && !inheritedMethod.isPublic(); if (isPackageVisible && !inSamePackage) return false; return true; } /** * This method recurses up a specified type looking for a method that overrides the one passed in. * * @return the method being overridden or null if none is found */ public static ResolvedMember checkForOverride(ResolvedType typeToCheck, String mname, String mparams, String mrettype, int mmods, String mpkg, UnresolvedType[] methodParamsArray) { if (typeToCheck == null) return null; if (typeToCheck instanceof MissingResolvedTypeWithKnownSignature) return null; if (typeToCheck.getWorld().forDEBUG_bridgingCode) System.err.println(" Bridging:checking for override of " + mname + " in " + typeToCheck); String packageName = typeToCheck.getPackageName(); if (packageName == null) packageName = ""; boolean inSamePackage = packageName.equals(mpkg); ResolvedMember[] methods = typeToCheck.getDeclaredMethods(); for (int ii = 0; ii < methods.length; ii++) { ResolvedMember methodThatMightBeGettingOverridden = methods[ii];
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
we to ResolvedMember isOverriding = isOverriding(typeToCheck, methodThatMightBeGettingOverridden, mname, mrettype, mmods, inSamePackage, methodParamsArray); if (isOverriding != null) return isOverriding; } List l = typeToCheck.getInterTypeMungers(); for (Iterator iterator = l.iterator(); iterator.hasNext();) { Object o = iterator.next(); if (o instanceof BcelTypeMunger) { BcelTypeMunger element = (BcelTypeMunger) o; if (element.getMunger() instanceof NewMethodTypeMunger) { if (typeToCheck.getWorld().forDEBUG_bridgingCode) System.err.println("Possible ITD candidate " + element); ResolvedMember aMethod = element.getSignature(); ResolvedMember isOverriding = isOverriding(typeToCheck, aMethod, mname, mrettype, mmods, inSamePackage, methodParamsArray); if (isOverriding != null) return isOverriding; } } } if (typeToCheck.equals(UnresolvedType.OBJECT))
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
return null; ResolvedType superclass = typeToCheck.getSuperclass(); ResolvedMember overriddenMethod = checkForOverride(superclass, mname, mparams, mrettype, mmods, mpkg, methodParamsArray); if (overriddenMethod != null) return overriddenMethod; ResolvedType[] interfaces = typeToCheck.getDeclaredInterfaces(); for (int i = 0; i < interfaces.length; i++) { ResolvedType anInterface = interfaces[i]; overriddenMethod = checkForOverride(anInterface, mname, mparams, mrettype, mmods, mpkg, methodParamsArray); if (overriddenMethod != null) return overriddenMethod; } return null; } /** * We need to determine if any methods in this type require bridge methods - this method should only be called if necessary to * do this calculation, i.e. we are on a 1.5 VM (where covariance/generics exist) and the type hierarchy for the specified class * has changed (via decp/itd). * * See pr108101 */ public static boolean calculateAnyRequiredBridgeMethods(BcelWorld world, LazyClassGen clazz) { world.ensureAdvancedConfigurationProcessed(); if (!world.isInJava5Mode()) return false; if (clazz.isInterface()) return false; boolean didSomething = false;
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
List methods = clazz.getMethodGens(); Set methodsSet = new HashSet(); for (int i = 0; i < methods.size(); i++) { LazyMethodGen aMethod = (LazyMethodGen) methods.get(i); methodsSet.add(aMethod.getName() + aMethod.getSignature()); } for (int i = 0; i < methods.size(); i++) { LazyMethodGen bridgeToCandidate = (LazyMethodGen) methods.get(i); if (bridgeToCandidate.isBridgeMethod()) continue; String name = bridgeToCandidate.getName(); String psig = bridgeToCandidate.getParameterSignature(); String rsig = bridgeToCandidate.getReturnType().getSignature(); if (bridgeToCandidate.isStatic()) continue; if (name.endsWith("init>")) continue; if (world.forDEBUG_bridgingCode) System.err.println("Bridging: Determining if we have to bridge to " + clazz.getName() + "." + name + "" + bridgeToCandidate.getSignature()); ResolvedType theSuperclass = clazz.getSuperClass(); if (world.forDEBUG_bridgingCode) {
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
System.err.println("Bridging: Checking supertype " + theSuperclass); } String pkgName = clazz.getPackageName(); UnresolvedType[] bm = BcelWorld.fromBcel(bridgeToCandidate.getArgumentTypes()); ResolvedMember overriddenMethod = checkForOverride(theSuperclass, name, psig, rsig, bridgeToCandidate.getAccessFlags(), pkgName, bm); if (overriddenMethod != null) { String key = new StringBuffer().append(overriddenMethod.getName()).append(overriddenMethod.getSignatureErased()) .toString(); boolean alreadyHaveABridgeMethod = methodsSet.contains(key); if (!alreadyHaveABridgeMethod) { if (world.forDEBUG_bridgingCode) { System.err.println("Bridging:bridging to '" + overriddenMethod + "'"); } createBridgeMethod(world, bridgeToCandidate, clazz, overriddenMethod); methodsSet.add(key); didSomething = true; continue; } } String[] interfaces = clazz.getInterfaceNames(); for (int j = 0; j < interfaces.length; j++) { if (world.forDEBUG_bridgingCode) System.err.println("Bridging:checking superinterface " + interfaces[j]); ResolvedType interfaceType = world.resolve(interfaces[j]); overriddenMethod = checkForOverride(interfaceType, name, psig, rsig, bridgeToCandidate.getAccessFlags(), clazz .getPackageName(), bm); if (overriddenMethod != null) { String key = new StringBuffer().append(overriddenMethod.getName())
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
.append(overriddenMethod.getSignatureErased()).toString(); pr boolean alreadyHaveABridgeMethod = methodsSet.contains(key); if (!alreadyHaveABridgeMethod) { createBridgeMethod(world, bridgeToCandidate, clazz, overriddenMethod); methodsSet.add(key); didSomething = true; if (world.forDEBUG_bridgingCode) System.err.println("Bridging:bridging to " + overriddenMethod); continue; } } } } return didSomething; } /** * Weave any declare @method/@ctor statements into the members of the supplied class */ private boolean weaveDeclareAtMethodCtor(LazyClassGen clazz) { List reportedProblems = new ArrayList(); List allDecams = world.getDeclareAnnotationOnMethods(); if (allDecams.isEmpty()) return false; boolean isChanged = false; List itdMethodsCtors = getITDSubset(clazz, ResolvedTypeMunger.Method); itdMethodsCtors.addAll(getITDSubset(clazz, ResolvedTypeMunger.Constructor));
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
if (!itdMethodsCtors.isEmpty()) { isChanged = weaveAtMethodOnITDSRepeatedly(allDecams, itdMethodsCtors, reportedProblems); } List members = clazz.getMethodGens(); List decaMs = getMatchingSubset(allDecams, clazz.getType()); if (decaMs.isEmpty()) return false; if (!members.isEmpty()) { Set unusedDecams = new HashSet(); unusedDecams.addAll(decaMs); for (int memberCounter = 0; memberCounter < members.size(); memberCounter++) { LazyMethodGen mg = (LazyMethodGen) members.get(memberCounter); if (!mg.getName().startsWith(NameMangler.PREFIX)) { List worthRetrying = new ArrayList(); boolean modificationOccured = false; List annotationsToAdd = null; for (Iterator iter = decaMs.iterator(); iter.hasNext();) { DeclareAnnotation decaM = (DeclareAnnotation) iter.next(); if (decaM.matches(mg.getMemberView(), world)) { if (doesAlreadyHaveAnnotation(mg.getMemberView(), decaM, reportedProblems)) { unusedDecams.remove(decaM); continue; }
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
if (annotationsToAdd == null) annotationsToAdd = new ArrayList(); AnnotationGen a = ((BcelAnnotation) decaM.getAnnotationX()).getBcelAnnotation(); AnnotationGen ag = new AnnotationGen(a, clazz.getConstantPool(), true); annotationsToAdd.add(ag); mg.addAnnotation(decaM.getAnnotationX()); AsmRelationshipProvider.getDefault().addDeclareAnnotationMethodRelationship(decaM.getSourceLocation(), clazz.getName(), mg.getMemberView(), world.getModelAsAsmManager()); reportMethodCtorWeavingMessage(clazz, mg.getMemberView(), decaM, mg.getDeclarationLineNumber()); isChanged = true; modificationOccured = true; unusedDecams.remove(decaM); } else { if (!decaM.isStarredAnnotationPattern()) worthRetrying.add(decaM); } } while (!worthRetrying.isEmpty() && modificationOccured) { modificationOccured = false; List forRemoval = new ArrayList(); for (Iterator iter = worthRetrying.iterator(); iter.hasNext();) { DeclareAnnotation decaM = (DeclareAnnotation) iter.next();
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
if (decaM.matches(mg.getMemberView(), world)) { if (doesAlreadyHaveAnnotation(mg.getMemberView(), decaM, reportedProblems)) { unusedDecams.remove(decaM); continue; } if (annotationsToAdd == null) annotationsToAdd = new ArrayList(); AnnotationGen a = ((BcelAnnotation) decaM.getAnnotationX()).getBcelAnnotation(); annotationsToAdd.add(a); mg.addAnnotation(decaM.getAnnotationX()); AsmRelationshipProvider.getDefault().addDeclareAnnotationMethodRelationship( decaM.getSourceLocation(), clazz.getName(), mg.getMemberView(), world.getModelAsAsmManager()); isChanged = true; modificationOccured = true; forRemoval.add(decaM); unusedDecams.remove(decaM); } } worthRetrying.removeAll(forRemoval); }
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
if (annotationsToAdd != null) { Method oldMethod = mg.getMethod(); MethodGen myGen = new MethodGen(oldMethod, clazz.getClassName(), clazz.getConstantPool(), false); . for (Iterator iter = annotationsToAdd.iterator(); iter.hasNext();) { AnnotationGen a = (AnnotationGen) iter.next(); myGen.addAnnotation(a); } Method newMethod = myGen.getMethod(); members.set(memberCounter, new LazyMethodGen(newMethod, clazz)); } } } checkUnusedDeclareAtTypes(unusedDecams, false); } return isChanged; } private void reportMethodCtorWeavingMessage(LazyClassGen clazz, ResolvedMember member, DeclareAnnotation decaM, int memberLineNumber) {
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
if (!getWorld().getMessageHandler().isIgnoring(IMessage.WEAVEINFO)) { StringBuffer parmString = new StringBuffer("("); UnresolvedType[] paramTypes = member.getParameterTypes(); for (int i = 0; i < paramTypes.length; i++) { UnresolvedType type = paramTypes[i]; String s = org.aspectj.apache.bcel.classfile.Utility.signatureToString(type.getSignature()); if (s.lastIndexOf('.') != -1) s = s.substring(s.lastIndexOf('.') + 1); parmString.append(s); if ((i + 1) < paramTypes.length) parmString.append(","); } parmString.append(")"); String methodName = member.getName(); StringBuffer sig = new StringBuffer(); sig.append(org.aspectj.apache.bcel.classfile.Utility.accessToString(member.getModifiers())); sig.append(" "); sig.append(member.getReturnType().toString()); sig.append(" "); sig.append(member.getDeclaringType().toString()); sig.append("."); sig.append(methodName.equals("<init>") ? "new" : methodName); sig.append(parmString); StringBuffer loc = new StringBuffer(); if (clazz.getFileName() == null) { loc.append("no debug info available"); } else { loc.append(clazz.getFileName()); if (memberLineNumber != -1) { loc.append(":" + memberLineNumber);
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
} } getWorld().getMessageHandler().handleMessage( WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ANNOTATES, new String[] { sig.toString(), loc.toString(), decaM.getAnnotationString(), methodName.startsWith("<init>") ? "constructor" : "method", decaM.getAspect().toString(), Utility.beautifyLocation(decaM.getSourceLocation()) })); } } /** * Looks through a list of declare annotation statements and only returns those that could possibly match on a field/method/ctor * in type. */ private List getMatchingSubset(List declareAnnotations, ResolvedType type) { List subset = new ArrayList(); for (Iterator iter = declareAnnotations.iterator(); iter.hasNext();) { DeclareAnnotation da = (DeclareAnnotation) iter.next(); if (da.couldEverMatch(type)) { subset.add(da); } } return subset; } /** * Get a subset of all the type mungers defined on this aspect */ private List getITDSubset(LazyClassGen clazz, ResolvedTypeMunger.Kind wantedKind) { List subset = new ArrayList(); Collection c = clazz.getBcelObjectType().getTypeMungers(); for (Iterator iter = c.iterator(); iter.hasNext();) {
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
BcelTypeMunger typeMunger = (BcelTypeMunger) iter.next(); if (typeMunger.getMunger().getKind() == wantedKind) subset.add(typeMunger); } return subset; } public LazyMethodGen locateAnnotationHolderForFieldMunger(LazyClassGen clazz, BcelTypeMunger fieldMunger) { NewFieldTypeMunger nftm = (NewFieldTypeMunger) fieldMunger.getMunger(); ResolvedMember lookingFor = AjcMemberMaker.interFieldInitializer(nftm.getSignature(), clazz.getType()); List meths = clazz.getMethodGens(); for (Iterator iter = meths.iterator(); iter.hasNext();) { LazyMethodGen element = (LazyMethodGen) iter.next(); if (element.getName().equals(lookingFor.getName())) return element; } return null; } public LazyMethodGen locateAnnotationHolderForMethodCtorMunger(LazyClassGen clazz, BcelTypeMunger methodCtorMunger) { ResolvedTypeMunger rtMunger = methodCtorMunger.getMunger(); ResolvedMember lookingFor = null; if (rtMunger instanceof NewMethodTypeMunger) { NewMethodTypeMunger nftm = (NewMethodTypeMunger) rtMunger; lookingFor = AjcMemberMaker.interMethodDispatcher(nftm.getSignature(), methodCtorMunger.getAspectType()); } else if (rtMunger instanceof NewConstructorTypeMunger) { NewConstructorTypeMunger nftm = (NewConstructorTypeMunger) rtMunger; lookingFor = AjcMemberMaker.postIntroducedConstructor(methodCtorMunger.getAspectType(), nftm.getSignature() .getDeclaringType(), nftm.getSignature().getParameterTypes()); } else { throw new BCException("Not sure what this is: " + methodCtorMunger);
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
} List meths = clazz.getMethodGens(); String name = lookingFor.getName(); String paramSignature = lookingFor.getParameterSignature(); for (Iterator iter = meths.iterator(); iter.hasNext();) { LazyMethodGen element = (LazyMethodGen) iter.next(); if (element.getName().equals(name) && element.getParameterSignature().equals(paramSignature)) { return element; } } return null; } /** * Applies some set of declare @field constructs (List<DeclareAnnotation>) to some bunch of ITDfields (List<BcelTypeMunger>. It * will iterate over the fields repeatedly until everything has been applied. * */ private boolean weaveAtFieldRepeatedly(List decaFs, List itdFields, List reportedErrors) { boolean isChanged = false; for (Iterator iter = itdFields.iterator(); iter.hasNext();) { BcelTypeMunger fieldMunger = (BcelTypeMunger) iter.next(); ResolvedMember itdIsActually = fieldMunger.getSignature(); List worthRetrying = new ArrayList(); boolean modificationOccured = false; for (Iterator iter2 = decaFs.iterator(); iter2.hasNext();) { DeclareAnnotation decaF = (DeclareAnnotation) iter2.next(); if (decaF.matches(itdIsActually, world)) { LazyMethodGen annotationHolder = locateAnnotationHolderForFieldMunger(clazz, fieldMunger); if (doesAlreadyHaveAnnotation(annotationHolder, itdIsActually, decaF, reportedErrors)) continue;
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
annotationHolder.addAnnotation(decaF.getAnnotationX()); AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(world.getModelAsAsmManager(), decaF.getSourceLocation(), itdIsActually.getSourceLocation()); isChanged = true; modificationOccured = true; } else { if (!decaF.isStarredAnnotationPattern()) worthRetrying.add(decaF); } } while (!worthRetrying.isEmpty() && modificationOccured) { modificationOccured = false; List forRemoval = new ArrayList(); for (Iterator iter2 = worthRetrying.iterator(); iter2.hasNext();) { DeclareAnnotation decaF = (DeclareAnnotation) iter2.next(); if (decaF.matches(itdIsActually, world)) { LazyMethodGen annotationHolder = locateAnnotationHolderForFieldMunger(clazz, fieldMunger); if (doesAlreadyHaveAnnotation(annotationHolder, itdIsActually, decaF, reportedErrors)) continue; annotationHolder.addAnnotation(decaF.getAnnotationX()); AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(world.getModelAsAsmManager(), decaF.getSourceLocation(), itdIsActually.getSourceLocation()); isChanged = true; modificationOccured = true; forRemoval.add(decaF); } worthRetrying.removeAll(forRemoval); }
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
} } return isChanged; } /** * Applies some set of declare @method/@ctor constructs (List<DeclareAnnotation>) to some bunch of ITDmembers * (List<BcelTypeMunger>. It will iterate over the fields repeatedly until everything has been applied. */ private boolean weaveAtMethodOnITDSRepeatedly(List decaMCs, List itdsForMethodAndConstructor, List reportedErrors) { boolean isChanged = false; AsmManager asmManager = world.getModelAsAsmManager(); for (Iterator iter = itdsForMethodAndConstructor.iterator(); iter.hasNext();) { BcelTypeMunger methodctorMunger = (BcelTypeMunger) iter.next(); ResolvedMember unMangledInterMethod = methodctorMunger.getSignature(); List worthRetrying = new ArrayList(); boolean modificationOccured = false; for (Iterator iter2 = decaMCs.iterator(); iter2.hasNext();) { DeclareAnnotation decaMC = (DeclareAnnotation) iter2.next(); if (decaMC.matches(unMangledInterMethod, world)) { LazyMethodGen annotationHolder = locateAnnotationHolderForMethodCtorMunger(clazz, methodctorMunger); if (annotationHolder == null || doesAlreadyHaveAnnotation(annotationHolder, unMangledInterMethod, decaMC, reportedErrors)) { continue; } annotationHolder.addAnnotation(decaMC.getAnnotationX()); isChanged = true; AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(asmManager, decaMC.getSourceLocation(), unMangledInterMethod.getSourceLocation()); reportMethodCtorWeavingMessage(clazz, unMangledInterMethod, decaMC, -1); modificationOccured = true;
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
} else { if (!decaMC.isStarredAnnotationPattern()) { worthRetrying.add(decaMC); } } } while (!worthRetrying.isEmpty() && modificationOccured) { modificationOccured = false; List forRemoval = new ArrayList(); for (Iterator iter2 = worthRetrying.iterator(); iter2.hasNext();) { DeclareAnnotation decaMC = (DeclareAnnotation) iter2.next(); if (decaMC.matches(unMangledInterMethod, world)) { LazyMethodGen annotationHolder = locateAnnotationHolderForFieldMunger(clazz, methodctorMunger); if (doesAlreadyHaveAnnotation(annotationHolder, unMangledInterMethod, decaMC, reportedErrors)) continue; annotationHolder.addAnnotation(decaMC.getAnnotationX()); unMangledInterMethod.addAnnotation(decaMC.getAnnotationX()); AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(asmManager, decaMC.getSourceLocation(), unMangledInterMethod.getSourceLocation()); isChanged = true; modificationOccured = true; forRemoval.add(decaMC); } worthRetrying.removeAll(forRemoval); } } } return isChanged; }
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
private boolean dontAddTwice(DeclareAnnotation decaF, AnnotationAJ[] dontAddMeTwice) { for (int i = 0; i < dontAddMeTwice.length; i++) { AnnotationAJ ann = dontAddMeTwice[i]; if (ann != null && decaF.getAnnotationX().getTypeName().equals(ann.getTypeName())) { return true; } } return false; } /** * Weave any declare @field statements into the fields of the supplied class * * Interesting case relating to public ITDd fields. The annotations are really stored against the interfieldinit method in the * aspect, but the public field is placed in the target type and then is processed in the 2nd pass over fields that occurs. I * think it would be more expensive to avoid putting the annotation on that inserted public field than just to have it put there * as well as on the interfieldinit method. */ private boolean weaveDeclareAtField(LazyClassGen clazz) { List reportedProblems = new ArrayList(); List allDecafs = world.getDeclareAnnotationOnFields();
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
if (allDecafs.isEmpty()) return false; boolean isChanged = false; List itdFields = getITDSubset(clazz, ResolvedTypeMunger.Field); if (itdFields != null) { isChanged = weaveAtFieldRepeatedly(allDecafs, itdFields, reportedProblems); } List decaFs = getMatchingSubset(allDecafs, clazz.getType()); if (decaFs.isEmpty()) return false; List fields = clazz.getFieldGens(); if (fields != null) { Set unusedDecafs = new HashSet(); unusedDecafs.addAll(decaFs); for (int fieldCounter = 0; fieldCounter < fields.size(); fieldCounter++) { BcelField aBcelField = (BcelField) fields.get(fieldCounter); if (!aBcelField.getName().startsWith(NameMangler.PREFIX)) { List worthRetrying = new ArrayList(); boolean modificationOccured = false; AnnotationAJ[] dontAddMeTwice = aBcelField.getAnnotations(); for (Iterator iter = decaFs.iterator(); iter.hasNext();) { DeclareAnnotation decaF = (DeclareAnnotation) iter.next(); if (decaF.matches(aBcelField, world)) { if (!dontAddTwice(decaF, dontAddMeTwice)) { if (doesAlreadyHaveAnnotation(aBcelField, decaF, reportedProblems)) {
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
unusedDecafs.remove(decaF); continue; } if (decaF.getAnnotationX().isRuntimeVisible()) { ( . aBcelField.addAnnotation(decaF.getAnnotationX()); } else {
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
aBcelField.addAnnotation(decaF.getAnnotationX()); } } AsmRelationshipProvider.getDefault().addDeclareAnnotationFieldRelationship( world.getModelAsAsmManager(), decaF.getSourceLocation(), clazz.getName(), aBcelField); reportFieldAnnotationWeavingMessage(clazz, fields, fieldCounter, decaF); isChanged = true; modificationOccured = true; unusedDecafs.remove(decaF); } else { if (!decaF.isStarredAnnotationPattern()) worthRetrying.add(decaF); } } while (!worthRetrying.isEmpty() && modificationOccured) { modificationOccured = false; List forRemoval = new ArrayList(); for (Iterator iter = worthRetrying.iterator(); iter.hasNext();) { DeclareAnnotation decaF = (DeclareAnnotation) iter.next(); if (decaF.matches(aBcelField, world)) { if (doesAlreadyHaveAnnotation(aBcelField, decaF, reportedProblems)) {
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
unusedDecafs.remove(decaF); continue; } aBcelField.addAnnotation(decaF.getAnnotationX()); AsmRelationshipProvider.getDefault().addDeclareAnnotationFieldRelationship( world.getModelAsAsmManager(), decaF.getSourceLocation(), clazz.getName(), aBcelField); isChanged = true; modificationOccured = true; forRemoval.add(decaF); unusedDecafs.remove(decaF); } } worthRetrying.removeAll(forRemoval); } } } checkUnusedDeclareAtTypes(unusedDecafs, true); } return isChanged; } /** * Report an error if the reason a "declare @method/ctor/field" was not used was because the member specified does not exist. * This method is passed some set of declare statements that didn't match and a flag indicating whether the set contains declare @field * or declare @method/ctor entries.
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
*/ private void checkUnusedDeclareAtTypes(Set unusedDecaTs, boolean isDeclareAtField) { for (Iterator iter = unusedDecaTs.iterator(); iter.hasNext();) { DeclareAnnotation declA = (DeclareAnnotation) iter.next(); if ((declA.isExactPattern() || (declA.getSignaturePattern().getDeclaringType() instanceof ExactTypePattern)) && (!declA.getSignaturePattern().getName().isAny() || (declA.getKind() == DeclareAnnotation.AT_CONSTRUCTOR))) { boolean itdMatch = false; List lst = clazz.getType().getInterTypeMungers(); for (Iterator iterator = lst.iterator(); iterator.hasNext() && !itdMatch;) { ConcreteTypeMunger element = (ConcreteTypeMunger) iterator.next(); if (element.getMunger() instanceof NewFieldTypeMunger) { NewFieldTypeMunger nftm = (NewFieldTypeMunger) element.getMunger(); itdMatch = declA.getSignaturePattern().matches(nftm.getSignature(), world, false); } else if (element.getMunger() instanceof NewMethodTypeMunger) { NewMethodTypeMunger nmtm = (NewMethodTypeMunger) element.getMunger(); itdMatch = declA.getSignaturePattern().matches(nmtm.getSignature(), world, false); } else if (element.getMunger() instanceof NewConstructorTypeMunger) { NewConstructorTypeMunger nctm = (NewConstructorTypeMunger) element.getMunger(); itdMatch = declA.getSignaturePattern().matches(nctm.getSignature(), world, false); } } if (!itdMatch) { IMessage message = null; if (isDeclareAtField) { message = new Message("The field '" + declA.getSignaturePattern().toString() + "' does not exist", declA .getSourceLocation(), true); } else { message = new Message("The method '" + declA.getSignaturePattern().toString() + "' does not exist", declA
263,837
Bug 263837 Error during Delete AJ Markers
Error sent through the AJDT mailing list. I believe this is an LTW weaving error, so not raising it against AJDT.
resolved fixed
1b54b4b
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2009-02-06T00:15:57Z
2009-02-05T18:53:20Z
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
.getSourceLocation(), true); } world.getMessageHandler().handleMessage(message); } } } } private void reportFieldAnnotationWeavingMessage(LazyClassGen clazz, List fields, int fieldCounter, DeclareAnnotation decaF) { if (!getWorld().getMessageHandler().isIgnoring(IMessage.WEAVEINFO)) { BcelField theField = (BcelField) fields.get(fieldCounter); world.getMessageHandler().handleMessage( WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ANNOTATES, new String[] { theField.getFieldAsIs().toString() + "' of type '" + clazz.getName(), clazz.getFileName(), decaF.getAnnotationString(), "field", decaF.getAspect().toString(), Utility.beautifyLocation(decaF.getSourceLocation()) })); } } /** * Check if a resolved member (field/method/ctor) already has an annotation, if it does then put out a warning and return true */ private boolean doesAlreadyHaveAnnotation(ResolvedMember rm, DeclareAnnotation deca, List reportedProblems) { if (rm.hasAnnotation(deca.getAnnotationTypeX())) { if (world.getLint().elementAlreadyAnnotated.isEnabled()) { Integer uniqueID = new Integer(rm.hashCode() * deca.hashCode()); if (!reportedProblems.contains(uniqueID)) { reportedProblems.add(uniqueID); world.getLint().elementAlreadyAnnotated.signal(new String[] { rm.toString(), deca.getAnnotationTypeX().toString() }, rm.getSourceLocation(), new ISourceLocation[] { deca .getSourceLocation() });