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
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
* instances to determine the set of aspects to be used ofr weaving. * @param loader instance of <code>ClassLoader</code> */ public WeavingAdaptor (WeavingClassLoader loader) { generatedClassHandler = loader; init(getFullClassPath((ClassLoader)loader),getFullAspectPath((ClassLoader)loader)); } /** * Construct a WeavingAdator with a reference to a * <code>GeneratedClassHandler</code>, a full search path for resolving * classes and a complete set of aspects. The search path must include * classes loaded by the class loader constructing the WeavingAdaptor and * all its parents in the hierarchy. * @param handler <code>GeneratedClassHandler</code> * @param classURLs the URLs from which to resolve classes * @param aspectURLs the aspects used to weave classes defined by this class loader */ public WeavingAdaptor (GeneratedClassHandler handler, URL[] classURLs, URL[] aspectURLs) { generatedClassHandler = handler; init(FileUtil.makeClasspath(classURLs),FileUtil.makeClasspath(aspectURLs)); } private List getFullClassPath (ClassLoader loader) { List list = new LinkedList(); for (; loader != null; loader = loader.getParent()) { if (loader instanceof URLClassLoader) { URL[] urls = ((URLClassLoader)loader).getURLs(); list.addAll(0,FileUtil.makeClasspath(urls)); } else {
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
warn("cannot determine classpath"); } } list.addAll(0,makeClasspath(System.getProperty("sun.boot.class.path"))); return list; } private List getFullAspectPath (ClassLoader loader) { List list = new LinkedList(); for (; loader != null; loader = loader.getParent()) { if (loader instanceof WeavingClassLoader) { URL[] urls = ((WeavingClassLoader)loader).getAspectURLs(); list.addAll(0,FileUtil.makeClasspath(urls)); } } return list; } private static boolean getVerbose () { return Boolean.getBoolean(WEAVING_ADAPTOR_VERBOSE); } private void init(List classPath, List aspectPath) { createMessageHandler(); info("using classpath: " + classPath); info("using aspectpath: " + aspectPath); bcelWorld = new BcelWorld(classPath,messageHandler,null); bcelWorld.setXnoInline(false);
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
bcelWorld.getLint().loadDefaultProperties(); if (LangUtil.is15VMOrGreater()) { bcelWorld.setBehaveInJava5Way(true); } weaver = new BcelWeaver(bcelWorld); registerAspectLibraries(aspectPath); } protected void createMessageHandler() { messageHolder = new WeavingAdaptorMessageHandler(new PrintWriter(System.err)); messageHandler = messageHolder; if (verbose) messageHandler.dontIgnore(IMessage.INFO); if (Boolean.getBoolean(SHOW_WEAVE_INFO_PROPERTY)) messageHandler.dontIgnore(IMessage.WEAVEINFO); info("AspectJ Weaver Version " + Version.text + " built on " + Version.time_text); } protected IMessageHandler getMessageHandler () { return messageHandler; } protected void setMessageHandler (IMessageHandler mh) { if (mh instanceof ISupportsMessageContext) { ISupportsMessageContext smc = (ISupportsMessageContext)mh; smc.setMessageContext(this); } if (mh != messageHolder) messageHolder.setDelegate(mh); messageHolder.flushMessages(); } protected void disable () { enabled = false;
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
messageHolder.flushMessages(); } protected boolean isEnabled () { return enabled; } /** * Appends URL to path used by the WeavingAdptor to resolve classes * @param url to be appended to search path */ public void addURL(URL url) { File libFile = new File(url.getPath()); try { weaver.addLibraryJarFile(libFile); } catch (IOException ex) { warn("bad library: '" + libFile + "'"); } } /** * Weave a class using aspects previously supplied to the adaptor. * @param name the name of the class * @param bytes the class bytes * @return the woven bytes * @exception IOException weave failed */ public byte[] weaveClass (String name, byte[] bytes) throws IOException { if (enabled) { try {
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
delegateForCurrentClass=null; if (trace.isTraceEnabled()) trace.enter("weaveClass",this,new Object[] {name,bytes}); name = name.replace('/','.'); if (couldWeave(name, bytes)) { if (accept(name, bytes)) { info("weaving '" + name + "'"); bytes = getWovenBytes(name, bytes); } else if (shouldWeaveAnnotationStyleAspect(name, bytes)) { info("weaving '" + name + "'"); bytes = getAtAspectJAspectBytes(name, bytes); } else { info("not weaving '" + name + "'"); } } else { info("cannot weave '" + name + "'"); } if (trace.isTraceEnabled()) trace.exit("weaveClass",bytes); } finally { delegateForCurrentClass=null; } } return bytes; }
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
/** * @param name * @return true if even valid to weave: either with an accept check or to munge it for @AspectJ aspectof support */ private boolean couldWeave (String name, byte[] bytes) { return !generatedClasses.containsKey(name) && shouldWeaveName(name); } protected boolean accept(String name, byte[] bytes) { return true; } protected boolean shouldDump(String name, boolean before) { return false; } private boolean shouldWeaveName (String name) { boolean should = !((name.startsWith("org.aspectj.") || name.startsWith("java.") || name.startsWith("javax.")) || name.startsWith("sun.reflect.")); return should; } /** * We allow @AJ aspect weaving so that we can add aspectOf() as part of the weaving * (and not part of the source compilation) * * @param name * @param bytes bytecode (from classloader), allow to NOT lookup stuff on disk again during resolve * @return true if @Aspect
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
*/ private boolean shouldWeaveAnnotationStyleAspect(String name, byte[] bytes) { if (delegateForCurrentClass==null) { if (weaver.getWorld().isASMAround()) return asmCheckAnnotationStyleAspect(bytes); else ensureDelegateInitialized(name, bytes); } return (delegateForCurrentClass.isAnnotationStyleAspect()); } private boolean asmCheckAnnotationStyleAspect(byte[] bytes) { IsAtAspectAnnotationVisitor detector = new IsAtAspectAnnotationVisitor(); ClassReader cr = new ClassReader(bytes); try { cr.accept(detector, true); } catch (Exception spe) { System.err.println("Unexpected problem parsing bytes to discover @Aspect annotation"); spe.printStackTrace(); return false; } return detector.isAspect(); } protected void ensureDelegateInitialized(String name,byte[] bytes) { if (delegateForCurrentClass==null) delegateForCurrentClass = ((BcelWorld)weaver.getWorld()).addSourceObjectType(Utility.makeJavaClass(name, bytes)); } /** * Weave a set of bytes defining a class. * @param name the name of the class being woven
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
* @param bytes the bytes that define the class * @return byte[] the woven bytes for the class * @throws IOException */ private byte[] getWovenBytes(String name, byte[] bytes) throws IOException { WeavingClassFileProvider wcp = new WeavingClassFileProvider(name,bytes); weaver.weave(wcp); return wcp.getBytes(); } /** * Weave a set of bytes defining a class for only what is needed to turn @AspectJ aspect * in a usefull form ie with aspectOf method - see #113587 * @param name the name of the class being woven * @param bytes the bytes that define the class * @return byte[] the woven bytes for the class * @throws IOException */ private byte[] getAtAspectJAspectBytes(String name, byte[] bytes) throws IOException { WeavingClassFileProvider wcp = new WeavingClassFileProvider(name,bytes); wcp.setApplyAtAspectJMungersOnly(); weaver.weave(wcp); return wcp.getBytes(); } private void registerAspectLibraries(List aspectPath) { for (Iterator i = aspectPath.iterator(); i.hasNext();) { String libName = (String)i.next(); addAspectLibrary(libName); } weaver.prepareForWeave();
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
} /* * Register an aspect library with this classloader for use during * weaving. This class loader will also return (unmodified) any of the * classes in the library in response to a <code>findClass()</code> request. * The library is not required to be on the weavingClasspath given when this * classloader was constructed. * @param aspectLibraryJarFile a jar file representing an aspect library * @throws IOException */ private void addAspectLibrary(String aspectLibraryName) { File aspectLibrary = new File(aspectLibraryName); if (aspectLibrary.isDirectory() || (FileUtil.isZipFile(aspectLibrary))) { try { info("adding aspect library: '" + aspectLibrary + "'"); weaver.addLibraryJarFile(aspectLibrary); } catch (IOException ex) { error("exception adding aspect library: '" + ex + "'"); } } else { error("bad aspect library: '" + aspectLibrary + "'"); } } private static List makeClasspath(String cp) { List ret = new ArrayList(); if (cp != null) { StringTokenizer tok = new StringTokenizer(cp,File.pathSeparator); while (tok.hasMoreTokens()) {
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
ret.add(tok.nextToken()); } } return ret; } protected boolean info (String message) { return MessageUtil.info(messageHandler,message); } protected boolean warn (String message) { return MessageUtil.warn(messageHandler,message); } protected boolean warn (String message, Throwable th) { return messageHandler.handleMessage(new Message(message, IMessage.WARNING, th, null)); } protected boolean error (String message) { return MessageUtil.error(messageHandler,message); } public String getContextId () { return "WeavingAdaptor"; } /** * Dump the given bytcode in _dump/... (dev mode) * * @param name * @param b
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
* @param before whether we are dumping before weaving * @throws Throwable */ protected void dump(String name, byte[] b, boolean before) { String dirName = "_ajdump"; if (before) dirName = dirName + File.separator + "_before"; String className = name.replace('.', '/'); final File dir; if (className.indexOf('/') > 0) { dir = new File(dirName + File.separator + className.substring(0, className.lastIndexOf('/'))); } else { dir = new File(dirName); } dir.mkdirs(); String fileName = dirName + File.separator + className + ".class"; try { FileOutputStream os = new FileOutputStream(fileName); os.write(b); os.close(); } catch (IOException ex) { warn("unable to dump class " + name + " in directory " + dirName,ex); } } /** * Processes messages arising from weaver operations. * Tell weaver to abort on any message more severe than warning. */ protected class WeavingAdaptorMessageHandler implements IMessageHandler {
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
private IMessageHandler delegate; private boolean accumulating = true; private List messages = new ArrayList(); protected boolean traceMessages = Boolean.getBoolean(TRACE_MESSAGES_PROPERTY); public WeavingAdaptorMessageHandler (PrintWriter writer) { this.delegate = new WeavingAdaptorMessageWriter(writer); } public boolean handleMessage(IMessage message) throws AbortException { if (traceMessages) traceMessage(message); if (accumulating) { boolean result = addMessage(message); if (0 <= message.getKind().compareTo(IMessage.ERROR)) { throw new AbortException(message); } return result; } else return delegate.handleMessage(message); } private void traceMessage (IMessage message) { if (message instanceof WeaveMessage) { trace.debug(render(message)); } else if (message.isDebug()) { trace.debug(render(message)); } else if (message.isInfo()) {
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
trace.info(render(message)); } else if (message.isWarning()) { trace.warn(render(message),message.getThrown()); } else if (message.isError()) { trace.error(render(message),message.getThrown()); } else if (message.isFailed()) { trace.fatal(render(message),message.getThrown()); } else if (message.isAbort()) { trace.fatal(render(message),message.getThrown()); } else { trace.error(render(message),message.getThrown()); } } protected String render(IMessage message) { return "[" + getContextId() + "] " + message.toString(); } public boolean isIgnoring (Kind kind) { return delegate.isIgnoring(kind); } public void dontIgnore (IMessage.Kind kind) { if (null != kind) { delegate.dontIgnore(kind); } }
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
private boolean addMessage (IMessage message) { messages.add(message); return true; } public void flushMessages () { for (Iterator iter = messages.iterator(); iter.hasNext();) { IMessage message = (IMessage)iter.next(); delegate.handleMessage(message); } accumulating = false; messages.clear(); } public void setDelegate (IMessageHandler messageHandler) { delegate = messageHandler; } } protected class WeavingAdaptorMessageWriter extends MessageWriter { private Set ignoring = new HashSet(); private IMessage.Kind failKind; public WeavingAdaptorMessageWriter (PrintWriter writer) { super(writer,true); ignore(IMessage.WEAVEINFO); ignore(IMessage.INFO); this.failKind = IMessage.ERROR; } public boolean handleMessage(IMessage message) throws AbortException { boolean result = super.handleMessage(message);
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
if (0 <= message.getKind().compareTo(failKind)) { throw new AbortException(message); } return true; } public boolean isIgnoring (Kind kind) { return ((null != kind) && (ignoring.contains(kind))); } /** * Set a message kind to be ignored from now on */ public void ignore (IMessage.Kind kind) { if ((null != kind) && (!ignoring.contains(kind))) { ignoring.add(kind); } } /** * Remove a message kind from the list of those ignored from now on. */ public void dontIgnore (IMessage.Kind kind) { if (null != kind) { ignoring.remove(kind); } } protected String render(IMessage message) { return "[" + getContextId() + "] " + super.render(message); } } private class WeavingClassFileProvider implements IClassFileProvider { private UnwovenClassFile unwovenClass;
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
private List unwovenClasses = new ArrayList(); private UnwovenClassFile wovenClass; private boolean isApplyAtAspectJMungersOnly = false; public WeavingClassFileProvider (String name, byte[] bytes) { ensureDelegateInitialized(name, bytes); this.unwovenClass = new UnwovenClassFile(name,delegateForCurrentClass.getResolvedTypeX().getName(),bytes); this.unwovenClasses.add(unwovenClass); if (shouldDump(name.replace('/', '.'),true)) { dump(name, bytes, true); } } public void setApplyAtAspectJMungersOnly() { isApplyAtAspectJMungersOnly = true; } public boolean isApplyAtAspectJMungersOnly() { return isApplyAtAspectJMungersOnly; } public byte[] getBytes () { if (wovenClass != null) return wovenClass.getBytes(); else return unwovenClass.getBytes(); } public Iterator getClassFileIterator() { return unwovenClasses.iterator(); } public IWeaveRequestor getRequestor() { return new IWeaveRequestor() { public void acceptResult(UnwovenClassFile result) { if (wovenClass == null) {
150,271
Bug 150271 Allow multiple levels of LTW information
It would be nice if basic information about load-time weaving (what version of AspectJ is being used, what loaders are doing weaving and what configuration is being used) was available without all of the -verbose information listing of all classes woven or not woven. It's also unfortunate that the flags for weaving level are 2 quite different ones: -Daj.weaving.verbose -Dorg.aspectj.weaver.showWeaveInfo Why not something like -Dorg.aspectj.weaver.level=[none|summary|info|verbose] summary: just what configuration is used info: list affected join points etc. (like showWeaveInfo) verbose: all (like verbose now)
resolved fixed
8549d86
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-23T11:52:22Z
2006-07-11T15:00:00Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
wovenClass = result; String name = result.getClassName(); if (shouldDump(name.replace('/', '.'), false)) { dump(name, result.getBytes(), false); } } else { String className = result.getClassName(); generatedClasses.put(className,result); generatedClasses.put(wovenClass.getClassName(),result); generatedClassHandler.acceptClass(className,result.getBytes()); } } public void processingReweavableState() { } public void addingTypeMungers() {} public void weavingAspects() {} public void weavingClasses() {} public void weaveCompleted() { ResolvedType.resetPrimitives(); if (delegateForCurrentClass!=null) delegateForCurrentClass.weavingCompleted(); ResolvedType.resetPrimitives(); } }; } } }
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
/******************************************************************************* * Copyright (c) 2005 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * * Contributors: * Alexandre Vasseur initial implementation * David Knibb weaving context enhancments *******************************************************************************/ package org.aspectj.weaver.loadtime; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.URL; import java.util.ArrayList; import java.util.Enumeration;
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Properties; import java.util.StringTokenizer; import org.aspectj.asm.IRelationship; import org.aspectj.bridge.AbortException; import org.aspectj.bridge.Constants; import org.aspectj.bridge.ISourceLocation; import org.aspectj.util.LangUtil; import org.aspectj.weaver.ICrossReferenceHandler; import org.aspectj.weaver.Lint; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.World; import org.aspectj.weaver.Lint.Kind; import org.aspectj.weaver.bcel.BcelWeaver; import org.aspectj.weaver.loadtime.definition.Definition; import org.aspectj.weaver.loadtime.definition.DocumentParser; import org.aspectj.weaver.ltw.LTWWorld; import org.aspectj.weaver.patterns.PatternParser; import org.aspectj.weaver.patterns.TypePattern; import org.aspectj.weaver.tools.GeneratedClassHandler; import org.aspectj.weaver.tools.Trace; import org.aspectj.weaver.tools.TraceFactory; import org.aspectj.weaver.tools.WeavingAdaptor; /** * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a> */ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
private final static String AOP_XML = Constants.AOP_USER_XML + ";" + Constants.AOP_AJC_XML; private boolean initialized; private List m_dumpTypePattern = new ArrayList(); private boolean m_dumpBefore = false; private List m_includeTypePattern = new ArrayList(); private List m_excludeTypePattern = new ArrayList(); private List m_includeStartsWith = new ArrayList(); private List m_excludeStartsWith = new ArrayList(); private List m_aspectExcludeTypePattern = new ArrayList(); private List m_aspectExcludeStartsWith = new ArrayList();
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
private List m_aspectIncludeTypePattern = new ArrayList(); private List m_aspectIncludeStartsWith = new ArrayList(); private StringBuffer namespace; private IWeavingContext weavingContext; private static Trace trace = TraceFactory.getTraceFactory().getTrace(ClassLoaderWeavingAdaptor.class); public ClassLoaderWeavingAdaptor() { super(); if (trace.isTraceEnabled()) trace.enter("<init>",this); if (trace.isTraceEnabled()) trace.exit("<init>"); } /** * We don't need a reference to the class loader and using it during * construction can cause problems with recursion. It also makes sense * to supply the weaving context during initialization to. * @deprecated */ public ClassLoaderWeavingAdaptor(final ClassLoader deprecatedLoader, final IWeavingContext deprecatedContext) { super(); if (trace.isTraceEnabled()) trace.enter("<init>",this,new Object[] { deprecatedLoader, deprecatedContext }); if (trace.isTraceEnabled()) trace.exit("<init>"); } protected void initialize (final ClassLoader classLoader, IWeavingContext context) { if (initialized) return; if (trace.isTraceEnabled()) trace.enter("initialize",this,new Object[] { classLoader, context }); this.weavingContext = context; if (weavingContext == null) { weavingContext = new DefaultWeavingContext(classLoader);
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
} createMessageHandler(); this.generatedClassHandler = new GeneratedClassHandler() { /** * Callback when we need to define a Closure in the JVM * * @param name * @param bytes */ public void acceptClass(String name, byte[] bytes) { try { if (shouldDump(name.replace('/', '.'), false)) { dump(name, bytes, false); } } catch (Throwable throwable) { throwable.printStackTrace(); } defineClass(classLoader, name, bytes); } }; List definitions = parseDefinitions(classLoader); if (!isEnabled()) { if (trace.isTraceEnabled()) trace.exit("initialize",false); return; } bcelWorld = new LTWWorld( classLoader, weavingContext, getMessageHandler(), new ICrossReferenceHandler() {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
public void addCrossReference(ISourceLocation from, ISourceLocation to, IRelationship.Kind kind, boolean runtimeTest) { ; } } ); weaver = new BcelWeaver(bcelWorld); registerDefinitions(weaver, classLoader, definitions); if (isEnabled()) { weaver.prepareForWeave(); } else { bcelWorld = null; weaver = null; } initialized = true; if (trace.isTraceEnabled()) trace.exit("initialize",isEnabled()); } /** * Load and cache the aop.xml/properties according to the classloader visibility rules * * @param weaver * @param loader */ private List parseDefinitions(final ClassLoader loader) { List definitions = new ArrayList();
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
try { info("register classloader " + getClassLoaderName(loader)); if (ClassLoader.getSystemClassLoader().equals(loader)) { String file = System.getProperty("aj5.def", null); if (file != null) { info("using (-Daj5.def) " + file); definitions.add(DocumentParser.parse((new File(file)).toURL())); } } String resourcePath = System.getProperty("org.aspectj.weaver.loadtime.configuration",AOP_XML); StringTokenizer st = new StringTokenizer(resourcePath,";"); while(st.hasMoreTokens()){ Enumeration xmls = weavingContext.getResources(st.nextToken()); while (xmls.hasMoreElements()) { URL xml = (URL) xmls.nextElement(); info("using configuration " + weavingContext.getFile(xml)); definitions.add(DocumentParser.parse(xml)); } } if (definitions.isEmpty()) { disable(); info("no configuration found. Disabling weaver for class loader " + getClassLoaderName(loader)); } } catch (Exception e) { disable(); warn("parse definitions failed",e); } return definitions;
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
} private void registerDefinitions(final BcelWeaver weaver, final ClassLoader loader, List definitions) { try { registerOptions(weaver, loader, definitions); registerAspectExclude(weaver, loader, definitions); registerAspectInclude(weaver, loader, definitions); registerAspects(weaver, loader, definitions); registerIncludeExclude(weaver, loader, definitions); registerDump(weaver, loader, definitions); } catch (Exception e) { disable(); warn("register definition failed",(e instanceof AbortException)?null:e); } } private String getClassLoaderName (ClassLoader loader) { return weavingContext.getClassLoaderName(); } /** * Configure the weaver according to the option directives * TODO av - don't know if it is that good to reuse, since we only allow a small subset of options in LTW * * @param weaver * @param loader * @param definitions */ private void registerOptions(final BcelWeaver weaver, final ClassLoader loader, final List definitions) { StringBuffer allOptions = new StringBuffer(); for (Iterator iterator = definitions.iterator(); iterator.hasNext();) {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
Definition definition = (Definition) iterator.next(); allOptions.append(definition.getWeaverOptions()).append(' '); } Options.WeaverOption weaverOption = Options.parse(allOptions.toString(), loader, getMessageHandler()); World world = weaver.getWorld(); setMessageHandler(weaverOption.messageHandler); world.setXlazyTjp(weaverOption.lazyTjp); world.setXHasMemberSupportEnabled(weaverOption.hasMember); world.setOptionalJoinpoints(weaverOption.optionalJoinpoints); world.setPinpointMode(weaverOption.pinpoint); weaver.setReweavableMode(weaverOption.notReWeavable); world.performExtraConfiguration(weaverOption.xSet); world.setXnoInline(weaverOption.noInline); world.setBehaveInJava5Way(LangUtil.is15VMOrGreater()); world.setAddSerialVerUID(weaverOption.addSerialVersionUID); bcelWorld.getLint().loadDefaultProperties(); bcelWorld.getLint().adviceDidNotMatch.setKind(null); if (weaverOption.lintFile != null) { InputStream resource = null; try { resource = loader.getResourceAsStream(weaverOption.lintFile); Exception failure = null;
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
if (resource != null) { try { Properties properties = new Properties(); properties.load(resource); world.getLint().setFromProperties(properties); } catch (IOException e) { failure = e; } } if (failure != null || resource == null) { warn("Cannot access resource for -Xlintfile:"+weaverOption.lintFile,failure); } } finally { try { resource.close(); } catch (Throwable t) {;} } } if (weaverOption.lint != null) { if (weaverOption.lint.equals("default")) { bcelWorld.getLint().loadDefaultProperties(); } else { bcelWorld.getLint().setAll(weaverOption.lint); } } } private void registerAspectExclude(final BcelWeaver weaver, final ClassLoader loader, final List definitions) { String fastMatchInfo = null; for (Iterator iterator = definitions.iterator(); iterator.hasNext();) {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
Definition definition = (Definition) iterator.next(); for (Iterator iterator1 = definition.getAspectExcludePatterns().iterator(); iterator1.hasNext();) { String exclude = (String) iterator1.next(); TypePattern excludePattern = new PatternParser(exclude).parseTypePattern(); m_aspectExcludeTypePattern.add(excludePattern); fastMatchInfo = looksLikeStartsWith(exclude); if (fastMatchInfo != null) { m_aspectExcludeStartsWith.add(fastMatchInfo); } } } } private void registerAspectInclude(final BcelWeaver weaver, final ClassLoader loader, final List definitions) { String fastMatchInfo = null; for (Iterator iterator = definitions.iterator(); iterator.hasNext();) { Definition definition = (Definition) iterator.next(); for (Iterator iterator1 = definition.getAspectIncludePatterns().iterator(); iterator1.hasNext();) { String include = (String) iterator1.next(); TypePattern includePattern = new PatternParser(include).parseTypePattern(); m_aspectIncludeTypePattern.add(includePattern); fastMatchInfo = looksLikeStartsWith(include); if (fastMatchInfo != null) { m_aspectIncludeStartsWith.add(fastMatchInfo); } } } } protected void lint (String name, String[] infos) { Lint lint = bcelWorld.getLint(); Kind kind = lint.getLintKind(name);
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
kind.signal(infos,null,null); } public String getContextId () { return weavingContext.getId(); } /** * Register the aspect, following include / exclude rules * * @param weaver * @param loader * @param definitions */ private void registerAspects(final BcelWeaver weaver, final ClassLoader loader, final List definitions) { if (trace.isTraceEnabled()) trace.enter("registerAspects",this, new Object[] { weaver, loader, definitions} ); for (Iterator iterator = definitions.iterator(); iterator.hasNext();) { Definition definition = (Definition) iterator.next(); for (Iterator aspects = definition.getAspectClassNames().iterator(); aspects.hasNext();) { String aspectClassName = (String) aspects.next(); if (acceptAspect(aspectClassName)) { info("register aspect " + aspectClassName); weaver.addLibraryAspect(aspectClassName); if(namespace==null){ namespace=new StringBuffer(aspectClassName);
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
}else{ namespace = namespace.append(";"+aspectClassName); } } else { lint("aspectExcludedByConfiguration", new String[] { aspectClassName, getClassLoaderName(loader) }); } } } for (Iterator iterator = definitions.iterator(); iterator.hasNext();) { Definition definition = (Definition) iterator.next(); for (Iterator aspects = definition.getConcreteAspects().iterator(); aspects.hasNext();) { Definition.ConcreteAspect concreteAspect = (Definition.ConcreteAspect) aspects.next(); if (acceptAspect(concreteAspect.name)) { ConcreteAspectCodeGen gen = new ConcreteAspectCodeGen(concreteAspect, weaver.getWorld()); if (!gen.validate()) { error("Concrete-aspect '"+concreteAspect.name+"' could not be registered"); break; } this.generatedClassHandler.acceptClass( concreteAspect.name, gen.getBytes() ); weaver.addLibraryAspect(concreteAspect.name); if(namespace==null){ namespace=new StringBuffer(concreteAspect.name); }else{
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
namespace = namespace.append(";"+concreteAspect.name); } } } } if (namespace == null) { disable(); info("no aspects registered. Disabling weaver for class loader " + getClassLoaderName(loader)); } if (trace.isTraceEnabled()) trace.exit("registerAspects",isEnabled()); } /** * Register the include / exclude filters * We duplicate simple patterns in startWith filters that will allow faster matching without ResolvedType * * @param weaver * @param loader * @param definitions */ private void registerIncludeExclude(final BcelWeaver weaver, final ClassLoader loader, final List definitions) { String fastMatchInfo = null; for (Iterator iterator = definitions.iterator(); iterator.hasNext();) { Definition definition = (Definition) iterator.next(); for (Iterator iterator1 = definition.getIncludePatterns().iterator(); iterator1.hasNext();) { String include = (String) iterator1.next(); TypePattern includePattern = new PatternParser(include).parseTypePattern(); m_includeTypePattern.add(includePattern); fastMatchInfo = looksLikeStartsWith(include);
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
if (fastMatchInfo != null) { m_includeStartsWith.add(fastMatchInfo); } } for (Iterator iterator1 = definition.getExcludePatterns().iterator(); iterator1.hasNext();) { String exclude = (String) iterator1.next(); TypePattern excludePattern = new PatternParser(exclude).parseTypePattern(); m_excludeTypePattern.add(excludePattern); fastMatchInfo = looksLikeStartsWith(exclude); if (fastMatchInfo != null) { m_excludeStartsWith.add(fastMatchInfo); } } } } /** * Checks if the type pattern can be handled as a startswith check * * TODO AV - enhance to support "char.sss" ie FQN direclty (match iff equals) * we could also add support for "*..*charss" endsWith style? * * @param typePattern * @return null if not possible, or the startWith sequence to test against */ private String looksLikeStartsWith(String typePattern) { if (typePattern.indexOf('@') >= 0 || typePattern.indexOf('+') >= 0 || typePattern.indexOf(' ') >= 0 || typePattern.charAt(typePattern.length()-1) != '*') { return null;
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
} int length = typePattern.length(); if (typePattern.endsWith("..*") && length > 3) { if (typePattern.indexOf("..") == length-3 && typePattern.indexOf('*') == length-1) { return typePattern.substring(0, length-2).replace('$', '.'); } } return null; } /** * Register the dump filter * * @param weaver * @param loader * @param definitions */ private void registerDump(final BcelWeaver weaver, final ClassLoader loader, final List definitions) { for (Iterator iterator = definitions.iterator(); iterator.hasNext();) { Definition definition = (Definition) iterator.next(); for (Iterator iterator1 = definition.getDumpPatterns().iterator(); iterator1.hasNext();) { String dump = (String) iterator1.next(); TypePattern pattern = new PatternParser(dump).parseTypePattern(); m_dumpTypePattern.add(pattern); } if (definition.shouldDumpBefore()) {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
m_dumpBefore = true; } } } protected boolean accept(String className, byte[] bytes) { if (m_excludeTypePattern.isEmpty() && m_includeTypePattern.isEmpty()) { return true; } String fastClassName = className.replace('/', '.').replace('$', '.'); for (int i = 0; i < m_excludeStartsWith.size(); i++) { if (fastClassName.startsWith((String)m_excludeStartsWith.get(i))) { return false; } } /* * Bug 120363 * If we have an exclude pattern that cannot be matched using "starts with" * then we cannot fast accept */ if (m_excludeTypePattern.isEmpty()) { boolean fastAccept = false; for (int i = 0; i < m_includeStartsWith.size(); i++) { fastAccept = fastClassName.startsWith((String)m_includeStartsWith.get(i)); if (fastAccept) { break; } }
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
} ensureDelegateInitialized(className,bytes); ResolvedType classInfo = delegateForCurrentClass.getResolvedTypeX(); for (Iterator iterator = m_excludeTypePattern.iterator(); iterator.hasNext();) { TypePattern typePattern = (TypePattern) iterator.next(); if (typePattern.matchesStatically(classInfo)) { return false; } } boolean accept = true; for (Iterator iterator = m_includeTypePattern.iterator(); iterator.hasNext();) { TypePattern typePattern = (TypePattern) iterator.next(); accept = typePattern.matchesStatically(classInfo); if (accept) { break; } }
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
return accept; } private boolean acceptAspect(String aspectClassName) { if (m_aspectExcludeTypePattern.isEmpty() && m_aspectIncludeTypePattern.isEmpty()) { return true; } String fastClassName = aspectClassName.replace('/', '.').replace('.', '$'); for (int i = 0; i < m_aspectExcludeStartsWith.size(); i++) { if (fastClassName.startsWith((String)m_aspectExcludeStartsWith.get(i))) { return false; } } for (int i = 0; i < m_aspectIncludeStartsWith.size(); i++) { if (fastClassName.startsWith((String)m_aspectIncludeStartsWith.get(i))) { return true; } } ResolvedType classInfo = weaver.getWorld().resolve(UnresolvedType.forName(aspectClassName), true); for (Iterator iterator = m_aspectExcludeTypePattern.iterator(); iterator.hasNext();) { TypePattern typePattern = (TypePattern) iterator.next(); if (typePattern.matchesStatically(classInfo)) {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
return false; } } boolean accept = true; for (Iterator iterator = m_aspectIncludeTypePattern.iterator(); iterator.hasNext();) { TypePattern typePattern = (TypePattern) iterator.next(); accept = typePattern.matchesStatically(classInfo); if (accept) { break; } } return accept; } protected boolean shouldDump(String className, boolean before) { if (before && !m_dumpBefore) { return false; } if (m_dumpTypePattern.isEmpty()) { return false; } ResolvedType classInfo = weaver.getWorld().resolve(UnresolvedType.forName(className), true); for (Iterator iterator = m_dumpTypePattern.iterator(); iterator.hasNext();) { TypePattern typePattern = (TypePattern) iterator.next();
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
if (typePattern.matchesStatically(classInfo)) { return true; } } return false; } /* * shared classes methods */ /** * @return Returns the key. */ public String getNamespace() { if(namespace==null) return ""; else return new String(namespace); } /** * Check to see if any classes are stored in the generated classes cache. * Then flush the cache if it is not empty * @param className TODO * @return true if a class has been generated and is stored in the cache */ public boolean generatedClassesExistFor (String className) { if (className == null) return !generatedClasses.isEmpty(); else return generatedClasses.containsKey(className); } /** * Flush the generated classes cache */
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
public void flushGeneratedClasses() { generatedClasses = new HashMap(); } private void defineClass(ClassLoader loader, String name, byte[] bytes) { if (trace.isTraceEnabled()) trace.enter("defineClass",this,new Object[] {loader,name,bytes}); Object clazz = null; debug("generating class '" + name + "'"); try { Method defineClass = ClassLoader.class.getDeclaredMethod( "defineClass", new Class[] { String.class, bytes.getClass(), int.class, int.class }); defineClass.setAccessible(true); clazz = defineClass.invoke(loader, new Object[] { name, bytes, new Integer(0), new Integer(bytes.length) }); } catch (InvocationTargetException e) { if (e.getTargetException() instanceof LinkageError) { warn("define generated class failed",e.getTargetException()); } else { warn("define generated class failed",e.getTargetException()); } } catch (Exception e) { warn("define generated class failed",e); } if (trace.isTraceEnabled()) trace.exit("defineClass",clazz); } }
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java
/* ******************************************************************* * Copyright (c) 2004 IBM Corporation * 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: * Matthew Webster, Adrian Colyer, * Martin Lippert initial implementation * ******************************************************************/ package org.aspectj.weaver.loadtime; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.security.CodeSource; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.StringTokenizer; import org.aspectj.weaver.ExtensibleURLClassLoader; import org.aspectj.weaver.tools.WeavingAdaptor; import org.aspectj.weaver.tools.WeavingClassLoader; public class WeavingURLClassLoader extends ExtensibleURLClassLoader implements WeavingClassLoader {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java
public static final String WEAVING_CLASS_PATH = "aj.class.path"; public static final String WEAVING_ASPECT_PATH = "aj.aspect.path"; private URL[] aspectURLs; private WeavingAdaptor adaptor; private boolean initializingAdaptor; private Map generatedClasses = new HashMap(); /* * This constructor is needed when using "-Djava.system.class.loader". */ public WeavingURLClassLoader (ClassLoader parent) {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java
this(getURLs(getClassPath()),getURLs(getAspectPath()),parent); } public WeavingURLClassLoader (URL[] urls, ClassLoader parent) { super(urls,parent); } public WeavingURLClassLoader (URL[] classURLs, URL[] aspectURLs, ClassLoader parent) { super(classURLs,parent); this.aspectURLs = aspectURLs; /* If either we nor our parent is using an ASPECT_PATH use a new-style * adaptor */ if (this.aspectURLs.length > 0 || getParent() instanceof WeavingClassLoader) { try { adaptor = new WeavingAdaptor(this); } catch (ExceptionInInitializerError ex) { ex.printStackTrace(System.out); throw ex; } } } private static String getAspectPath () { return System.getProperty(WEAVING_ASPECT_PATH,""); } private static String getClassPath () {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java
return System.getProperty(WEAVING_CLASS_PATH,""); } private static URL[] getURLs (String path) { List urlList = new ArrayList(); for (StringTokenizer t = new StringTokenizer(path,File.pathSeparator); t.hasMoreTokens();) { File f = new File(t.nextToken().trim()); try { if (f.exists()) { URL url = f.toURL(); if (url != null) urlList.add(url); } } catch (MalformedURLException e) {} } URL[] urls = new URL[urlList.size()]; urlList.toArray(urls); return urls; } protected void addURL(URL url) { adaptor.addURL(url); super.addURL(url); } /** * Override to weave class using WeavingAdaptor */ protected Class defineClass(String name, byte[] b, CodeSource cs) throws IOException { if (!initializingAdaptor) {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java
if (adaptor == null && !initializingAdaptor) { createAdaptor(); } b = adaptor.weaveClass(name,b); } return super.defineClass(name, b, cs); } private void createAdaptor () { DefaultWeavingContext weavingContext = new DefaultWeavingContext (this) { public String getClassLoaderName() { return loader.getClass().getName(); } }; ClassLoaderWeavingAdaptor clwAdaptor = new ClassLoaderWeavingAdaptor(); initializingAdaptor = true; clwAdaptor.initialize(this,weavingContext); initializingAdaptor = false; adaptor = clwAdaptor; } /** * Override to find classes generated by WeavingAdaptor */ protected byte[] getBytes (String name) throws IOException { byte[] bytes = super.getBytes(name);
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
loadtime/src/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java
if (bytes == null) { return (byte[])generatedClasses.remove(name); } return bytes; } /** * Implement method from WeavingClassLoader */ public URL[] getAspectURLs() { return aspectURLs; } public void acceptClass (String name, byte[] bytes) { generatedClasses.put(name,bytes); } } } } } } } }
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
/******************************************************************************* * Copyright (c) 2006 IBM * 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: * Andy Clement - initial API and implementation *******************************************************************************/ package org.aspectj.systemtest.ajc153; import java.io.File; import junit.framework.Test; import org.aspectj.testing.Utils; import org.aspectj.testing.XMLBasedAjcTestCase; import org.aspectj.weaver.bcel.Utility; public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
public void testIncorrectStaticinitializationWeaving_pr149560_1() { runTest("incorrect staticinitialization weaving - codestyle");} public void testIncorrectStaticinitializationWeaving_pr149560_2() { runTest("incorrect staticinitialization weaving - annstyle");} public void testIncorrectDeprecatedAnnotationProcessing_pr154332() { runTest("incorrect deprecated annotation processing");} public void testPipeliningProblemWithAnnotationsDecp_pr153380_1() { runTest("pipelining decps");} public void testUnwantedPointcutWarning_pr148219() { runTest("unwanted warning for pointcut");} public void testDecpAndCflowadderMungerClash_pr152631() { runTest("decp and cflowadder munger clash");} public void testGenericInheritanceDecp_pr150095() { runTest("generics, inheritance and decp");} public void testIllegalStateException_pr148737() { runTest("illegalstateexception for non generic type");} public void testAtajInheritance_pr149305_1() { runTest("ataj inheritance - 1");} public void testAtajInheritance_pr149305_2() { runTest("ataj inheritance - 2");} public void testAtajInheritance_pr149305_3() { runTest("ataj inheritance - 3");} public void testVerificationFailureForAspectOf_pr148693() { runTest("verification problem"); Utils.verifyClass(ajc,"mypackage.MyAspect"); } public void testIncorrectAnnotationValue_pr148537() { runTest("incorrect annotation value");} public void testVerifyErrNoTypeCflowField_pr145693_1() { runTest("verifyErrNoTypeCflowField"); }
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
public void testVerifyErrInpathNoTypeCflowField_pr145693_2() { runTest("verifyErrInpathNoTypeCflowField"); } public void testCpathNoTypeCflowField_pr145693_3() { runTest("cpathNoTypeCflowField"); } public void testGenericSignatures_pr148409() { runTest("generic signature problem"); } public void testCantFindType_pr149322_01() {runTest("can't find type on interface call 1");} public void testCantFindType_pr149322_02() {runTest("can't find type on interface call 2");} public void testCantFindType_pr149322_03() {runTest("can't find type on interface call 3");} public void testParsingBytecodeLess_pr152871() { Utility.testingParseCounter=0; runTest("parsing bytecode less"); assertTrue("Should have called parse 5 times, not "+Utility.testingParseCounter+" times",Utility.testingParseCounter==5); } public void testMatchVolatileField_pr150671() {runTest("match volatile field");}; public void testDuplicateJVMTIAgents_pr151938() {runTest("Duplicate JVMTI agents");}; public void testLTWWorldWithAnnotationMatching_pr153572() { runTest("LTWWorld with annotation matching");} public static Test suite() { return XMLBasedAjcTestCase.loadSuite(Ajc153Tests.class); } protected File getSpecFile() { return new File("../tests/src/org/aspectj/systemtest/ajc153/ajc153.xml"); } }
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
/* ******************************************************************* * Copyright (c) 2004 IBM Corporation * All rights reserved. * This program and the accompanying materials are made available
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
* 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: * Matthew Webster, Adrian Colyer, * Martin Lippert initial implementation * ******************************************************************/ package org.aspectj.weaver.tools; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintWriter; import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.StringTokenizer; import org.aspectj.bridge.AbortException; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.IMessageContext; import org.aspectj.bridge.IMessageHandler; import org.aspectj.bridge.Message; import org.aspectj.bridge.MessageUtil;
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
import org.aspectj.bridge.MessageWriter; import org.aspectj.bridge.Version; import org.aspectj.bridge.WeaveMessage; import org.aspectj.bridge.IMessage.Kind; import org.aspectj.org.objectweb.asm.ClassReader; import org.aspectj.util.FileUtil; import org.aspectj.util.LangUtil; import org.aspectj.weaver.IClassFileProvider; import org.aspectj.weaver.IWeaveRequestor; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.bcel.BcelObjectType; import org.aspectj.weaver.bcel.BcelWeaver; import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.bcel.UnwovenClassFile; import org.aspectj.weaver.bcel.Utility; /** * This adaptor allows the AspectJ compiler to be embedded in an existing * system to facilitate load-time weaving. It provides an interface for a * weaving class loader to provide a classpath to be woven by a set of * aspects. A callback is supplied to allow a class loader to define classes * generated by the compiler during the weaving process. * <p> * A weaving class loader should create a <code>WeavingAdaptor</code> before * any classes are defined, typically during construction. The set of aspects * passed to the adaptor is fixed for the lifetime of the adaptor although the * classpath can be augmented. A system property can be set to allow verbose * weaving messages to be written to the console. * */ public class WeavingAdaptor implements IMessageContext {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
/** * System property used to turn on verbose weaving messages */ public static final String WEAVING_ADAPTOR_VERBOSE = "aj.weaving.verbose"; public static final String SHOW_WEAVE_INFO_PROPERTY = "org.aspectj.weaver.showWeaveInfo"; public static final String TRACE_MESSAGES_PROPERTY = "org.aspectj.tracing.messages"; private boolean enabled = true; protected boolean verbose = getVerbose(); protected BcelWorld bcelWorld; protected BcelWeaver weaver; private IMessageHandler messageHandler; private WeavingAdaptorMessageHandler messageHolder; protected GeneratedClassHandler generatedClassHandler; protected Map generatedClasses = new HashMap(); protected BcelObjectType delegateForCurrentClass; private static Trace trace = TraceFactory.getTraceFactory().getTrace(WeavingAdaptor.class); protected WeavingAdaptor () { } /** * Construct a WeavingAdaptor with a reference to a weaving class loader. The * adaptor will automatically search the class loader hierarchy to resolve * classes. The adaptor will also search the hierarchy for WeavingClassLoader * instances to determine the set of aspects to be used ofr weaving. * @param loader instance of <code>ClassLoader</code> */ public WeavingAdaptor (WeavingClassLoader loader) {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
generatedClassHandler = loader; init(getFullClassPath((ClassLoader)loader),getFullAspectPath((ClassLoader)loader)); } /** * Construct a WeavingAdator with a reference to a * <code>GeneratedClassHandler</code>, a full search path for resolving * classes and a complete set of aspects. The search path must include * classes loaded by the class loader constructing the WeavingAdaptor and * all its parents in the hierarchy. * @param handler <code>GeneratedClassHandler</code> * @param classURLs the URLs from which to resolve classes * @param aspectURLs the aspects used to weave classes defined by this class loader */ public WeavingAdaptor (GeneratedClassHandler handler, URL[] classURLs, URL[] aspectURLs) { generatedClassHandler = handler; init(FileUtil.makeClasspath(classURLs),FileUtil.makeClasspath(aspectURLs)); } private List getFullClassPath (ClassLoader loader) { List list = new LinkedList(); for (; loader != null; loader = loader.getParent()) { if (loader instanceof URLClassLoader) { URL[] urls = ((URLClassLoader)loader).getURLs(); list.addAll(0,FileUtil.makeClasspath(urls)); } else { warn("cannot determine classpath"); } } list.addAll(0,makeClasspath(System.getProperty("sun.boot.class.path")));
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
return list; } private List getFullAspectPath (ClassLoader loader) { List list = new LinkedList(); for (; loader != null; loader = loader.getParent()) { if (loader instanceof WeavingClassLoader) { URL[] urls = ((WeavingClassLoader)loader).getAspectURLs(); list.addAll(0,FileUtil.makeClasspath(urls)); } } return list; } private static boolean getVerbose () { return Boolean.getBoolean(WEAVING_ADAPTOR_VERBOSE); } private void init(List classPath, List aspectPath) { createMessageHandler(); info("using classpath: " + classPath); info("using aspectpath: " + aspectPath); bcelWorld = new BcelWorld(classPath,messageHandler,null); bcelWorld.setXnoInline(false); bcelWorld.getLint().loadDefaultProperties(); if (LangUtil.is15VMOrGreater()) { bcelWorld.setBehaveInJava5Way(true); }
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
weaver = new BcelWeaver(bcelWorld); registerAspectLibraries(aspectPath); } protected void createMessageHandler() { messageHolder = new WeavingAdaptorMessageHandler(new PrintWriter(System.err)); messageHandler = messageHolder; if (verbose) messageHandler.dontIgnore(IMessage.INFO); if (Boolean.getBoolean(SHOW_WEAVE_INFO_PROPERTY)) messageHandler.dontIgnore(IMessage.WEAVEINFO); info("AspectJ Weaver Version " + Version.text + " built on " + Version.time_text); } protected IMessageHandler getMessageHandler () { return messageHandler; } protected void setMessageHandler (IMessageHandler mh) { if (mh instanceof ISupportsMessageContext) { ISupportsMessageContext smc = (ISupportsMessageContext)mh; smc.setMessageContext(this); } if (mh != messageHolder) messageHolder.setDelegate(mh); messageHolder.flushMessages(); } protected void disable () { enabled = false; messageHolder.flushMessages(); } protected boolean isEnabled () {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
return enabled; } /** * Appends URL to path used by the WeavingAdptor to resolve classes * @param url to be appended to search path */ public void addURL(URL url) { File libFile = new File(url.getPath()); try { weaver.addLibraryJarFile(libFile); } catch (IOException ex) { warn("bad library: '" + libFile + "'"); } } /** * Weave a class using aspects previously supplied to the adaptor. * @param name the name of the class * @param bytes the class bytes * @return the woven bytes * @exception IOException weave failed */ public byte[] weaveClass (String name, byte[] bytes) throws IOException { if (enabled) { try { delegateForCurrentClass=null; if (trace.isTraceEnabled()) trace.enter("weaveClass",this,new Object[] {name,bytes}); name = name.replace('/','.'); if (couldWeave(name, bytes)) {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
if (accept(name, bytes)) { debug("weaving '" + name + "'"); bytes = getWovenBytes(name, bytes); } else if (shouldWeaveAnnotationStyleAspect(name, bytes)) { debug("weaving '" + name + "'"); bytes = getAtAspectJAspectBytes(name, bytes); } else { debug("not weaving '" + name + "'"); } } else { debug("cannot weave '" + name + "'"); } if (trace.isTraceEnabled()) trace.exit("weaveClass",bytes); } finally { delegateForCurrentClass=null; } } return bytes; } /** * @param name * @return true if even valid to weave: either with an accept check or to munge it for @AspectJ aspectof support */
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
private boolean couldWeave (String name, byte[] bytes) { return !generatedClasses.containsKey(name) && shouldWeaveName(name); } protected boolean accept(String name, byte[] bytes) { return true; } protected boolean shouldDump(String name, boolean before) { return false; } private boolean shouldWeaveName (String name) { boolean should = !((name.startsWith("org.aspectj.") || name.startsWith("java.") || name.startsWith("javax.")) || name.startsWith("sun.reflect.")); return should; } /** * We allow @AJ aspect weaving so that we can add aspectOf() as part of the weaving * (and not part of the source compilation) * * @param name * @param bytes bytecode (from classloader), allow to NOT lookup stuff on disk again during resolve * @return true if @Aspect */ private boolean shouldWeaveAnnotationStyleAspect(String name, byte[] bytes) { if (delegateForCurrentClass==null) { if (weaver.getWorld().isASMAround()) return asmCheckAnnotationStyleAspect(bytes);
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
else ensureDelegateInitialized(name, bytes); } return (delegateForCurrentClass.isAnnotationStyleAspect()); } private boolean asmCheckAnnotationStyleAspect(byte[] bytes) { IsAtAspectAnnotationVisitor detector = new IsAtAspectAnnotationVisitor(); ClassReader cr = new ClassReader(bytes); try { cr.accept(detector, true); } catch (Exception spe) { System.err.println("Unexpected problem parsing bytes to discover @Aspect annotation"); spe.printStackTrace(); return false; } return detector.isAspect(); } protected void ensureDelegateInitialized(String name,byte[] bytes) { if (delegateForCurrentClass==null) delegateForCurrentClass = ((BcelWorld)weaver.getWorld()).addSourceObjectType(Utility.makeJavaClass(name, bytes)); } /** * Weave a set of bytes defining a class. * @param name the name of the class being woven * @param bytes the bytes that define the class * @return byte[] the woven bytes for the class * @throws IOException */
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
private byte[] getWovenBytes(String name, byte[] bytes) throws IOException { WeavingClassFileProvider wcp = new WeavingClassFileProvider(name,bytes); weaver.weave(wcp); return wcp.getBytes(); } /** * Weave a set of bytes defining a class for only what is needed to turn @AspectJ aspect * in a usefull form ie with aspectOf method - see #113587 * @param name the name of the class being woven * @param bytes the bytes that define the class * @return byte[] the woven bytes for the class * @throws IOException */ private byte[] getAtAspectJAspectBytes(String name, byte[] bytes) throws IOException { WeavingClassFileProvider wcp = new WeavingClassFileProvider(name,bytes); wcp.setApplyAtAspectJMungersOnly(); weaver.weave(wcp); return wcp.getBytes(); } private void registerAspectLibraries(List aspectPath) { for (Iterator i = aspectPath.iterator(); i.hasNext();) { String libName = (String)i.next(); addAspectLibrary(libName); } weaver.prepareForWeave(); } /* * Register an aspect library with this classloader for use during * weaving. This class loader will also return (unmodified) any of the
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
* classes in the library in response to a <code>findClass()</code> request. * The library is not required to be on the weavingClasspath given when this * classloader was constructed. * @param aspectLibraryJarFile a jar file representing an aspect library * @throws IOException */ private void addAspectLibrary(String aspectLibraryName) { File aspectLibrary = new File(aspectLibraryName); if (aspectLibrary.isDirectory() || (FileUtil.isZipFile(aspectLibrary))) { try { info("adding aspect library: '" + aspectLibrary + "'"); weaver.addLibraryJarFile(aspectLibrary); } catch (IOException ex) { error("exception adding aspect library: '" + ex + "'"); } } else { error("bad aspect library: '" + aspectLibrary + "'"); } } private static List makeClasspath(String cp) { List ret = new ArrayList(); if (cp != null) { StringTokenizer tok = new StringTokenizer(cp,File.pathSeparator); while (tok.hasMoreTokens()) { ret.add(tok.nextToken()); } } return ret;
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
} protected boolean debug (String message) { return MessageUtil.debug(messageHandler,message); } protected boolean info (String message) { return MessageUtil.info(messageHandler,message); } protected boolean warn (String message) { return MessageUtil.warn(messageHandler,message); } protected boolean warn (String message, Throwable th) { return messageHandler.handleMessage(new Message(message, IMessage.WARNING, th, null)); } protected boolean error (String message) { return MessageUtil.error(messageHandler,message); } public String getContextId () { return "WeavingAdaptor"; } /** * Dump the given bytcode in _dump/... (dev mode) * * @param name * @param b
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
* @param before whether we are dumping before weaving * @throws Throwable */ protected void dump(String name, byte[] b, boolean before) { String dirName = "_ajdump"; if (before) dirName = dirName + File.separator + "_before"; String className = name.replace('.', '/'); final File dir; if (className.indexOf('/') > 0) { dir = new File(dirName + File.separator + className.substring(0, className.lastIndexOf('/'))); } else { dir = new File(dirName); } dir.mkdirs(); String fileName = dirName + File.separator + className + ".class"; try { FileOutputStream os = new FileOutputStream(fileName); os.write(b); os.close(); } catch (IOException ex) { warn("unable to dump class " + name + " in directory " + dirName,ex); } } /** * Processes messages arising from weaver operations. * Tell weaver to abort on any message more severe than warning. */ protected class WeavingAdaptorMessageHandler implements IMessageHandler {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
private IMessageHandler delegate; private boolean accumulating = true; private List messages = new ArrayList(); protected boolean traceMessages = Boolean.getBoolean(TRACE_MESSAGES_PROPERTY); public WeavingAdaptorMessageHandler (PrintWriter writer) { this.delegate = new WeavingAdaptorMessageWriter(writer); } public boolean handleMessage(IMessage message) throws AbortException { if (traceMessages) traceMessage(message); if (accumulating) { boolean result = addMessage(message); if (0 <= message.getKind().compareTo(IMessage.ERROR)) { throw new AbortException(message); } return result; } else return delegate.handleMessage(message); } private void traceMessage (IMessage message) { if (message instanceof WeaveMessage) { trace.debug(render(message)); } else if (message.isDebug()) { trace.debug(render(message)); } else if (message.isInfo()) { trace.info(render(message));
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
} else if (message.isWarning()) { trace.warn(render(message),message.getThrown()); } else if (message.isError()) { trace.error(render(message),message.getThrown()); } else if (message.isFailed()) { trace.fatal(render(message),message.getThrown()); } else if (message.isAbort()) { trace.fatal(render(message),message.getThrown()); } else { trace.error(render(message),message.getThrown()); } } protected String render(IMessage message) { return "[" + getContextId() + "] " + message.toString(); } public boolean isIgnoring (Kind kind) { return delegate.isIgnoring(kind); } public void dontIgnore (IMessage.Kind kind) { if (null != kind) { delegate.dontIgnore(kind); } } private boolean addMessage (IMessage message) {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
messages.add(message); return true; } public void flushMessages () { for (Iterator iter = messages.iterator(); iter.hasNext();) { IMessage message = (IMessage)iter.next(); delegate.handleMessage(message); } accumulating = false; messages.clear(); } public void setDelegate (IMessageHandler messageHandler) { delegate = messageHandler; } } protected class WeavingAdaptorMessageWriter extends MessageWriter { private Set ignoring = new HashSet(); private IMessage.Kind failKind; public WeavingAdaptorMessageWriter (PrintWriter writer) { super(writer,true); ignore(IMessage.WEAVEINFO); ignore(IMessage.DEBUG); ignore(IMessage.INFO); this.failKind = IMessage.ERROR; } public boolean handleMessage(IMessage message) throws AbortException { boolean result = super.handleMessage(message);
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
if (0 <= message.getKind().compareTo(failKind)) { throw new AbortException(message); } return true; } public boolean isIgnoring (Kind kind) { return ((null != kind) && (ignoring.contains(kind))); } /** * Set a message kind to be ignored from now on */ public void ignore (IMessage.Kind kind) { if ((null != kind) && (!ignoring.contains(kind))) { ignoring.add(kind); } } /** * Remove a message kind from the list of those ignored from now on. */ public void dontIgnore (IMessage.Kind kind) { if (null != kind) { ignoring.remove(kind); } } protected String render(IMessage message) { return "[" + getContextId() + "] " + super.render(message); } } private class WeavingClassFileProvider implements IClassFileProvider { private UnwovenClassFile unwovenClass;
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
private List unwovenClasses = new ArrayList(); private UnwovenClassFile wovenClass; private boolean isApplyAtAspectJMungersOnly = false; public WeavingClassFileProvider (String name, byte[] bytes) { ensureDelegateInitialized(name, bytes); this.unwovenClass = new UnwovenClassFile(name,delegateForCurrentClass.getResolvedTypeX().getName(),bytes); this.unwovenClasses.add(unwovenClass); if (shouldDump(name.replace('/', '.'),true)) { dump(name, bytes, true); } } public void setApplyAtAspectJMungersOnly() { isApplyAtAspectJMungersOnly = true; } public boolean isApplyAtAspectJMungersOnly() { return isApplyAtAspectJMungersOnly; } public byte[] getBytes () { if (wovenClass != null) return wovenClass.getBytes(); else return unwovenClass.getBytes(); } public Iterator getClassFileIterator() { return unwovenClasses.iterator(); } public IWeaveRequestor getRequestor() { return new IWeaveRequestor() { public void acceptResult(UnwovenClassFile result) { if (wovenClass == null) {
129,525
Bug 129525 Don't Dump Bytecodes to Syserr in LTW
The load-time weaving system can produce truly massive quantities of output when there's a weaving error, since the system dumps the bytecode to syserr. It would be much better to produce an ajcore file and just point to it, or use some other log.
resolved fixed
04fa1dc
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-24T17:32:00Z
2006-02-27T08:46:40Z
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
wovenClass = result; String name = result.getClassName(); if (shouldDump(name.replace('/', '.'), false)) { dump(name, result.getBytes(), false); } } else { String className = result.getClassName(); generatedClasses.put(className,result); generatedClasses.put(wovenClass.getClassName(),result); generatedClassHandler.acceptClass(className,result.getBytes()); } } public void processingReweavableState() { } public void addingTypeMungers() {} public void weavingAspects() {} public void weavingClasses() {} public void weaveCompleted() { ResolvedType.resetPrimitives(); if (delegateForCurrentClass!=null) delegateForCurrentClass.weavingCompleted(); ResolvedType.resetPrimitives(); } }; } } }
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
ajde/src/org/aspectj/ajde/ui/swing/OptionsFrame.java
/* ******************************************************************* * Copyright (c) 1999-2001 Xerox Corporation, * 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: * Xerox/PARC initial implementation
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
ajde/src/org/aspectj/ajde/ui/swing/OptionsFrame.java
* ******************************************************************/ package org.aspectj.ajde.ui.swing; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.io.IOException; import java.util.Date; import javax.swing.BorderFactory; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTabbedPane; import javax.swing.JTextArea; import javax.swing.UIManager; import javax.swing.border.Border; import javax.swing.border.TitledBorder; import org.aspectj.ajde.Ajde; import org.aspectj.bridge.Version; /** * UI for setting user-configureable options. * * @author Mik Kersten */ public class OptionsFrame extends JFrame { private static final long serialVersionUID = -859222442871124487L;
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
ajde/src/org/aspectj/ajde/ui/swing/OptionsFrame.java
private static final String ABOUT_TEXT = "\nThe AspectJ compiler and core tools are produced by the\n" + "AspectJ project.\n\n" + "This software is distributed under the Eclipse Public License\n" + "version 1.0, approved by the Open Source Initiative as\n" + "conforming to the Open Source Definition.\n\n" + "For support or for more information about the AspectJ\n" + "project or the license, visit the project home page at\n" + " http://eclipse.org/aspectj\n\n" + "If you find a bug (not solved by the documentation in the\n" + "Development Environment Guide available with this release,\n" + "any release notes, or the bug database), please submit steps\n" + "to reproduce the bug (using the IDE component) at:\n" + " http://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ"; private JTabbedPane main_tabbedPane = new JTabbedPane(); private JPanel button_panel = new JPanel(); private JButton apply_button = new JButton(); private JButton cancel_button = new JButton(); private JButton ok_button = new JButton(); private TitledBorder titledBorder1; private TitledBorder titledBorder2; private TitledBorder titledBorder3; private TitledBorder titledBorder4; private TitledBorder titledBorder5; private TitledBorder titledBorder6; private TitledBorder titledBorder7; private Border border4; private TitledBorder titledBorder8; private Border border5;
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
ajde/src/org/aspectj/ajde/ui/swing/OptionsFrame.java
private TitledBorder titledBorder9; private TitledBorder titledBorder10; private Border border7; private TitledBorder titledBorder11; private Border border8; private TitledBorder titledBorder12; private JPanel about_panel = new JPanel(); private BorderLayout borderLayout9 = new BorderLayout(); JTextArea jTextArea1 = new JTextArea(); JPanel jPanel1 = new JPanel(); JLabel version_label = new JLabel(); JLabel jLabel1 = new JLabel(); BorderLayout borderLayout1 = new BorderLayout(); Border border9; JLabel built_label = new JLabel(); public OptionsFrame(IconRegistry icons) { try { jbInit(); this.setTitle("AJDE Settings"); this.setIconImage(((ImageIcon)icons.getBrowserOptionsIcon()).getImage()); this.setSize(500, 500); this.setLocation(200, 100); version_label.setText("Version: " + Version.text); built_label.setText("Built: " + new Date(Version.time).toString()); addOptionsPanel(new BuildOptionsPanel()); loadOptions(); } catch(Exception e) { Ajde.getDefault().getErrorHandler().handleError("Could not open OptionsFrame", e); }
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
ajde/src/org/aspectj/ajde/ui/swing/OptionsFrame.java
} /** * Adds the panel in the second-to-last postion. */ public void addOptionsPanel(OptionsPanel panel) { main_tabbedPane.add(panel, main_tabbedPane.getComponentCount()-1); loadOptions(); } public void removeOptionsPanel(OptionsPanel panel) { main_tabbedPane.remove(panel); } public void showPanel(OptionsPanel panel) { setVisible(true); main_tabbedPane.setSelectedComponent(panel); } private void loadOptions() { try { Component[] components = main_tabbedPane.getComponents(); for (int i = 0; i < components.length; i++) { if (components[i] instanceof OptionsPanel) { ((OptionsPanel)components[i]).loadOptions(); } } } catch (IOException ioe) { Ajde.getDefault().getErrorHandler().handleError("Could not load options.", ioe); } } private void saveOptions() { try {
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
ajde/src/org/aspectj/ajde/ui/swing/OptionsFrame.java
Component[] components = main_tabbedPane.getComponents(); for (int i = 0; i < components.length; i++) { if (components[i] instanceof OptionsPanel) { ((OptionsPanel)components[i]).saveOptions(); } } } catch (IOException ioe) { Ajde.getDefault().getErrorHandler().handleError("Could not load options.", ioe); } } private void close() { this.setVisible(false); } private void apply_button_actionPerformed(ActionEvent e) { saveOptions(); } private void ok_button_actionPerformed(ActionEvent e) { saveOptions(); close(); } private void cancel_button_actionPerformed(ActionEvent e) { close(); } private void jbInit() throws Exception { titledBorder1 = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(156, 156, 158)),"Sorting"); titledBorder2 = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(148, 145, 140)),"Associations (navigeable relations between sturcture nodes)"); titledBorder3 = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(156, 156, 158)),"Member Filtering (nodes to exclude from view)"); BorderFactory.createLineBorder(Color.black,2); titledBorder4 = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(148, 145, 140)),"Compile Options"); titledBorder5 = new TitledBorder("");
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
ajde/src/org/aspectj/ajde/ui/swing/OptionsFrame.java
BorderFactory.createLineBorder(Color.black,2); titledBorder6 = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(148, 145, 140)),"Run Options"); BorderFactory.createEtchedBorder(Color.white,new Color(156, 156, 158)); titledBorder7 = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(156, 156, 158)),"Granularity (all nodes below selected level will be hidden)"); border4 = BorderFactory.createEtchedBorder(Color.white,new Color(156, 156, 158)); titledBorder8 = new TitledBorder(border4,"Member Visibility"); border5 = BorderFactory.createEtchedBorder(Color.white,new Color(156, 156, 158)); titledBorder9 = new TitledBorder(border5,"Member Modifiers"); BorderFactory.createEmptyBorder(); titledBorder10 = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(148, 145, 140)),"Structure View Properties"); border7 = BorderFactory.createEtchedBorder(Color.white,new Color(156, 156, 158)); titledBorder11 = new TitledBorder(border7,"Member Kinds"); border8 = BorderFactory.createEtchedBorder(Color.white,new Color(148, 145, 140)); titledBorder12 = new TitledBorder(border8,"Build Paths"); border9 = BorderFactory.createEmptyBorder(6,6,6,6); jPanel1.setLayout(borderLayout1); jLabel1.setFont(new java.awt.Font("Dialog", 1, 14)); jLabel1.setText("AspectJ Development Environment (AJDE)"); version_label.setFont(new java.awt.Font("Dialog", 1, 12)); version_label.setText("Version: "); apply_button.setFont(new java.awt.Font("Dialog", 0, 11)); apply_button.setMaximumSize(new Dimension(70, 24)); apply_button.setMinimumSize(new Dimension(63, 24)); apply_button.setPreferredSize(new Dimension(70, 24)); apply_button.setText("Apply"); apply_button.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { apply_button_actionPerformed(e); } });
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
ajde/src/org/aspectj/ajde/ui/swing/OptionsFrame.java
cancel_button.setFont(new java.awt.Font("Dialog", 0, 11)); cancel_button.setMaximumSize(new Dimension(70, 24)); cancel_button.setMinimumSize(new Dimension(67, 24)); cancel_button.setPreferredSize(new Dimension(70, 24)); cancel_button.setText("Cancel"); cancel_button.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { cancel_button_actionPerformed(e); } }); ok_button.setFont(new java.awt.Font("Dialog", 0, 11)); ok_button.setMaximumSize(new Dimension(70, 24)); ok_button.setMinimumSize(new Dimension(49, 24)); ok_button.setPreferredSize(new Dimension(70, 24)); ok_button.setText("OK"); ok_button.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { ok_button_actionPerformed(e); } }); main_tabbedPane.setFont(new java.awt.Font("Dialog", 0, 11)); titledBorder1.setTitle("Ordering (sort order of nodes)"); titledBorder1.setTitleFont(new java.awt.Font("Dialog", 0, 11)); titledBorder2.setTitle("Associations (navigeable relations between structure nodes)"); titledBorder2.setTitleFont(new java.awt.Font("Dialog", 0, 11)); titledBorder3.setTitleFont(new java.awt.Font("Dialog", 0, 11)); titledBorder6.setTitleFont(new java.awt.Font("Dialog", 0, 11)); titledBorder5.setTitleFont(new java.awt.Font("Dialog", 0, 11)); titledBorder4.setTitle("Compiler Flags"); titledBorder4.setTitleFont(new java.awt.Font("Dialog", 0, 11));
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
ajde/src/org/aspectj/ajde/ui/swing/OptionsFrame.java
titledBorder7.setTitleFont(new java.awt.Font("Dialog", 0, 11)); titledBorder8.setTitle("Access Modifiers"); titledBorder8.setTitleFont(new java.awt.Font("Dialog", 0, 11)); titledBorder9.setTitleFont(new java.awt.Font("Dialog", 0, 11)); titledBorder10.setTitleFont(new java.awt.Font("Dialog", 0, 11)); titledBorder11.setTitleFont(new java.awt.Font("Dialog", 0, 11)); titledBorder12.setTitleFont(new java.awt.Font("Dialog", 0, 11)); about_panel.setLayout(borderLayout9); jTextArea1.setBackground(UIManager.getColor("ColorChooser.background")); jTextArea1.setFont(new java.awt.Font("SansSerif", 0, 12)); jTextArea1.setEditable(false); jTextArea1.setText(ABOUT_TEXT); about_panel.setBorder(border9); built_label.setText("Built: "); built_label.setFont(new java.awt.Font("Dialog", 1, 12)); main_tabbedPane.add(about_panel, "About AJDE"); this.getContentPane().add(button_panel, BorderLayout.SOUTH); button_panel.add(ok_button, null); button_panel.add(cancel_button, null); button_panel.add(apply_button, null); this.getContentPane().add(main_tabbedPane, BorderLayout.CENTER); about_panel.add(jTextArea1, BorderLayout.CENTER); about_panel.add(jPanel1, BorderLayout.NORTH); jPanel1.add(jLabel1, BorderLayout.NORTH); jPanel1.add(version_label, BorderLayout.CENTER); jPanel1.add(built_label, BorderLayout.SOUTH); } }
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
bridge/src/org/aspectj/bridge/Version.java
/* ******************************************************************** * Copyright (c) 1998-2001 Xerox Corporation, * 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: * Xerox/PARC initial implementation * *******************************************************************/ package org.aspectj.bridge; import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.Date; public class Version {
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
bridge/src/org/aspectj/bridge/Version.java
public static final String DEVELOPMENT = "DEVELOPMENT"; public static final long NOTIME = 0L; public static final String text = "DEVELOPMENT"; /** * Time text set by build script using SIMPLE_DATE_FORMAT. * (if DEVELOPMENT version, invalid) */ public static final String time_text = ""; /** * time in seconds-since-... format, used by programmatic clients. * (if DEVELOPMENT version, NOTIME) */ public static final long time; public static final String SIMPLE_DATE_FORMAT = "EEEE MMM d, yyyy 'at' HH:mm:ss z"; static {
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
bridge/src/org/aspectj/bridge/Version.java
long foundTime = NOTIME; try { SimpleDateFormat format = new SimpleDateFormat(SIMPLE_DATE_FORMAT); ParsePosition pos = new ParsePosition(0); Date date = format.parse(time_text, pos); foundTime = date.getTime(); } catch (Throwable t) { } time = foundTime; } /** * Test whether the version is as specified by any first argument. * Emit text to System.err on failure * @param args String[] with first argument equal to Version.text * @see Version#text */ public static void main(String[] args) { if ((null != args) && (0 < args.length)) { if (!Version.text.equals(args[0])) { System.err.println("version expected: \"" + args[0] + "\" actual=\"" + Version.text + "\""); } } } }
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
bridge/testsrc/org/aspectj/bridge/VersionTest.java
/* ******************************************************************* * Copyright (c) 1999-2001 Xerox Corporation, * 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: * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.bridge; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; import junit.framework.TestCase; import junit.textui.TestRunner; /** * */ public class VersionTest extends TestCase {
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
bridge/testsrc/org/aspectj/bridge/VersionTest.java
private static final String ME = "org.aspectj.bridge.VersionTest"; public static void main(String[] args) { TestRunner.main(new String[] {ME}); } /** * Constructor for MessageTest. * @param name */ public VersionTest(String name) { super(name); } public void testVersion() { if (Version.time_text.equals("")) return; Date date = new Date(Version.time); SimpleDateFormat format = new SimpleDateFormat(Version.SIMPLE_DATE_FORMAT, Locale.getDefault()); format.setTimeZone(TimeZone.getTimeZone("GMT")); String timeString = format.format(date); assertEquals(Version.time_text, timeString); } }
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.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 * ******************************************************************/
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
package org.aspectj.weaver; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.EOFException; import java.io.IOException; import org.aspectj.bridge.MessageUtil; import org.aspectj.bridge.Version; import org.aspectj.util.FileUtil; import org.aspectj.weaver.patterns.Declare; import org.aspectj.weaver.patterns.IScope; import org.aspectj.weaver.patterns.PerClause; import org.aspectj.weaver.patterns.Pointcut; /** * These attributes are written to and read from .class files (see the JVM spec). * * <p>Each member or type can have a number of AjAttributes. Each * such attribute is in 1-1 correspondence with an Unknown bcel attribute. * Creating one of these does NOTHING to the underlying thing, so if you really * want to add an attribute to a particular thing, well, you'd better actually do that. * * @author Erik Hilsdale * @author Jim Hugunin */ public abstract class AjAttribute { public static final String AttributePrefix = "org.aspectj.weaver"; protected abstract void write(DataOutputStream s) throws IOException; public abstract String getNameString(); public char[] getNameChars() { return getNameString().toCharArray();
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
} /** * Just writes the contents */ public byte[] getBytes() { try { ByteArrayOutputStream b0 = new ByteArrayOutputStream(); DataOutputStream s0 = new DataOutputStream(b0); write(s0); return b0.toByteArray(); } catch (IOException e) { throw new RuntimeException("sanity check"); } } /** * Writes the full attribute, i.e. name_index, length, and contents */ public byte[] getAllBytes(short nameIndex) { try { byte[] bytes = getBytes(); ByteArrayOutputStream b0 = new ByteArrayOutputStream(); DataOutputStream s0 = new DataOutputStream(b0); s0.writeShort(nameIndex); s0.writeInt(bytes.length); s0.write(bytes); return b0.toByteArray();
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
} catch (IOException e) { throw new RuntimeException("sanity check"); } } public static AjAttribute read(AjAttribute.WeaverVersionInfo v, String name, byte[] bytes, ISourceContext context,World w) { try { if (bytes == null) bytes = new byte[0]; VersionedDataInputStream s = new VersionedDataInputStream(new ByteArrayInputStream(bytes)); s.setVersion(v); if (name.equals(Aspect.AttributeName)) { return new Aspect(PerClause.readPerClause(s, context)); } else if (name.equals(MethodDeclarationLineNumberAttribute.AttributeName)) { return MethodDeclarationLineNumberAttribute.read(s); } else if (name.equals(WeaverState.AttributeName)) { return new WeaverState(WeaverStateInfo.read(s, context)); } else if (name.equals(WeaverVersionInfo.AttributeName)) { return WeaverVersionInfo.read(s); } else if (name.equals(AdviceAttribute.AttributeName)) { AdviceAttribute aa = AdviceAttribute.read(s, context); aa.getPointcut().check(context,w); return aa; } else if (name.equals(PointcutDeclarationAttribute.AttributeName)) { PointcutDeclarationAttribute pda = new PointcutDeclarationAttribute(ResolvedPointcutDefinition.read(s, context)); pda.pointcutDef.getPointcut().check(context,w); return pda; } else if (name.equals(TypeMunger.AttributeName)) { return new TypeMunger(ResolvedTypeMunger.read(s, context)); } else if (name.equals(AjSynthetic.AttributeName)) {
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
return new AjSynthetic(); } else if (name.equals(DeclareAttribute.AttributeName)) { return new DeclareAttribute(Declare.read(s, context)); } else if (name.equals(PrivilegedAttribute.AttributeName)) { return PrivilegedAttribute.read(s, context); } else if (name.equals(SourceContextAttribute.AttributeName)) { return SourceContextAttribute.read(s); } else if (name.equals(EffectiveSignatureAttribute.AttributeName)) { return EffectiveSignatureAttribute.read(s, context); } else { if (w == null || w.getMessageHandler()==null) throw new BCException("unknown attribute" + name); w.getMessageHandler().handleMessage(MessageUtil.warn("unknown attribute encountered "+name)); return null; } } catch (IOException e) { throw new BCException("malformed " + name + " attribute " + e); } } /** Synthetic members should have NO advice put on them or on their contents. * This attribute is currently unused as we consider all members starting * with NameMangler.PREFIX to automatically be synthetic. As we use this we might * find that we want multiple * kinds of synthetic. In particular, if we want to treat the call to a synthetic getter * (say, of an introduced field) as a field reference itself, then a method might want * a particular kind of AjSynthetic attribute that also includes a signature of what * it stands for. */ public static class AjSynthetic extends AjAttribute {
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
public static final String AttributeName = "org.aspectj.weaver.AjSynthetic"; public String getNameString() { return AttributeName; } public AjSynthetic() {} public void write(DataOutputStream s) throws IOException {} } public static class TypeMunger extends AjAttribute { public static final String AttributeName = "org.aspectj.weaver.TypeMunger"; public String getNameString() { return AttributeName; } private ResolvedTypeMunger munger; public TypeMunger(ResolvedTypeMunger munger) { this.munger = munger; } public void write(DataOutputStream s) throws IOException { munger.write(s); } public ConcreteTypeMunger reify(World world, ResolvedType aspectType) { return world.concreteTypeMunger(munger, aspectType); } } public static class WeaverState extends AjAttribute {
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
public static final String AttributeName = "org.aspectj.weaver.WeaverState"; public String getNameString() { return AttributeName; } private WeaverStateInfo kind; public WeaverState(WeaverStateInfo kind) { this.kind = kind; } public void write(DataOutputStream s) throws IOException { kind.write(s); } public WeaverStateInfo reify() { return kind; } } public static class WeaverVersionInfo extends AjAttribute {
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
public static final String AttributeName = "org.aspectj.weaver.WeaverVersion"; public static short WEAVER_VERSION_MAJOR_UNKNOWN = 0; public static short WEAVER_VERSION_MINOR_UNKNOWN = 0; public static short WEAVER_VERSION_MAJOR_AJ121 = 1; public static short WEAVER_VERSION_MINOR_AJ121 = 0;
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
public static short WEAVER_VERSION_MAJOR_AJ150M4 = 3; public static short WEAVER_VERSION_MAJOR_AJ150 = 2; public static short WEAVER_VERSION_MINOR_AJ150 = 0; private static short CURRENT_VERSION_MAJOR = WEAVER_VERSION_MAJOR_AJ150M4; private static short CURRENT_VERSION_MINOR = WEAVER_VERSION_MINOR_AJ150; public static final WeaverVersionInfo UNKNOWN = new WeaverVersionInfo(WEAVER_VERSION_MAJOR_UNKNOWN,WEAVER_VERSION_MINOR_UNKNOWN); private short major_version; private short minor_version; private long buildstamp = Version.NOTIME; public String getNameString() { return AttributeName; } public WeaverVersionInfo() { this.major_version = CURRENT_VERSION_MAJOR; this.minor_version = CURRENT_VERSION_MINOR; } public WeaverVersionInfo(short major,short minor) { major_version = major;
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
minor_version = minor; } public void write(DataOutputStream s) throws IOException { s.writeShort(CURRENT_VERSION_MAJOR); s.writeShort(CURRENT_VERSION_MINOR); s.writeLong(Version.time); } public static WeaverVersionInfo read(VersionedDataInputStream s) throws IOException { short major = s.readShort(); short minor = s.readShort(); WeaverVersionInfo wvi = new WeaverVersionInfo(major,minor); if (s.getMajorVersion()>=WEAVER_VERSION_MAJOR_AJ150M4) { long stamp = 0; try { stamp = s.readLong(); wvi.setBuildstamp(stamp); } catch (EOFException eof) { } } return wvi; } public short getMajorVersion() { return major_version; } public short getMinorVersion() {
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
return minor_version; } public static short getCurrentWeaverMajorVersion() { return CURRENT_VERSION_MAJOR; } public static short getCurrentWeaverMinorVersion() { return CURRENT_VERSION_MINOR; } public void setBuildstamp(long stamp) { this.buildstamp = stamp; } public long getBuildstamp() { return buildstamp; } public String toString() { return major_version+"."+minor_version; } public static String toCurrentVersionString() { return CURRENT_VERSION_MAJOR+"."+CURRENT_VERSION_MINOR; } } public static class SourceContextAttribute extends AjAttribute {
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
public static final String AttributeName = "org.aspectj.weaver.SourceContext"; public String getNameString() { return AttributeName; } private String sourceFileName; private int[] lineBreaks; public SourceContextAttribute(String sourceFileName, int[] lineBreaks) { this.sourceFileName = sourceFileName; this.lineBreaks = lineBreaks; } public void write(DataOutputStream s) throws IOException { s.writeUTF(sourceFileName); FileUtil.writeIntArray(lineBreaks, s); } public static SourceContextAttribute read(VersionedDataInputStream s) throws IOException { return new SourceContextAttribute(s.readUTF(), FileUtil.readIntArray(s)); } public int[] getLineBreaks() { return lineBreaks; } public String getSourceFileName() { return sourceFileName; } } public static class MethodDeclarationLineNumberAttribute extends AjAttribute {
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
public static final String AttributeName = "org.aspectj.weaver.MethodDeclarationLineNumber"; public String getNameString() { return AttributeName; } private int lineNumber; private int offset; public MethodDeclarationLineNumberAttribute(int line, int offset) { this.lineNumber = line; this.offset = offset; } public int getLineNumber() { return lineNumber; } public int getOffset() { return offset; } public void write(DataOutputStream s) throws IOException { s.writeInt(lineNumber); s.writeInt(offset); } public static MethodDeclarationLineNumberAttribute read(VersionedDataInputStream s) throws IOException { int line = s.readInt();
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
int offset = 0; if (s.available()>0) { offset = s.readInt(); } return new MethodDeclarationLineNumberAttribute(line, offset); } public String toString() { return AttributeName + ": " + lineNumber + ":" + offset; } } public static class PointcutDeclarationAttribute extends AjAttribute { public static final String AttributeName = "org.aspectj.weaver.PointcutDeclaration"; public String getNameString() { return AttributeName; } private ResolvedPointcutDefinition pointcutDef; public PointcutDeclarationAttribute(ResolvedPointcutDefinition pointcutDef) { this.pointcutDef = pointcutDef; } public void write(DataOutputStream s) throws IOException { pointcutDef.write(s); } public ResolvedPointcutDefinition reify() { return pointcutDef; } } public static class DeclareAttribute extends AjAttribute {
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
public static final String AttributeName = "org.aspectj.weaver.Declare"; public String getNameString() { return AttributeName; } private Declare declare; public DeclareAttribute(Declare declare) { this.declare = declare; } public void write(DataOutputStream s) throws IOException { declare.write(s); } public Declare getDeclare() { return declare; } } public static class AdviceAttribute extends AjAttribute {
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
public static final String AttributeName = "org.aspectj.weaver.Advice"; public String getNameString() { return AttributeName; } private AdviceKind kind; private Pointcut pointcut; private int extraParameterFlags; private int start; private int end; private ISourceContext sourceContext;
155,213
Bug 155213 [ltw] can get into a state with the Version static initializer
The static initializer in Version that parses the time_text string and turns it into a long field seems to sometimes get loadtime weaving into a state - touching DateFormatters early on is always a pain, so I'm moving it to be processed on first reference. I could take it a step further ... if WeaverStateInfo didn't write out the time (it doesnt read it back in!!) it would never be used at all in normal processing - potentially saving us from loading a bunch of underpinning junk to do the formatting...
resolved fixed
40cf610
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2006-08-25T12:41:38Z
2006-08-25T12:46:40Z
weaver/src/org/aspectj/weaver/AjAttribute.java
private boolean proceedInInners; private ResolvedMember[] proceedCallSignatures; private boolean[] formalsUnchangedToProceed; private UnresolvedType[] declaredExceptions; /** * @param lexicalPosition must be greater than the lexicalPosition * of any advice declared before this one in an aspect, otherwise, * it can be any value. */ public AdviceAttribute(AdviceKind kind, Pointcut pointcut, int extraArgumentFlags, int start, int end, ISourceContext sourceContext) { this.kind = kind; this.pointcut = pointcut; this.extraParameterFlags = extraArgumentFlags; this.start = start; this.end = end; this.sourceContext = sourceContext; } public AdviceAttribute(AdviceKind kind, Pointcut pointcut, int extraArgumentFlags, int start, int end, ISourceContext sourceContext, boolean proceedInInners, ResolvedMember[] proceedCallSignatures, boolean[] formalsUnchangedToProceed, UnresolvedType[] declaredExceptions) { this.kind = kind; this.pointcut = pointcut; this.extraParameterFlags = extraArgumentFlags;