Merge branch cbeams/SPR-9669

* SPR-9669:
  Upgrade to CGLIB 3 and inline into spring-core
  Remove spring-asm and inline ASM 4 into spring-core
  Upgrade JarJar to version 1.3
This commit is contained in:
Chris Beams
2012-08-10 00:53:23 +02:00
37 changed files with 443 additions and 234 deletions

View File

@@ -39,6 +39,8 @@ Changes in version 3.2 M2 (2012-08-xx)
* introduced countRowsInTableWhere() and dropTables() in JdbcTestUtils (SPR-9235)
* introduced JdbcTemplate in tx base classes in the TestContext framework (SPR-8990)
* introduced countRowsInTableWhere() and dropTables() in tx base test classes (SPR-9665)
* inlined ASM 4.0 into spring-core, removed spring-asm subproject and jar (SPR-9669)
* inlined CGLIB 3.0 into spring-core, eliminating external dependency (SPR-9669)
Changes in version 3.2 M1 (2012-05-28)

18
src/dist/license.txt vendored
View File

@@ -202,18 +202,19 @@
=======================================================================
SPRING FRAMEWORK 3.1 SUBCOMPONENTS:
SPRING FRAMEWORK 3.2 SUBCOMPONENTS:
Spring Framework 3.1 includes a number of subcomponents with
Spring Framework 3.2 includes a number of subcomponents with
separate copyright notices and license terms. The product that
includes this file does not necessarily use all the open source
subcomponents referred to below. Your use of the source
code for these subcomponents is subject to the terms and
conditions of the following licenses.
>>> asm-2.2.3:
Copyright (c) 2000-2005 INRIA, France Telecom
>>> ASM 4.0 (org.ow2.asm:asm:4.0, org.ow2.asm:asm-commons:4.0):
Copyright (c) 2000-2011 INRIA, France Telecom
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -245,6 +246,15 @@ THE POSSIBILITY OF SUCH DAMAGE.
Copyright (c) 1999-2009, OW2 Consortium <http://www.ow2.org/>
>>> CGLIB 3.0 (cglib:cglib:3.0):
Per the LICENSE file in the CGLIB JAR distribution downloaded from
http://sourceforge.net/projects/cglib/files/cglib3/3.0/cglib-3.0.jar/download,
CGLIB 3.0 is licensed under the Apache License, version 2.0, the text of which
is included above.
=======================================================================
To the extent any open source subcomponents are licensed under the EPL and/or

View File

