Author: scottmarlownovell
Date: 2009-04-03 11:45:11 -0400 (Fri, 03 Apr 2009)
New Revision: 16257
Modified:
core/branches/Branch_3_3/cache-ehcache/pom.xml
core/branches/Branch_3_3/cache-jbosscache/pom.xml
core/branches/Branch_3_3/cache-jbosscache2/pom.xml
core/branches/Branch_3_3/core/pom.xml
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/buildtime/CGLIBInstrumenter.java
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/AccessOptimizerAdapter.java
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/BytecodeProviderImpl.java
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/CglibClassTransformer.java
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/InstantiationOptimizerAdapter.java
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/ProxyFactoryFactoryImpl.java
core/branches/Branch_3_3/core/src/main/java/org/hibernate/intercept/FieldInterceptionHelper.java
core/branches/Branch_3_3/core/src/main/java/org/hibernate/intercept/cglib/CGLIBHelper.java
core/branches/Branch_3_3/core/src/main/java/org/hibernate/intercept/cglib/FieldInterceptorImpl.java
core/branches/Branch_3_3/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java
core/branches/Branch_3_3/distribution/pom.xml
core/branches/Branch_3_3/distribution/src/assembly/dist.xml
core/branches/Branch_3_3/testsuite/pom.xml
core/branches/Branch_3_3/tutorials/pom.xml
Log:
HHH-3832 Upgrade to cglib-2.2 (asm 3.1)
Modified: core/branches/Branch_3_3/cache-ehcache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-ehcache/pom.xml 2009-04-03 14:36:39 UTC (rev 16256)
+++ core/branches/Branch_3_3/cache-ehcache/pom.xml 2009-04-03 15:45:11 UTC (rev 16257)
@@ -43,6 +43,12 @@
</dependency>
<!-- these are optional on core... :( -->
<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/branches/Branch_3_3/cache-jbosscache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-jbosscache/pom.xml 2009-04-03 14:36:39 UTC (rev 16256)
+++ core/branches/Branch_3_3/cache-jbosscache/pom.xml 2009-04-03 15:45:11 UTC (rev 16257)
@@ -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/branches/Branch_3_3/cache-jbosscache2/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-jbosscache2/pom.xml 2009-04-03 14:36:39 UTC (rev
16256)
+++ core/branches/Branch_3_3/cache-jbosscache2/pom.xml 2009-04-03 15:45:11 UTC (rev
16257)
@@ -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/branches/Branch_3_3/core/pom.xml
===================================================================
--- core/branches/Branch_3_3/core/pom.xml 2009-04-03 14:36:39 UTC (rev 16256)
+++ core/branches/Branch_3_3/core/pom.xml 2009-04-03 15:45:11 UTC (rev 16257)
@@ -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/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/buildtime/CGLIBInstrumenter.java
===================================================================
---
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/buildtime/CGLIBInstrumenter.java 2009-04-03
14:36:39 UTC (rev 16256)
+++
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/buildtime/CGLIBInstrumenter.java 2009-04-03
15:45:11 UTC (rev 16257)
@@ -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/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/AccessOptimizerAdapter.java
===================================================================
---
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/AccessOptimizerAdapter.java 2009-04-03
14:36:39 UTC (rev 16256)
+++
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/AccessOptimizerAdapter.java 2009-04-03
15:45:11 UTC (rev 16257)
@@ -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/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/BytecodeProviderImpl.java
===================================================================
---
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/BytecodeProviderImpl.java 2009-04-03
14:36:39 UTC (rev 16256)
+++
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/BytecodeProviderImpl.java 2009-04-03
15:45:11 UTC (rev 16257)
@@ -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/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/CglibClassTransformer.java
===================================================================
---
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/CglibClassTransformer.java 2009-04-03
14:36:39 UTC (rev 16256)
+++
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/CglibClassTransformer.java 2009-04-03
15:45:11 UTC (rev 16257)
@@ -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/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/InstantiationOptimizerAdapter.java
===================================================================
---
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/InstantiationOptimizerAdapter.java 2009-04-03
14:36:39 UTC (rev 16256)
+++
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/InstantiationOptimizerAdapter.java 2009-04-03
15:45:11 UTC (rev 16257)
@@ -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/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/ProxyFactoryFactoryImpl.java
===================================================================
---
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/ProxyFactoryFactoryImpl.java 2009-04-03
14:36:39 UTC (rev 16256)
+++
core/branches/Branch_3_3/core/src/main/java/org/hibernate/bytecode/cglib/ProxyFactoryFactoryImpl.java 2009-04-03
15:45:11 UTC (rev 16257)
@@ -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/branches/Branch_3_3/core/src/main/java/org/hibernate/intercept/FieldInterceptionHelper.java
===================================================================
---
core/branches/Branch_3_3/core/src/main/java/org/hibernate/intercept/FieldInterceptionHelper.java 2009-04-03
14:36:39 UTC (rev 16256)
+++
core/branches/Branch_3_3/core/src/main/java/org/hibernate/intercept/FieldInterceptionHelper.java 2009-04-03
15:45:11 UTC (rev 16257)
@@ -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/branches/Branch_3_3/core/src/main/java/org/hibernate/intercept/cglib/CGLIBHelper.java
===================================================================
---
core/branches/Branch_3_3/core/src/main/java/org/hibernate/intercept/cglib/CGLIBHelper.java 2009-04-03
14:36:39 UTC (rev 16256)
+++
core/branches/Branch_3_3/core/src/main/java/org/hibernate/intercept/cglib/CGLIBHelper.java 2009-04-03
15:45:11 UTC (rev 16257)
@@ -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/branches/Branch_3_3/core/src/main/java/org/hibernate/intercept/cglib/FieldInterceptorImpl.java
===================================================================
---
core/branches/Branch_3_3/core/src/main/java/org/hibernate/intercept/cglib/FieldInterceptorImpl.java 2009-04-03
14:36:39 UTC (rev 16256)
+++
core/branches/Branch_3_3/core/src/main/java/org/hibernate/intercept/cglib/FieldInterceptorImpl.java 2009-04-03
15:45:11 UTC (rev 16257)
@@ -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/branches/Branch_3_3/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java
===================================================================
---
core/branches/Branch_3_3/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java 2009-04-03
14:36:39 UTC (rev 16256)
+++
core/branches/Branch_3_3/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java 2009-04-03
15:45:11 UTC (rev 16257)
@@ -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/branches/Branch_3_3/distribution/pom.xml
===================================================================
--- core/branches/Branch_3_3/distribution/pom.xml 2009-04-03 14:36:39 UTC (rev 16256)
+++ core/branches/Branch_3_3/distribution/pom.xml 2009-04-03 15:45:11 UTC (rev 16257)
@@ -121,9 +121,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/branches/Branch_3_3/distribution/src/assembly/dist.xml
===================================================================
--- core/branches/Branch_3_3/distribution/src/assembly/dist.xml 2009-04-03 14:36:39 UTC
(rev 16256)
+++ core/branches/Branch_3_3/distribution/src/assembly/dist.xml 2009-04-03 15:45:11 UTC
(rev 16257)
@@ -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/branches/Branch_3_3/testsuite/pom.xml
===================================================================
--- core/branches/Branch_3_3/testsuite/pom.xml 2009-04-03 14:36:39 UTC (rev 16256)
+++ core/branches/Branch_3_3/testsuite/pom.xml 2009-04-03 15:45:11 UTC (rev 16257)
@@ -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>
Modified: core/branches/Branch_3_3/tutorials/pom.xml
===================================================================
--- core/branches/Branch_3_3/tutorials/pom.xml 2009-04-03 14:36:39 UTC (rev 16256)
+++ core/branches/Branch_3_3/tutorials/pom.xml 2009-04-03 15:45:11 UTC (rev 16257)
@@ -67,7 +67,7 @@
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
- <version>2.1_3</version>
+ <version>2.2</version>
</dependency>
<dependency>
<groupId>asm</groupId>