Author: scottmarlownovell
Date: 2009-04-02 12:29:06 -0400 (Thu, 02 Apr 2009)
New Revision: 16253
Modified:
core/trunk/annotations/pom.xml
core/trunk/cache-ehcache/pom.xml
core/trunk/cache-jbosscache/pom.xml
core/trunk/cache-jbosscache2/pom.xml
core/trunk/core/pom.xml
core/trunk/core/src/main/java/org/hibernate/bytecode/buildtime/CGLIBInstrumenter.java
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/AccessOptimizerAdapter.java
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/BytecodeProviderImpl.java
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/CglibClassTransformer.java
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/InstantiationOptimizerAdapter.java
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/ProxyFactoryFactoryImpl.java
core/trunk/core/src/main/java/org/hibernate/intercept/FieldInterceptionHelper.java
core/trunk/core/src/main/java/org/hibernate/intercept/cglib/CGLIBHelper.java
core/trunk/core/src/main/java/org/hibernate/intercept/cglib/FieldInterceptorImpl.java
core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java
core/trunk/distribution/pom.xml
core/trunk/distribution/src/assembly/dist.xml
core/trunk/entitymanager/pom.xml
core/trunk/envers/pom.xml
core/trunk/testsuite/pom.xml
Log:
HHH-3832 Upgrade to cglib-2.2 (asm 3.1)
Modified: core/trunk/annotations/pom.xml
===================================================================
--- core/trunk/annotations/pom.xml 2009-04-02 14:59:47 UTC (rev 16252)
+++ core/trunk/annotations/pom.xml 2009-04-02 16:29:06 UTC (rev 16253)
@@ -66,6 +66,12 @@
<artifactId>javassist</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
<dependencyManagement>
@@ -90,6 +96,12 @@
<artifactId>javassist</artifactId>
<version>3.4.GA</version>
</dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.2</version>
+ </dependency>
+
</dependencies>
</dependencyManagement>
Modified: core/trunk/cache-ehcache/pom.xml
===================================================================
--- core/trunk/cache-ehcache/pom.xml 2009-04-02 14:59:47 UTC (rev 16252)
+++ core/trunk/cache-ehcache/pom.xml 2009-04-02 16:29:06 UTC (rev 16253)
@@ -40,6 +40,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.4.GA</version>
Modified: core/trunk/cache-jbosscache/pom.xml
===================================================================
--- core/trunk/cache-jbosscache/pom.xml 2009-04-02 14:59:47 UTC (rev 16252)
+++ core/trunk/cache-jbosscache/pom.xml 2009-04-02 16:29:06 UTC (rev 16253)
@@ -112,13 +112,13 @@
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
- <version>2.1_3</version>
+ <version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>asm</groupId>
- <artifactId>asm-attrs</artifactId>
- <version>1.5.3</version>
+ <artifactId>asm</artifactId>
+ <version>3.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Modified: core/trunk/cache-jbosscache2/pom.xml
===================================================================
--- core/trunk/cache-jbosscache2/pom.xml 2009-04-02 14:59:47 UTC (rev 16252)
+++ core/trunk/cache-jbosscache2/pom.xml 2009-04-02 16:29:06 UTC (rev 16253)
@@ -43,6 +43,12 @@
</dependency>
<!-- this is optional on core :( and needed for testing -->
<dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.4.GA</version>
Modified: core/trunk/core/pom.xml
===================================================================
--- core/trunk/core/pom.xml 2009-04-02 14:59:47 UTC (rev 16252)
+++ core/trunk/core/pom.xml 2009-04-02 16:29:06 UTC (rev 16253)
@@ -63,9 +63,9 @@
<optional>true</optional>
</dependency>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-cglib-repack</artifactId>
- <version>2.1_3</version>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.2</version>
<optional>true</optional>
</dependency>
</dependencies>
Modified:
core/trunk/core/src/main/java/org/hibernate/bytecode/buildtime/CGLIBInstrumenter.java
===================================================================
---
core/trunk/core/src/main/java/org/hibernate/bytecode/buildtime/CGLIBInstrumenter.java 2009-04-02
14:59:47 UTC (rev 16252)
+++
core/trunk/core/src/main/java/org/hibernate/bytecode/buildtime/CGLIBInstrumenter.java 2009-04-02
16:29:06 UTC (rev 16253)
@@ -30,9 +30,9 @@
import org.hibernate.bytecode.util.BasicClassFilter;
import org.hibernate.bytecode.ClassTransformer;
import org.hibernate.bytecode.cglib.BytecodeProviderImpl;
-import org.hibernate.repackage.cglib.asm.ClassReader;
-import org.hibernate.repackage.cglib.core.ClassNameReader;
-import org.hibernate.repackage.cglib.transform.impl.InterceptFieldEnabled;
+import org.objectweb.asm.ClassReader;
+import net.sf.cglib.core.ClassNameReader;
+import net.sf.cglib.transform.impl.InterceptFieldEnabled;
/**
* Strategy for performing build-time instrumentation of persistent classes in order to
enable
Modified:
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/AccessOptimizerAdapter.java
===================================================================
---
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/AccessOptimizerAdapter.java 2009-04-02
14:59:47 UTC (rev 16252)
+++
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/AccessOptimizerAdapter.java 2009-04-02
16:29:06 UTC (rev 16253)
@@ -26,8 +26,8 @@
import org.hibernate.bytecode.ReflectionOptimizer;
import org.hibernate.PropertyAccessException;
-import org.hibernate.repackage.cglib.beans.BulkBean;
-import org.hibernate.repackage.cglib.beans.BulkBeanException;
+import net.sf.cglib.beans.BulkBean;
+import net.sf.cglib.beans.BulkBeanException;
import java.io.Serializable;
import java.io.ObjectOutputStream;
Modified:
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/BytecodeProviderImpl.java
===================================================================
---
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/BytecodeProviderImpl.java 2009-04-02
14:59:47 UTC (rev 16252)
+++
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/BytecodeProviderImpl.java 2009-04-02
16:29:06 UTC (rev 16253)
@@ -26,9 +26,9 @@
import java.lang.reflect.Modifier;
-import org.hibernate.repackage.cglib.beans.BulkBean;
-import org.hibernate.repackage.cglib.beans.BulkBeanException;
-import org.hibernate.repackage.cglib.reflect.FastClass;
+import net.sf.cglib.beans.BulkBean;
+import net.sf.cglib.beans.BulkBeanException;
+import net.sf.cglib.reflect.FastClass;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.hibernate.bytecode.BytecodeProvider;
Modified:
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/CglibClassTransformer.java
===================================================================
---
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/CglibClassTransformer.java 2009-04-02
14:59:47 UTC (rev 16252)
+++
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/CglibClassTransformer.java 2009-04-02
16:29:06 UTC (rev 16253)
@@ -29,25 +29,23 @@
import java.io.IOException;
import java.io.ByteArrayOutputStream;
-import org.hibernate.repackage.cglib.transform.ClassTransformer;
-import org.hibernate.repackage.cglib.transform.TransformingClassGenerator;
-import org.hibernate.repackage.cglib.transform.ClassReaderGenerator;
-import org.hibernate.repackage.cglib.transform.impl.InterceptFieldEnabled;
-import org.hibernate.repackage.cglib.transform.impl.InterceptFieldFilter;
-import org.hibernate.repackage.cglib.transform.impl.InterceptFieldTransformer;
-import org.hibernate.repackage.cglib.core.ClassNameReader;
-import org.hibernate.repackage.cglib.core.DebuggingClassWriter;
+import net.sf.cglib.transform.ClassTransformer;
+import net.sf.cglib.transform.TransformingClassGenerator;
+import net.sf.cglib.transform.ClassReaderGenerator;
+import net.sf.cglib.transform.impl.InterceptFieldEnabled;
+import net.sf.cglib.transform.impl.InterceptFieldFilter;
+import net.sf.cglib.transform.impl.InterceptFieldTransformer;
+import net.sf.cglib.core.ClassNameReader;
+import net.sf.cglib.core.DebuggingClassWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.hibernate.bytecode.AbstractClassTransformerImpl;
import org.hibernate.bytecode.util.FieldFilter;
import org.hibernate.bytecode.util.ClassFilter;
import org.hibernate.HibernateException;
-import org.hibernate.repackage.cglib.asm.Attribute;
-import org.hibernate.repackage.cglib.asm.Type;
-import org.hibernate.repackage.cglib.asm.ClassReader;
-import org.hibernate.repackage.cglib.asm.ClassWriter;
-import org.hibernate.repackage.cglib.asm.attrs.Attributes;
+import org.objectweb.asm.Type;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassWriter;
/**
* Enhance the classes allowing them to implements InterceptFieldEnabled
@@ -79,7 +77,7 @@
}
String[] names = ClassNameReader.getClassInfo( reader );
- ClassWriter w = new DebuggingClassWriter( true );
+ ClassWriter w = new DebuggingClassWriter( ClassWriter.COMPUTE_MAXS );
ClassTransformer t = getClassTransformer( names );
if ( t != null ) {
if ( log.isDebugEnabled() ) {
@@ -90,7 +88,7 @@
try {
reader = new ClassReader( new ByteArrayInputStream( classfileBuffer ) );
new TransformingClassGenerator(
- new ClassReaderGenerator( reader, attributes(), skipDebug() ), t
+ new ClassReaderGenerator( reader, skipDebug() ), t
).generateClass( w );
out = new ByteArrayOutputStream();
out.write( w.toByteArray() );
@@ -106,15 +104,10 @@
return classfileBuffer;
}
-
- private Attribute[] attributes() {
- return Attributes.getDefaultAttributes();
+ private int skipDebug() {
+ return ClassReader.SKIP_DEBUG;
}
- private boolean skipDebug() {
- return false;
- }
-
private ClassTransformer getClassTransformer(final String[] classInfo) {
if ( isAlreadyInstrumented( classInfo ) ) {
return null;
Modified:
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/InstantiationOptimizerAdapter.java
===================================================================
---
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/InstantiationOptimizerAdapter.java 2009-04-02
14:59:47 UTC (rev 16252)
+++
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/InstantiationOptimizerAdapter.java 2009-04-02
16:29:06 UTC (rev 16253)
@@ -25,7 +25,7 @@
package org.hibernate.bytecode.cglib;
import org.hibernate.bytecode.ReflectionOptimizer;
-import org.hibernate.repackage.cglib.reflect.FastClass;
+import net.sf.cglib.reflect.FastClass;
import org.hibernate.InstantiationException;
import java.io.Serializable;
Modified:
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/ProxyFactoryFactoryImpl.java
===================================================================
---
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/ProxyFactoryFactoryImpl.java 2009-04-02
14:59:47 UTC (rev 16252)
+++
core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/ProxyFactoryFactoryImpl.java 2009-04-02
16:29:06 UTC (rev 16253)
@@ -30,13 +30,13 @@
import org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory;
import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException;
-import org.hibernate.repackage.cglib.proxy.Enhancer;
-import org.hibernate.repackage.cglib.proxy.CallbackFilter;
-import org.hibernate.repackage.cglib.proxy.MethodInterceptor;
-import org.hibernate.repackage.cglib.proxy.MethodProxy;
-import org.hibernate.repackage.cglib.proxy.NoOp;
-import org.hibernate.repackage.cglib.proxy.Callback;
-import org.hibernate.repackage.cglib.proxy.Factory;
+import net.sf.cglib.proxy.Enhancer;
+import net.sf.cglib.proxy.CallbackFilter;
+import net.sf.cglib.proxy.MethodInterceptor;
+import net.sf.cglib.proxy.MethodProxy;
+import net.sf.cglib.proxy.NoOp;
+import net.sf.cglib.proxy.Callback;
+import net.sf.cglib.proxy.Factory;
import java.lang.reflect.Method;
import java.util.HashMap;
Modified:
core/trunk/core/src/main/java/org/hibernate/intercept/FieldInterceptionHelper.java
===================================================================
---
core/trunk/core/src/main/java/org/hibernate/intercept/FieldInterceptionHelper.java 2009-04-02
14:59:47 UTC (rev 16252)
+++
core/trunk/core/src/main/java/org/hibernate/intercept/FieldInterceptionHelper.java 2009-04-02
16:29:06 UTC (rev 16253)
@@ -50,7 +50,7 @@
public static boolean isInstrumented(Class entityClass) {
Class[] definedInterfaces = entityClass.getInterfaces();
for ( int i = 0; i < definedInterfaces.length; i++ ) {
- if (
"org.hibernate.repackage.cglib.transform.impl.InterceptFieldEnabled".equals(
definedInterfaces[i].getName() )
+ if ( "net.sf.cglib.transform.impl.InterceptFieldEnabled".equals(
definedInterfaces[i].getName() )
|| "org.hibernate.bytecode.javassist.FieldHandled".equals(
definedInterfaces[i].getName() ) ) {
return true;
}
@@ -68,7 +68,7 @@
}
Class[] definedInterfaces = entity.getClass().getInterfaces();
for ( int i = 0; i < definedInterfaces.length; i++ ) {
- if (
"org.hibernate.repackage.cglib.transform.impl.InterceptFieldEnabled".equals(
definedInterfaces[i].getName() ) ) {
+ if ( "net.sf.cglib.transform.impl.InterceptFieldEnabled".equals(
definedInterfaces[i].getName() ) ) {
// we have a CGLIB enhanced entity
return CGLIBHelper.extractFieldInterceptor( entity );
}
@@ -88,7 +88,7 @@
if ( entity != null ) {
Class[] definedInterfaces = entity.getClass().getInterfaces();
for ( int i = 0; i < definedInterfaces.length; i++ ) {
- if (
"org.hibernate.repackage.cglib.transform.impl.InterceptFieldEnabled".equals(
definedInterfaces[i].getName() ) ) {
+ if ( "net.sf.cglib.transform.impl.InterceptFieldEnabled".equals(
definedInterfaces[i].getName() ) ) {
// we have a CGLIB enhanced entity
return CGLIBHelper.injectFieldInterceptor( entity, entityName,
uninitializedFieldNames, session );
}
Modified: core/trunk/core/src/main/java/org/hibernate/intercept/cglib/CGLIBHelper.java
===================================================================
---
core/trunk/core/src/main/java/org/hibernate/intercept/cglib/CGLIBHelper.java 2009-04-02
14:59:47 UTC (rev 16252)
+++
core/trunk/core/src/main/java/org/hibernate/intercept/cglib/CGLIBHelper.java 2009-04-02
16:29:06 UTC (rev 16253)
@@ -26,7 +26,7 @@
import org.hibernate.intercept.FieldInterceptor;
import org.hibernate.engine.SessionImplementor;
-import org.hibernate.repackage.cglib.transform.impl.InterceptFieldEnabled;
+import net.sf.cglib.transform.impl.InterceptFieldEnabled;
import java.util.Set;
Modified:
core/trunk/core/src/main/java/org/hibernate/intercept/cglib/FieldInterceptorImpl.java
===================================================================
---
core/trunk/core/src/main/java/org/hibernate/intercept/cglib/FieldInterceptorImpl.java 2009-04-02
14:59:47 UTC (rev 16252)
+++
core/trunk/core/src/main/java/org/hibernate/intercept/cglib/FieldInterceptorImpl.java 2009-04-02
16:29:06 UTC (rev 16253)
@@ -27,7 +27,7 @@
import java.io.Serializable;
import java.util.Set;
-import org.hibernate.repackage.cglib.transform.impl.InterceptFieldCallback;
+import net.sf.cglib.transform.impl.InterceptFieldCallback;
import org.hibernate.intercept.AbstractFieldInterceptor;
import org.hibernate.engine.SessionImplementor;
Modified:
core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java
===================================================================
---
core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java 2009-04-02
14:59:47 UTC (rev 16252)
+++
core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java 2009-04-02
16:29:06 UTC (rev 16253)
@@ -28,11 +28,11 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import org.hibernate.repackage.cglib.proxy.Callback;
-import org.hibernate.repackage.cglib.proxy.CallbackFilter;
-import org.hibernate.repackage.cglib.proxy.Enhancer;
-import org.hibernate.repackage.cglib.proxy.InvocationHandler;
-import org.hibernate.repackage.cglib.proxy.NoOp;
+import net.sf.cglib.proxy.Callback;
+import net.sf.cglib.proxy.CallbackFilter;
+import net.sf.cglib.proxy.Enhancer;
+import net.sf.cglib.proxy.InvocationHandler;
+import net.sf.cglib.proxy.NoOp;
import org.hibernate.HibernateException;
import org.hibernate.LazyInitializationException;
Modified: core/trunk/distribution/pom.xml
===================================================================
--- core/trunk/distribution/pom.xml 2009-04-02 14:59:47 UTC (rev 16252)
+++ core/trunk/distribution/pom.xml 2009-04-02 16:29:06 UTC (rev 16253)
@@ -123,13 +123,13 @@
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
- <version>2.1_3</version>
+ <version>2.2</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>asm</groupId>
- <artifactId>asm-attrs</artifactId>
- <version>1.5.3</version>
+ <artifactId>asm</artifactId>
+ <version>3.1</version>
<optional>true</optional>
</dependency>
</dependencies>
Modified: core/trunk/distribution/src/assembly/dist.xml
===================================================================
--- core/trunk/distribution/src/assembly/dist.xml 2009-04-02 14:59:47 UTC (rev 16252)
+++ core/trunk/distribution/src/assembly/dist.xml 2009-04-02 16:29:06 UTC (rev 16253)
@@ -139,7 +139,7 @@
<dependencySet>
<outputDirectory>lib/bytecode/cglib</outputDirectory>
<includes>
- <include>org.hibernate:hibernate-cglib-repack</include>
+ <include>cglib:cglib</include>
</includes>
</dependencySet>
Modified: core/trunk/entitymanager/pom.xml
===================================================================
--- core/trunk/entitymanager/pom.xml 2009-04-02 14:59:47 UTC (rev 16252)
+++ core/trunk/entitymanager/pom.xml 2009-04-02 16:29:06 UTC (rev 16253)
@@ -62,6 +62,10 @@
<artifactId>hibernate-annotations</artifactId>
</dependency>
<dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ </dependency>
+ <dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
</dependency>
@@ -85,6 +89,11 @@
<version>${version}</version>
</dependency>
<dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.4.GA</version>
Modified: core/trunk/envers/pom.xml
===================================================================
--- core/trunk/envers/pom.xml 2009-04-02 14:59:47 UTC (rev 16252)
+++ core/trunk/envers/pom.xml 2009-04-02 16:29:06 UTC (rev 16253)
@@ -108,6 +108,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.4.GA</version>
Modified: core/trunk/testsuite/pom.xml
===================================================================
--- core/trunk/testsuite/pom.xml 2009-04-02 14:59:47 UTC (rev 16252)
+++ core/trunk/testsuite/pom.xml 2009-04-02 16:29:06 UTC (rev 16253)
@@ -34,9 +34,9 @@
<version>3.4.GA</version>
</dependency>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-cglib-repack</artifactId>
- <version>2.1_3</version>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.2</version>
</dependency>
<!-- optional dom4j dependency; needed here for dom4j (de)serialization
-->
<dependency>