~ubuntu-branches/ubuntu/wily/aspectj/wily-proposed

« back to all changes in this revision

Viewing changes to org.aspectj/modules/loadtime/src/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2011-03-15 23:54:31 UTC
  • mfrom: (1.1.5 upstream) (7.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110315235431-7d8cs3gvs4tnqx7t
Tags: 1.6.11+dfsg-1
* New upstream release.
* Updated Standards-Version to 3.9.1 (no changes needed).
* Fix local Javadoc links:
  - d/patches/07_javadoc_links.diff: Use locally installed
   javadoc packages and hyperlink with them.
  - d/control: Add B-D on default-java-doc and libasm3-java-doc.
* d/control: Drop B-D on itself (our new bootstrap infrastructure doesn't need
  that anymore).
* Split packages into :
  - aspectj: only contains CLI tools.
  - libaspectj-java: JAR librairies for /usr/share/java.
  - libaspectj-java-doc: 4 API's Javadoc.
  - aspectj-doc: Programming Guides and SDK Documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 * Contributors: 
10
10
 *     Matthew Webster, Adrian Colyer, 
11
11
 *     Martin Lippert     initial implementation 
 
12
 *     Andy Clement
 
13
 *     Abraham Nevado
12
14
 * ******************************************************************/
13
15
 
14
16
package org.aspectj.weaver.loadtime;
121
123
                if (trace.isTraceEnabled())
122
124
                        trace.enter("defineClass", this, new Object[] { name, b, cs });
123
125
                // System.err.println("? WeavingURLClassLoader.defineClass(" + name + ", [" + b.length + "])");
124
 
 
 
126
                byte orig[] = b;
125
127
                /* Avoid recursion during adaptor initialization */
126
128
                if (!initializingAdaptor) {
127
129
 
139
141
                                trace.error("defineClass", th);
140
142
                        }
141
143
                }
142
 
                Class clazz = super.defineClass(name, b, cs);
 
144
                Class clazz;
 
145
                
 
146
                // On error, define the original form of the class and log the issue
 
147
                try { 
 
148
                        clazz= super.defineClass(name, b, cs);
 
149
                } catch (Throwable th) {
 
150
                        trace.error("Weaving class problem. Original class has been returned. The error was caused because of: " + th, th);
 
151
                        clazz= super.defineClass(name, orig, cs);
 
152
                }
143
153
                if (trace.isTraceEnabled())
144
154
                        trace.exit("defineClass", clazz);
145
155
                return clazz;