[jboss-cvs] JBossAS SVN: r94364 - in projects/kernel/trunk/aop-mc-int: src/main/java/org/jboss/aop/microcontainer/aspects and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Oct 5 08:38:55 EDT 2009
Author: kabir.khan at jboss.com
Date: 2009-10-05 08:38:54 -0400 (Mon, 05 Oct 2009)
New Revision: 94364
Added:
projects/kernel/trunk/aop-mc-int/src/main/resources/findbugs/
projects/kernel/trunk/aop-mc-int/src/main/resources/findbugs/exclude.xml
Modified:
projects/kernel/trunk/aop-mc-int/pom.xml
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/AbstractIntroduction.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/jmx/JMXIntroduction.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/jndi/JndiIntroduction.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/jndi/JndiLifecycleCallback.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/DelegatingBeanAspectFactory.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/InterceptorEntry.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/ManagedAspectDefinition.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AdviceData.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AdviceOrInterceptorData.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AfterAdviceData.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AspectBeanMetaDataFactory.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/BaseInterceptorData.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/BeforeAdviceData.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowCalled.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowEntry.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowNotCalled.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowStackBeanMetaDataFactory.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/FinallyAdviceData.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/InterceptorRefData.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/IntroductionBeanMetaDataFactory.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/LifecycleBeanMetaDataFactory.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/MicrocontainerAnnotationLoaderStrategy.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/MixinData.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/StackRefData.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/ThrowingAdviceData.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/integration/AOPConstructorJoinpoint.java
projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/integration/AOPDependencyBuilder.java
Log:
findbugs fixes and exclude file
Modified: projects/kernel/trunk/aop-mc-int/pom.xml
===================================================================
--- projects/kernel/trunk/aop-mc-int/pom.xml 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/pom.xml 2009-10-05 12:38:54 UTC (rev 94364)
@@ -316,7 +316,6 @@
<dependency>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman</artifactId>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.kernel</groupId>
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/AbstractIntroduction.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/AbstractIntroduction.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/AbstractIntroduction.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -75,6 +75,8 @@
public Object invoke(Invocation invocation) throws Throwable
{
+ if (invocation instanceof MethodInvocation == false)
+ throw new IllegalStateException("Invocation is not an instance of MethodInvocation: " + invocation);
MethodInvocation mi = (MethodInvocation) invocation;
KernelControllerContext context = (KernelControllerContext) mi.getArguments()[0];
String methodName = mi.getMethod().getName();
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/jmx/JMXIntroduction.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/jmx/JMXIntroduction.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/jmx/JMXIntroduction.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -59,6 +59,9 @@
@SuppressWarnings("unchecked")
public Object invoke(Invocation invocation) throws Throwable
{
+ if (invocation instanceof MethodInvocation == false)
+ throw new IllegalStateException("Invocation is not an instance of MethodInvocation: " + invocation);
+
MethodInvocation mi = (MethodInvocation) invocation;
KernelControllerContext context = (KernelControllerContext) mi.getArguments()[0];
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/jndi/JndiIntroduction.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/jndi/JndiIntroduction.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/jndi/JndiIntroduction.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -78,6 +78,9 @@
*/
public Object invoke(Invocation invocation) throws Throwable
{
+ if (invocation instanceof MethodInvocation == false)
+ throw new IllegalStateException("Invocation is not an instance of MethodInvocation: " + invocation);
+
MethodInvocation mi = (MethodInvocation) invocation;
KernelControllerContext context = (KernelControllerContext) mi.getArguments()[0];
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/jndi/JndiLifecycleCallback.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/jndi/JndiLifecycleCallback.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/jndi/JndiLifecycleCallback.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -78,6 +78,9 @@
*/
public Object invoke(Invocation invocation) throws Throwable
{
+ if (invocation instanceof MethodInvocation == false)
+ throw new IllegalStateException("Invocation is not an instance of MethodInvocation: " + invocation);
+
MethodInvocation mi = (MethodInvocation) invocation;
KernelControllerContext context = (KernelControllerContext) mi.getArguments()[0];
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/DelegatingBeanAspectFactory.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/DelegatingBeanAspectFactory.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/DelegatingBeanAspectFactory.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -182,37 +182,30 @@
public ValueMetaData getClassLoader()
{
ClassLoader loader = null;
- if (loader == null)
+ if (lookAtContext && context != null)
{
- if (lookAtContext && context != null)
+ try
{
+ loader = context.getClassLoader();
+ }
+ catch (Throwable t)
+ {
+ log.trace("Unable to retrieve classloader from " + context);
+ }
+
+ if (loader == null)
+ {
try
{
- loader = context.getClassLoader();
+ loader = Configurator.getClassLoader(((GenericBeanFactory)factory).getClassLoader());
}
- catch (Throwable t)
+ catch (Throwable e)
{
- log.trace("Unable to retrieve classloader from " + context);
+ log.trace("Unable to retrieve classloader from " + factory);
}
-
- if (loader == null)
- {
- try
- {
- loader = Configurator.getClassLoader(((GenericBeanFactory)factory).getClassLoader());
- }
- catch (Throwable e)
- {
- log.trace("Unable to retrieve classloader from " + factory);
- }
- }
}
- return loader != null ? new AbstractValueMetaData(loader) : null;
}
- else
- {
- return new AbstractValueMetaData(loader);
- }
+ return loader != null ? new AbstractValueMetaData(loader) : null;
}
}
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/InterceptorEntry.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/InterceptorEntry.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/InterceptorEntry.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -32,7 +32,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
-public class InterceptorEntry extends BindingEntry implements Cloneable
+public final class InterceptorEntry extends BindingEntry implements Cloneable
{
Aspect aspect;
String aspectMethod;
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/ManagedAspectDefinition.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/ManagedAspectDefinition.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/ManagedAspectDefinition.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -60,4 +60,18 @@
{
return dependentAspectName;
}
+
+ @Override
+ public int hashCode()
+ {
+ //super class hashcode is what we want
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ //super class equals is what we want
+ return super.equals(obj);
+ }
}
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AdviceData.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AdviceData.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AdviceData.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -33,6 +33,8 @@
@XmlType(name="aroundAdviceType", propOrder={})
public class AdviceData extends AdviceOrInterceptorData
{
+ private static final long serialVersionUID = 1L;
+
String adviceMethod;
public String getAdviceMethod()
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AdviceOrInterceptorData.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AdviceOrInterceptorData.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AdviceOrInterceptorData.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -35,6 +35,8 @@
public abstract class AdviceOrInterceptorData extends BaseInterceptorData
{
+ private static final long serialVersionUID = 1L;
+
AdviceType type = AdviceType.AROUND;
@XmlAttribute(name = "aspect")
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AfterAdviceData.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AfterAdviceData.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AfterAdviceData.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -33,6 +33,8 @@
@XmlType(name="afterAdviceType", propOrder={})
public class AfterAdviceData extends AdviceData
{
+ private static final long serialVersionUID = 1L;
+
public AfterAdviceData()
{
setType(AdviceType.AFTER);
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AspectBeanMetaDataFactory.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AspectBeanMetaDataFactory.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/AspectBeanMetaDataFactory.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -36,7 +36,6 @@
import org.jboss.aop.microcontainer.beans.ClassLoaderAwareGenericBeanFactory;
import org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData;
import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
import org.jboss.beans.metadata.spi.MetaDataVisitorNode;
import org.jboss.beans.metadata.spi.ValueMetaData;
import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
@@ -53,7 +52,6 @@
@XmlRootElement(name="aspect")
@XmlType(name="aspectType", propOrder={"aliases", "annotations", "classLoader", "constructor", "properties", "create", "start", "depends", "demands", "supplies", "installs", "uninstalls", "installCallbacks", "uninstallCallbacks"})
public class AspectBeanMetaDataFactory extends AspectManagerAwareBeanMetaDataFactory
- implements BeanMetaDataFactory
{
private static final long serialVersionUID = 1L;
@@ -140,6 +138,7 @@
throw new RuntimeException("Wrong number of beans" + beans);
}
BeanMetaData factory = beans.get(0);
+
BeanMetaDataBuilder factoryBuilder = AOPBeanMetaDataBuilder.createBuilder(factory);
factoryBuilder.setBean(ClassLoaderAwareGenericBeanFactory.class.getName());
result.add(factory);
@@ -150,7 +149,7 @@
aspectBuilder.addPropertyMetaData("name", aspectName);
HashMap<String, String> attributes = new HashMap<String, String>();
attributes.put("name", name);
- if (factory != null)
+ if (this.factory != null)
{
attributes.put("factory", this.factory);
}
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/BaseInterceptorData.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/BaseInterceptorData.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/BaseInterceptorData.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -21,6 +21,8 @@
*/
package org.jboss.aop.microcontainer.beans.metadata;
+import java.io.Serializable;
+
import javax.xml.bind.annotation.XmlAttribute;
/**
@@ -28,9 +30,10 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
-public abstract class BaseInterceptorData
+public abstract class BaseInterceptorData implements Serializable
{
-
+ private static final long serialVersionUID = 1L;
+
String refName;
public BaseInterceptorData()
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/BeforeAdviceData.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/BeforeAdviceData.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/BeforeAdviceData.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -33,6 +33,8 @@
@XmlType(name="beforeAdviceType", propOrder={})
public class BeforeAdviceData extends AdviceData
{
+ private static final long serialVersionUID = 1L;
+
public BeforeAdviceData()
{
setType(AdviceType.BEFORE);
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowCalled.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowCalled.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowCalled.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -28,6 +28,8 @@
*/
public class CFlowCalled extends CFlowEntry
{
+ private static final long serialVersionUID = 1L;
+
public boolean getCalled()
{
return true;
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowEntry.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowEntry.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowEntry.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -21,6 +21,8 @@
*/
package org.jboss.aop.microcontainer.beans.metadata;
+import java.io.Serializable;
+
import javax.xml.bind.annotation.XmlAttribute;
/**
@@ -28,8 +30,10 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
-public class CFlowEntry
+public class CFlowEntry implements Serializable
{
+ private static final long serialVersionUID = 1L;
+
private String expr;
private boolean called;
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowNotCalled.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowNotCalled.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowNotCalled.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -28,6 +28,8 @@
*/
public class CFlowNotCalled extends CFlowEntry
{
+ private static final long serialVersionUID = 1L;
+
public boolean getCalled()
{
return false;
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowStackBeanMetaDataFactory.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowStackBeanMetaDataFactory.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/CFlowStackBeanMetaDataFactory.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -33,7 +33,6 @@
import org.jboss.aop.microcontainer.beans.CFlowStack;
import org.jboss.aop.microcontainer.beans.CFlowStackEntry;
import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
import org.jboss.beans.metadata.spi.ValueMetaData;
import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
import org.jboss.xb.annotations.JBossXmlSchema;
@@ -48,7 +47,6 @@
@XmlRootElement(name="cflow")
@XmlType(name="cflowStackType", propOrder={"aliases", "annotations", "classLoader", "constructor", "properties", "calledEntries", "create", "start", "depends", "demands", "supplies", "installs", "uninstalls", "installCallbacks", "uninstallCallbacks"})
public class CFlowStackBeanMetaDataFactory extends AspectManagerAwareBeanMetaDataFactory
- implements BeanMetaDataFactory
{
private static final long serialVersionUID = 1L;
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/FinallyAdviceData.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/FinallyAdviceData.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/FinallyAdviceData.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -33,6 +33,8 @@
@XmlType(name="finallyAdviceType", propOrder={})
public class FinallyAdviceData extends AdviceData
{
+ private static final long serialVersionUID = 1L;
+
public FinallyAdviceData()
{
setType(AdviceType.FINALLY);
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/InterceptorRefData.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/InterceptorRefData.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/InterceptorRefData.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -32,6 +32,8 @@
@XmlType(name="interceptorRefType", propOrder={})
public class InterceptorRefData extends AdviceOrInterceptorData
{
+ private static final long serialVersionUID = 1L;
+
public InterceptorRefData()
{
super();
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/IntroductionBeanMetaDataFactory.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/IntroductionBeanMetaDataFactory.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/IntroductionBeanMetaDataFactory.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -34,7 +34,6 @@
import org.jboss.aop.microcontainer.beans.IntroductionBinding;
import org.jboss.aop.microcontainer.beans.MixinEntry;
import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
import org.jboss.beans.metadata.spi.ValueMetaData;
import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
import org.jboss.util.id.GUID;
@@ -51,7 +50,6 @@
//@XmlType(name="introductionType", propOrder={"aliases", "annotations", "classLoader", "constructor", "properties", "create", "start", "depends", "demands", "supplies", "installs", "uninstalls", "installCallbacks", "uninstallCallbacks"})
@XmlType(name="introductionType", propOrder={})
public class IntroductionBeanMetaDataFactory extends AspectManagerAwareBeanMetaDataFactory
- implements BeanMetaDataFactory
{
private static final long serialVersionUID = 1L;
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/LifecycleBeanMetaDataFactory.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/LifecycleBeanMetaDataFactory.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/LifecycleBeanMetaDataFactory.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -29,7 +29,6 @@
import org.jboss.aop.microcontainer.beans.LifecycleBinding;
import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
import org.jboss.beans.metadata.spi.DependencyMetaData;
import org.jboss.beans.metadata.spi.PropertyMetaData;
import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
@@ -41,7 +40,6 @@
* @version $Revision: 1.1 $
*/
public abstract class LifecycleBeanMetaDataFactory extends AspectManagerAwareBeanMetaDataFactory
- implements BeanMetaDataFactory
{
private static final long serialVersionUID = 1L;
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/MicrocontainerAnnotationLoaderStrategy.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/MicrocontainerAnnotationLoaderStrategy.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/MicrocontainerAnnotationLoaderStrategy.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -99,6 +99,10 @@
{
entry = new FinallyAdviceData();
}
+ else
+ {
+ throw new IllegalStateException("Invalid advice type " + internalAdviceType);
+ }
entry.setAdviceMethod(methodName);
entry.setRefName(aspectDefName);
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/MixinData.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/MixinData.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/MixinData.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -21,6 +21,8 @@
*/
package org.jboss.aop.microcontainer.beans.metadata;
+import java.io.Serializable;
+
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@@ -31,8 +33,10 @@
* @version $Revision: 1.1 $
*/
@XmlType(propOrder= {})
-public class MixinData
+public class MixinData implements Serializable
{
+ private static final long serialVersionUID = 1L;
+
String mixin;
boolean isTransient = true;
String construction;
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/StackRefData.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/StackRefData.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/StackRefData.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -33,6 +33,8 @@
@XmlType(name="stackRefType", propOrder={})
public class StackRefData extends BaseInterceptorData
{
+ private static final long serialVersionUID = 1L;
+
@Override
public String getBeanClassName()
{
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/ThrowingAdviceData.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/ThrowingAdviceData.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/ThrowingAdviceData.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -33,6 +33,8 @@
@XmlType(name="throwingAdviceType", propOrder={})
public class ThrowingAdviceData extends AdviceData
{
+ private static final long serialVersionUID = 1L;
+
public ThrowingAdviceData()
{
setType(AdviceType.THROWING);
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/integration/AOPConstructorJoinpoint.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/integration/AOPConstructorJoinpoint.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/integration/AOPConstructorJoinpoint.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -277,6 +277,8 @@
break;
}
}
+ if (constructor == null)
+ throw new IllegalStateException("Could not find constructor");
}
else
{
Modified: projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/integration/AOPDependencyBuilder.java
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/integration/AOPDependencyBuilder.java 2009-10-05 12:34:15 UTC (rev 94363)
+++ projects/kernel/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/integration/AOPDependencyBuilder.java 2009-10-05 12:38:54 UTC (rev 94364)
@@ -378,9 +378,9 @@
return overrideMap;
}
- for (String key : overrideMap.keySet())
+ for (Entry<String, ArrayList<String>> entry : overrideMap.entrySet())
{
- classMap.put(key, overrideMap.get(key));
+ classMap.put(entry.getKey(), entry.getValue());
}
return classMap;
}
Added: projects/kernel/trunk/aop-mc-int/src/main/resources/findbugs/exclude.xml
===================================================================
--- projects/kernel/trunk/aop-mc-int/src/main/resources/findbugs/exclude.xml (rev 0)
+++ projects/kernel/trunk/aop-mc-int/src/main/resources/findbugs/exclude.xml 2009-10-05 12:38:54 UTC (rev 94364)
@@ -0,0 +1,125 @@
+<FindBugsFilter>
+
+ <!-- There will only be one instance of DefaultAspectManager so the write to static field from instance method is ok -->
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.metadata.DefaultAspectManager"/>
+ <Method name="setManagerBean"/>
+ <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD"/>
+ </Match>
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.metadata.DefaultAspectManager"/>
+ <Method name="setManagerProperty"/>
+ <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD"/>
+ </Match>
+
+ <!-- Exception is being caught, but runtime exception is thrown -->
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.ClassMetaDataLoader"/>
+ <Method name="start"/>
+ <Bug pattern="REC_CATCH_EXCEPTION"/>
+ </Match>
+
+ <!-- Field is intended to be set by setter, not constructor -->
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.BindingEntry"/>
+ <Field name="manager"/>
+ <Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
+ </Match>
+
+ <!-- We are not synchronizing factory, rather aspectFactory -->
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.DelegatingBeanAspectFactory"/>
+ <Field name="factory"/>
+ <Bug pattern="IS2_INCONSISTENT_SYNC"/>
+ </Match>
+
+ <!-- This is only used internally -->
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.StackEntry"/>
+ <Field name="factories"/>
+ <Bug pattern="EI_EXPOSE_REP"/>
+ </Match>
+
+ <!-- GenericBeanAspectFactory defines getClassname(), but both must remain as they are -->
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.ClassMetaData"/>
+ <Method name="getClassName"/>
+ <Bug pattern="NM_CONFUSING"/>
+ </Match>
+
+ <!-- super class hashcode is good enough -->
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.ManagedAspectDefinition"/>
+ <Method name="getClassName"/>
+ <Bug pattern="HE_EQUALS_NO_HASHCODE"/>
+ </Match>
+
+ <!-- Redundant null check is ok, fixing this method breaks things -->
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.AspectManagerFactory"/>
+ <Method name="getAspectManager" params="org.jboss.metadata.spi.MetaData" returns="org.jboss.aop.AspectManager"/>
+ <Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
+ </Match>
+
+ <!-- Exclude these non serializable field errors until it is clear if the metadata classes actually need to be serialized,
+ in which case there should be some tests testing that -->
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.DelegatingBeanAspectFactory$PushedClassLoaderMetaData"/>
+ <Bug pattern="SE_BAD_FIELD_INNER_CLASS"/>
+ </Match>
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.metadata.ArrayBindBeanMetaDataFactory"/>
+ <Field name="interceptors"/>
+ <Bug pattern="SE_BAD_FIELD"/>
+ </Match>
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.metadata.AspectBeanMetaDataFactory"/>
+ <Field name="elements"/>
+ <Bug pattern="SE_BAD_FIELD"/>
+ </Match>
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.metadata.BindBeanMetaDataFactory"/>
+ <Field name="interceptors"/>
+ <Bug pattern="SE_BAD_FIELD"/>
+ </Match>
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.metadata.CFlowStackBeanMetaDataFactory"/>
+ <Field name="calledEntries"/>
+ <Bug pattern="SE_BAD_FIELD"/>
+ </Match>
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.metadata.DomainBeanMetaDataFactory"/>
+ <Field name="childBeans"/>
+ <Bug pattern="SE_BAD_FIELD"/>
+ </Match>
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.metadata.DynamicCflowBeanMetaDataFactory"/>
+ <Field name="elements"/>
+ <Bug pattern="SE_BAD_FIELD"/>
+ </Match>
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.metadata.IntroductionBeanMetaDataFactory"/>
+ <Field name="mixins"/>
+ <Bug pattern="SE_BAD_FIELD"/>
+ </Match>
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.metadata.MetaDataBeanMetaDataFactory"/>
+ <Field name="elements"/>
+ <Bug pattern="SE_BAD_FIELD"/>
+ </Match>
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.metadata.MetaDataLoaderBeanMetaDataFactory"/>
+ <Field name="elements"/>
+ <Bug pattern="SE_BAD_FIELD"/>
+ </Match>
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.metadata.PrecedenceBeanMetaDataFactory"/>
+ <Field name="entries"/>
+ <Bug pattern="SE_BAD_FIELD"/>
+ </Match>
+ <Match>
+ <Class name="org.jboss.aop.microcontainer.beans.metadata.StackBeanMetaDataFactory"/>
+ <Field name="interceptors"/>
+ <Bug pattern="SE_BAD_FIELD"/>
+ </Match>
+</FindBugsFilter>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list