[hibernate-commits] Hibernate SVN: r20130 - in core/trunk/core/src/main/java/org/hibernate: proxy/pojo/cglib and 3 other directories.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Mon Aug 9 15:56:25 EDT 2010


Author: steve.ebersole at jboss.com
Date: 2010-08-09 15:56:25 -0400 (Mon, 09 Aug 2010)
New Revision: 20130

Modified:
   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/bytecode/cglib/ReflectionOptimizerImpl.java
   core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java
   core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBProxyFactory.java
   core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/SerializableProxy.java
   core/trunk/core/src/main/java/org/hibernate/tool/instrument/BasicInstrumentationTask.java
   core/trunk/core/src/main/java/org/hibernate/tool/instrument/cglib/InstrumentTask.java
   core/trunk/core/src/main/java/org/hibernate/tool/instrument/javassist/InstrumentTask.java
Log:
HHH-5451 - deprecate cglib as bytecode provider


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	2010-08-09 19:55:23 UTC (rev 20129)
+++ core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/AccessOptimizerAdapter.java	2010-08-09 19:56:25 UTC (rev 20130)
@@ -39,7 +39,10 @@
  * which simply acts as an adpater to the {@link BulkBean} class.
  *
  * @author Steve Ebersole
+ *
+ * @deprecated Per HHH-5451 support for cglib as a bytecode provider has been deprecated.
  */