@@ -1177,8 +1177,10 @@ public interface IntroductionInfo {
</listitem>
<listitem>
<para>You'll need the CGLIB 2 binaries on your classpath; dynamic
proxies are available with the JDK.</para>
<para>There is no need to add CGLIB to your classpath. As of Spring
3.2, CGLIB is repackaged and included in the spring-core JAR. In
other words, CGLIB-based AOP will work "out of the box" just as do
JDK dynamic proxies.</para>
</listitem>
</itemizedlist>

View File

@@ -2549,10 +2549,12 @@ public @interface Idempotent {
</listitem>
<listitem>
<para>You will need the CGLIB 2 binaries on your classpath, whereas
dynamic proxies are available with the JDK. Spring will automatically
warn you when it needs CGLIB and the CGLIB library classes are not
found on the classpath.</para>
<para>As of Spring 3.2, it is no longer necessary to add CGLIB to your
project classpath, as CGLIB classes are repackaged under
org.springframework and included directly in the spring-core JAR. This
means that CGLIB-based proxy support 'just works' in the same way that
JDK dynamic proxies always have.
</para>
</listitem>
<listitem>

View File

@@ -1491,14 +1491,18 @@ public class CommandManager implements ApplicationContextAware {
method.<!--Note was plain text; I made it a note and moved it up.--></para>
<note>
<para>For this dynamic subclassing to work, you must have the CGLIB
jar(s) in your classpath. The class that the Spring container will
subclass cannot be <literal>final</literal>, and the method to be
overridden cannot be <literal>final</literal> either. Also, testing a
class that has an <literal>abstract</literal> method requires you to
subclass the class yourself and to supply a stub implementation of the
<literal>abstract</literal> method. Finally, objects that have been
the target of method injection cannot be serialized.</para>
<para>For this dynamic subclassing to work, the class that the Spring
container will subclass cannot be <literal>final</literal>, and the
method to be overridden cannot be <literal>final</literal> either. Also,
testing a class that has an <literal>abstract</literal> method requires
you to subclass the class yourself and to supply a stub implementation
of the <literal>abstract</literal> method. Finally, objects that have
been the target of method injection cannot be serialized. As of Spring
3.2 it is no longer necessary to add CGLIB to your classpath, because
CGLIB classes are repackaged under org.springframework and distributed
within the spring-core JAR. This is done both for convenience as well
as to avoid potential conflicts with other projects that use differing
versions of CGLIB.</para>
</note>
<para>Looking at the <classname>CommandManager</classname> class in the

View File

@@ -885,15 +885,14 @@ public class AppConfig {
comes in: All <literal>@Configuration</literal> classes are subclassed at
startup-time with <literal>CGLIB</literal>. In the subclass, the child
method checks the container first for any cached (scoped) beans before it
calls the parent method and creates a new instance. </para>
calls the parent method and creates a new instance. Note that as of Spring
3.2, it is no longer necessary to add CGLIB to your classpath because
CGLIB classes have been repackaged under org.springframework and included
directly within the spring-core JAR.</para>
<note>
<para> The behavior could be different according to the scope of your
bean. We are talking about singletons here. </para>
</note>
<note>
<para> Beware that, in order for JavaConfig to work, you must include the
CGLIB jar in your list of dependencies. </para>
</note>
<note>
<para> There are a few restrictions due to the fact that CGLIB dynamically
adds features at startup-time: <itemizedlist>

View File

@@ -422,10 +422,7 @@
<para>To create such a proxy, you insert a child
<literal>&lt;aop:scoped-proxy/&gt;</literal> element into a scoped bean
definition.
<!--To create what such proxy? Is the proxy created above? Also, below added an x-ref that seems relevant.-->(If
you choose class-based proxying, you also need the CGLIB library in your
classpath. See <xref
definition. See <xref
linkend="beans-factory-scopes-other-injection-proxies"/> and <xref
linkend="xsd-config"/>.) Why do definitions of beans scoped at the
<literal>request</literal>, <literal>session</literal>,
@@ -502,9 +499,7 @@
<para>By default, when the Spring container creates a proxy for a bean
that is marked up with the
<literal>&lt;aop:scoped-proxy/&gt;</literal> element, <emphasis>a
CGLIB-based class proxy is created</emphasis>. This means that you
need to have the CGLIB library in the classpath of your
application.</para>
CGLIB-based class proxy is created</emphasis>.</para>
<para><emphasis>Note: CGLIB proxies only intercept public method
calls!</emphasis> Do not call non-public methods on such a proxy; they

View File

@@ -1161,8 +1161,12 @@ public interface IntroductionInfo {
</listitem>
<listitem>
<para>You'll need the CGLIB 2 binaries on your classpath; dynamic
proxies are available with the JDK.</para>
<para>As of Spring 3.2 it is no longer required to add CGLIB to your
project classpath. CGLIB classes have been repackaged under
org.springframework and included directly in the spring-core JAR. This
is both for user convenience as well as to avoid potential conflicts
with other projects that have dependence on a differing version of
CGLIB.</para>
</listitem>
</itemizedlist>

View File

@@ -515,17 +515,11 @@ class GroovyMessenger implements Messenger {
<para>
The JRuby scripting support in Spring requires the following
libraries to be on the classpath of your application.
(The versions listed just happen to be the versions that the
Spring team used in the development of the JRuby scripting support;
you may well be able to use another version of a specific library.)
</para>
<itemizedlist>
<listitem>
<para><filename>jruby.jar</filename></para>
</listitem>
<listitem>
<para><filename>cglib-nodep-2.1_3.jar</filename></para>
</listitem>
</itemizedlist>
</sidebar>
<para>From the JRuby homepage...</para>
@@ -803,9 +797,6 @@ public class Main {
<listitem>
<para><filename>bsh-2.0b4.jar</filename></para>
</listitem>
<listitem>
<para><filename>cglib-nodep-2.1_3.jar</filename></para>
</listitem>
</itemizedlist>
</sidebar>
<para>From the BeanShell homepage...</para>