[jboss-cvs] JBossAS SVN: r65565 - projects/microcontainer/trunk/deployers-spi/src/main/org/jboss/deployers/spi/deployer/helpers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Sep 23 14:36:32 EDT 2007


Author: scott.stark at jboss.org
Date: 2007-09-23 14:36:32 -0400 (Sun, 23 Sep 2007)
New Revision: 65565

Modified:
   projects/microcontainer/trunk/deployers-spi/src/main/org/jboss/deployers/spi/deployer/helpers/AbstractParsingDeployerWithOutput.java
Log:
Drop the Serializable output type check as its not reliable.

Modified: projects/microcontainer/trunk/deployers-spi/src/main/org/jboss/deployers/spi/deployer/helpers/AbstractParsingDeployerWithOutput.java
===================================================================
--- projects/microcontainer/trunk/deployers-spi/src/main/org/jboss/deployers/spi/deployer/helpers/AbstractParsingDeployerWithOutput.java	2007-09-23 17:54:11 UTC (rev 65564)
+++ projects/microcontainer/trunk/deployers-spi/src/main/org/jboss/deployers/spi/deployer/helpers/AbstractParsingDeployerWithOutput.java	2007-09-23 18:36:32 UTC (rev 65565)
@@ -274,17 +274,17 @@
    {
       if (buildManagedObject)
       {
-         // we can check for Serializable w/o searching for attachment
-         if (Serializable.class.isAssignableFrom(getOutput()) == false)
-         {
-            log.debug("Skipping ManagedObject since T(" + getOutput() + ") is not Serializable");
-            return;
-         }
-
          T deployment = unit.getAttachment(getOutput());
          if (deployment != null)
          {
             // must be Serializable - see getAttachment method contract (expectedType.cast(result))
+            if ( (deployment instanceof Serializable) == false)
+            {
+               // Probably an error if the deployer enabled buildManagedObject?
+               log.debug("Skipping ManagedObject since T(" + deployment + ") is not Serializable");
+               return;
+            }
+            
             Serializable instance = (Serializable) deployment;
             ManagedObjectFactory factory = ManagedObjectFactoryBuilder.create();
             ManagedObject mo = factory.initManagedObject(instance, null, null);




More information about the jboss-cvs-commits mailing list