+ at Deprecated
 public class AccessOptimizerAdapter implements ReflectionOptimizer.AccessOptimizer, Serializable {
 
 	public static final String PROPERTY_GET_EXCEPTION =

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	2010-08-09 19:55:23 UTC (rev 20129)
+++ core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/BytecodeProviderImpl.java	2010-08-09 19:56:25 UTC (rev 20130)
@@ -41,11 +41,17 @@
  * Bytecode provider implementation for CGLIB.
  *
  * @author Steve Ebersole
+ *
+ * @deprecated Per HHH-5451 support for cglib as a bytecode provider has been deprecated.
  */
+ at Deprecated
 public class BytecodeProviderImpl implements BytecodeProvider {
-
 	private static final Logger log = LoggerFactory.getLogger( BytecodeProviderImpl.class );
 
+	public BytecodeProviderImpl() {
+		log.warn( "Per HHH-5451 support for cglib as a bytecode provider has been deprecated." );
+	}
+
 	public ProxyFactoryFactory getProxyFactoryFactory() {
 		return new ProxyFactoryFactoryImpl();
 	}

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	2010-08-09 19:55:23 UTC (rev 20129)
+++ core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/CglibClassTransformer.java	2010-08-09 19:56:25 UTC (rev 20130)
@@ -52,7 +52,10 @@
  * This interface is then used by Hibernate for some optimizations.
  *
  * @author Emmanuel Bernard
+ *
+ * @deprecated Per HHH-5451 support for cglib as a bytecode provider has been deprecated.
  */
+ at Deprecated
 public class CglibClassTransformer extends AbstractClassTransformerImpl {
 
 	private static Logger log = LoggerFactory.getLogger( CglibClassTransformer.class.getName() );

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	2010-08-09 19:55:23 UTC (rev 20129)
+++ core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/InstantiationOptimizerAdapter.java	2010-08-09 19:56:25 UTC (rev 20130)
@@ -35,10 +35,13 @@
 
 /**
  * The {@link ReflectionOptimizer.InstantiationOptimizer} implementation for CGLIB
- * which simply acts as an adpater to the {@link FastClass} class.
+ * which simply acts as an adapter to the {@link FastClass} class.
  *
  * @author Steve Ebersole
+ *
+ * @deprecated Per HHH-5451 support for cglib as a bytecode provider has been deprecated.
  */
+ at Deprecated
 public class InstantiationOptimizerAdapter implements ReflectionOptimizer.InstantiationOptimizer, Serializable {
 	private FastClass fastClass;
 

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	2010-08-09 19:55:23 UTC (rev 20129)
+++ core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/ProxyFactoryFactoryImpl.java	2010-08-09 19:56:25 UTC (rev 20130)
@@ -45,7 +45,10 @@
  * A factory for CGLIB-based {@link ProxyFactory} instances.
  *
  * @author Steve Ebersole
+ *
+ * @deprecated Per HHH-5451 support for cglib as a bytecode provider has been deprecated.
  */
+ at Deprecated
 public class ProxyFactoryFactoryImpl implements ProxyFactoryFactory {
 
 	/**

Modified: core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/ReflectionOptimizerImpl.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/ReflectionOptimizerImpl.java	2010-08-09 19:55:23 UTC (rev 20129)
+++ core/trunk/core/src/main/java/org/hibernate/bytecode/cglib/ReflectionOptimizerImpl.java	2010-08-09 19:56:25 UTC (rev 20130)
@@ -32,7 +32,10 @@
  * ReflectionOptimizer implementation for CGLIB.
  *
  * @author Steve Ebersole
+ *
+ * @deprecated Per HHH-5451 support for cglib as a bytecode provider has been deprecated.
  */
+ at Deprecated
 public class ReflectionOptimizerImpl implements ReflectionOptimizer, Serializable {
 	private transient InstantiationOptimizerAdapter instantiationOptimizer;
 	private transient AccessOptimizerAdapter accessOptimizer;

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	2010-08-09 19:55:23 UTC (rev 20129)
+++ core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java	2010-08-09 19:56:25 UTC (rev 20130)
@@ -1,10 +1,10 @@
 /*
  * Hibernate, Relational Persistence for Idiomatic Java
  *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * Copyright (c) 2010, Red Hat Inc. or third-party contributors as
  * indicated by the @author tags or express copyright attribution
  * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
+ * distributed under license by Red Hat Inc.
  *
  * This copyrighted material is made available to anyone wishing to use, modify,
  * copy, or redistribute it subject to the terms and conditions of the GNU
@@ -20,7 +20,6 @@
  * Free Software Foundation, Inc.
  * 51 Franklin Street, Fifth Floor
  * Boston, MA  02110-1301  USA
- *
  */
 package org.hibernate.proxy.pojo.cglib;
 
@@ -46,7 +45,10 @@
 
 /**
  * A <tt>LazyInitializer</tt> implemented using the CGLIB bytecode generation library
+ *
+ * @deprecated Per HHH-5451 support for cglib as a bytecode provider has been deprecated.
  */
+ at Deprecated
 public final class CGLIBLazyInitializer extends BasicLazyInitializer implements InvocationHandler {
 
 	private static final CallbackFilter FINALIZE_FILTER = new CallbackFilter() {

Modified: core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBProxyFactory.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBProxyFactory.java	2010-08-09 19:55:23 UTC (rev 20129)
+++ core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBProxyFactory.java	2010-08-09 19:56:25 UTC (rev 20130)
@@ -35,7 +35,10 @@
 
 /**
  * @author Gavin King
+ *
+ * @deprecated Per HHH-5451 support for cglib as a bytecode provider has been deprecated.
  */
+ at Deprecated
 public class CGLIBProxyFactory implements ProxyFactory {
 
 	protected static final Class[] NO_CLASSES = new Class[0];

Modified: core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/SerializableProxy.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/SerializableProxy.java	2010-08-09 19:55:23 UTC (rev 20129)
+++ core/trunk/core/src/main/java/org/hibernate/proxy/pojo/cglib/SerializableProxy.java	2010-08-09 19:56:25 UTC (rev 20130)
@@ -33,7 +33,10 @@
 
 /**
  * Serializable placeholder for <tt>CGLIB</tt> proxies
+ *
+ * @deprecated Per HHH-5451 support for cglib as a bytecode provider has been deprecated.
  */
+ at Deprecated
 public final class SerializableProxy extends AbstractSerializableProxy {
 
 	private Class persistentClass;

Modified: core/trunk/core/src/main/java/org/hibernate/tool/instrument/BasicInstrumentationTask.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/tool/instrument/BasicInstrumentationTask.java	2010-08-09 19:55:23 UTC (rev 20129)
+++ core/trunk/core/src/main/java/org/hibernate/tool/instrument/BasicInstrumentationTask.java	2010-08-09 19:56:25 UTC (rev 20130)
@@ -1,10 +1,10 @@
 /*
  * Hibernate, Relational Persistence for Idiomatic Java
  *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * Copyright (c) 2010, Red Hat Inc. or third-party contributors as
  * indicated by the @author tags or express copyright attribution
  * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
+ * distributed under license by Red Hat Inc.
  *
  * This copyrighted material is made available to anyone wishing to use, modify,
  * copy, or redistribute it subject to the terms and conditions of the GNU

Modified: core/trunk/core/src/main/java/org/hibernate/tool/instrument/cglib/InstrumentTask.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/tool/instrument/cglib/InstrumentTask.java	2010-08-09 19:55:23 UTC (rev 20129)
+++ core/trunk/core/src/main/java/org/hibernate/tool/instrument/cglib/InstrumentTask.java	2010-08-09 19:56:25 UTC (rev 20130)
@@ -1,10 +1,10 @@
 /*
  * Hibernate, Relational Persistence for Idiomatic Java
  *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * Copyright (c) 2010, Red Hat Inc. or third-party contributors as
  * indicated by the @author tags or express copyright attribution
  * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
+ * distributed under license by Red Hat Inc.
  *
  * This copyrighted material is made available to anyone wishing to use, modify,
  * copy, or redistribute it subject to the terms and conditions of the GNU
@@ -20,7 +20,6 @@
  * Free Software Foundation, Inc.
  * 51 Franklin Street, Fifth Floor
  * Boston, MA  02110-1301  USA
- *
  */
 package org.hibernate.tool.instrument.cglib;
 
@@ -34,7 +33,7 @@
  * field-level interception using CGLIB.
  * <p/>
  * In order to use this task, typically you would define a a taskdef
- * similiar to:<pre>
+ * similar to:<pre>
  * <taskdef name="instrument" classname="org.hibernate.tool.instrument.cglib.InstrumentTask">
  *     <classpath refid="lib.class.path"/>
  * </taskdef>
@@ -54,7 +53,7 @@
  * instrumented.
  * <p/>
  * Optionally you can chose to enable "Extended Instrumentation" if desired
- * by specifying the extended attriubute on the task:<pre>
+ * by specifying the extended attribute on the task:<pre>
  * <instrument extended="true">
  *     ...
  * </instrument>
@@ -63,8 +62,16 @@
  *
  * @author Gavin King
  * @author Steve Ebersole
+ * 
+ * @deprecated Per HHH-5451 support for cglib as a bytecode provider has been deprecated; use
+ * {@link org.hibernate.tool.instrument.javassist.InstrumentTask} instead
  */
+ at Deprecated
 public class InstrumentTask extends BasicInstrumentationTask {
+	public InstrumentTask() {
+		System.err.println( "Per HHH-5451 support for cglib as a bytecode provider has been deprecated." );
+	}
+
 	protected Instrumenter buildInstrumenter(Logger logger, Instrumenter.Options options) {
 		return new CGLIBInstrumenter( logger, options );
 	}

Modified: core/trunk/core/src/main/java/org/hibernate/tool/instrument/javassist/InstrumentTask.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/tool/instrument/javassist/InstrumentTask.java	2010-08-09 19:55:23 UTC (rev 20129)
+++ core/trunk/core/src/main/java/org/hibernate/tool/instrument/javassist/InstrumentTask.java	2010-08-09 19:56:25 UTC (rev 20130)
@@ -1,10 +1,10 @@
 /*
  * Hibernate, Relational Persistence for Idiomatic Java
  *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * Copyright (c) 2010, Red Hat Inc. or third-party contributors as
  * indicated by the @author tags or express copyright attribution
  * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
+ * distributed under license by Red Hat Inc.
  *
  * This copyrighted material is made available to anyone wishing to use, modify,
  * copy, or redistribute it subject to the terms and conditions of the GNU
@@ -20,7 +20,6 @@
  * Free Software Foundation, Inc.
  * 51 Franklin Street, Fifth Floor
  * Boston, MA  02110-1301  USA
- *
  */
 package org.hibernate.tool.instrument.javassist;
 



More information about the hibernate-commits mailing list