[weld-commits] Weld SVN: r6395 - in core/trunk/impl: src/main/java/org/jboss/weld/bean/builtin and 8 other directories.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Thu Jun 3 09:44:34 EDT 2010


Author: pete.muir at jboss.org
Date: 2010-06-03 09:44:32 -0400 (Thu, 03 Jun 2010)
New Revision: 6395

Modified:
   core/trunk/impl/pom.xml
   core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/InstanceImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/context/BusyConversationException.java
   core/trunk/impl/src/main/java/org/jboss/weld/context/ContextNotActiveException.java
   core/trunk/impl/src/main/java/org/jboss/weld/context/CreationalContextImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/context/NonexistentConversationException.java
   core/trunk/impl/src/main/java/org/jboss/weld/conversation/ServletConversationManager.java
   core/trunk/impl/src/main/java/org/jboss/weld/event/EventImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/AmbiguousResolutionException.java
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/CreationException.java
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalArgumentException.java
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalProductException.java
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalStateException.java
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/InjectionException.java
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/InvalidObjectException.java
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnproxyableResolutionException.java
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnsatisfiedResolutionException.java
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnsupportedOperationException.java
   core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java
   core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java
   core/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java
   core/trunk/impl/src/main/java/org/jboss/weld/injection/ProxyClassConstructorInjectionPointWrapper.java
   core/trunk/impl/src/main/java/org/jboss/weld/util/AnnotatedTypes.java
   core/trunk/impl/src/main/java/org/jboss/weld/util/collections/ImmutableArraySet.java
   core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/instantiation/ReflectionFactoryInstantiator.java
   core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/instantiation/UnsafeInstantiator.java
Log:
add findbugs plugin, suppress various warnings

Modified: core/trunk/impl/pom.xml
===================================================================
--- core/trunk/impl/pom.xml	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/pom.xml	2010-06-03 13:44:32 UTC (rev 6395)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <parent>
       <artifactId>weld-core-parent</artifactId>
       <groupId>org.jboss.weld</groupId>
@@ -115,12 +116,20 @@
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-ext</artifactId>
       </dependency>
-      
+
       <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
       </dependency>
 
+      <dependency>
+         <groupId>net.sourceforge.findbugs</groupId>
+         <artifactId>annotations</artifactId>
+         <version>1.3.2</version>
+         <optional>true</optional>
+      </dependency>
+
+
    </dependencies>
 
    <build>
@@ -128,7 +137,6 @@
          <plugin>
             <groupId>ch.qos.cal10n.plugins</groupId>
             <artifactId>maven-cal10n-plugin</artifactId>
-            <version>0.7.2</version>
             <executions>
                <execution>
                   <id>verify-messages</id>
@@ -160,6 +168,32 @@
                </execution>
             </executions>
          </plugin>
+         <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>findbugs-maven-plugin</artifactId>
+            <version>2.3.1</version>
+            <dependencies>
+               <dependency>
+                  <groupId>org.slf4j</groupId>
+                  <artifactId>slf4j-simple</artifactId>
+                  <version>${slf4j.version}</version>
+               </dependency>
+            </dependencies>
+            <configuration>
+               <effort>Max</effort>
+               <threshold>Default</threshold>
+               <xmlOutput>true</xmlOutput>
+               <skip>true</skip>
+            </configuration>
+            <executions>
+               <execution>
+                  <goals>
+                     <goal>check</goal>
+                  </goals>
+               </execution>
+            </executions>
+         </plugin>
+
       </plugins>
    </build>
 
@@ -178,7 +212,7 @@
       </profile>
    </profiles>
 
-   <scm> 
+   <scm>
       <connection>scm:svn:http://anonsvn.jboss.org/repos/weld/core/trunk/impl</connection>
       <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/core/trunk/impl</developerConnection>
       <url>http://fisheye.jboss.org/browse/weld/core/trunk/impl</url>

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/InstanceImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/InstanceImpl.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/InstanceImpl.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -50,6 +50,7 @@
  * 
  * @param <T>
  */
+ at edu.umd.cs.findbugs.annotations.SuppressWarnings(value="SE_NO_SUITABLE_CONSTRUCTOR", justification="Uses SerializationProxy")
 public class InstanceImpl<T> extends AbstractFacade<T, Instance<T>> implements Instance<T>, Serializable
 {
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/context/BusyConversationException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/context/BusyConversationException.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/context/BusyConversationException.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -20,12 +20,15 @@
 import org.jboss.weld.exceptions.WeldExceptionKeyMessage;
 import org.jboss.weld.exceptions.WeldExceptionMessage;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 /**
  * A localized message version of the
  * {@link javax.enterprise.context.NonexistentConversationException}.
  * 
  * @author David Allen
  */
+ at SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification="Workaround for exception classes poor i8ln support")
 public class BusyConversationException extends javax.enterprise.context.BusyConversationException
 {
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/context/ContextNotActiveException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/context/ContextNotActiveException.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/context/ContextNotActiveException.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -20,12 +20,15 @@
 import org.jboss.weld.exceptions.WeldExceptionKeyMessage;
 import org.jboss.weld.exceptions.WeldExceptionMessage;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 /**
  * A localized message version of the
  * {@link javax.enterprise.context.ContextNotActiveException}.
  * 
  * @author David Allen
  */
+ at SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification="Workaround for exception classes poor i8ln support")
 public class ContextNotActiveException extends javax.enterprise.context.ContextNotActiveException
 {
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/context/CreationalContextImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/context/CreationalContextImpl.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/context/CreationalContextImpl.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -23,13 +23,16 @@
 import javax.enterprise.context.spi.Contextual;
 import javax.enterprise.context.spi.CreationalContext;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 public class CreationalContextImpl<T> implements CreationalContext<T>, WeldCreationalContext<T>, Serializable
 {
 
    private static final long serialVersionUID = 7375854583908262422L;
    
-   // Only needed for creation, by the time it's serialized we don't need it
+   @SuppressWarnings(value="SE_TRANSIENT_FIELD_NOT_RESTORED", justification="Not needed after initial creation")
    private final transient Map<Contextual<?>, Object> incompleteInstances;
+   @SuppressWarnings(value="SE_TRANSIENT_FIELD_NOT_RESTORED", justification="Not needed after initial creation")
    private final transient Contextual<T> contextual;
    
    private final DependentInstancesStore dependentInstancesStore;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/context/NonexistentConversationException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/context/NonexistentConversationException.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/context/NonexistentConversationException.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -20,12 +20,15 @@
 import org.jboss.weld.exceptions.WeldExceptionKeyMessage;
 import org.jboss.weld.exceptions.WeldExceptionMessage;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 /**
  * A localized message version of the
  * {@link javax.enterprise.context.NonexistentConversationException}.
  * 
  * @author David Allen
  */
+ at SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification="Workaround for exception classes poor i8ln support")
 public class NonexistentConversationException extends javax.enterprise.context.NonexistentConversationException
 {
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/conversation/ServletConversationManager.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/conversation/ServletConversationManager.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/conversation/ServletConversationManager.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -27,6 +27,8 @@
 import org.jboss.weld.servlet.ConversationBeanStore;
 import org.jboss.weld.servlet.HttpSessionManager;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 @SessionScoped
 public class ServletConversationManager extends AbstractConversationManager implements Serializable
 {
@@ -39,6 +41,7 @@
    private boolean sessionInvalidated;
 
    @Inject
+   @SuppressWarnings(value="SE_BAD_FIELD", justification="Injected field")
    private HttpSessionManager httpSessionManager;
    
    @Produces

Modified: core/trunk/impl/src/main/java/org/jboss/weld/event/EventImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/event/EventImpl.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/event/EventImpl.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -48,6 +48,7 @@
  * @param <T> The type of event being wrapped
  * @see javax.enterprise.event.Event
  */
+ at edu.umd.cs.findbugs.annotations.SuppressWarnings(value="SE_NO_SUITABLE_CONSTRUCTOR", justification="Uses SerializationProxy")
 public class EventImpl<T> extends AbstractFacade<T, Event<T>> implements Event<T>, Serializable
 {
    

Modified: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/AmbiguousResolutionException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/AmbiguousResolutionException.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/AmbiguousResolutionException.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -17,12 +17,15 @@
 
 package org.jboss.weld.exceptions;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 /**
  * Provides message localization service for the
  * {@link javax.enterprise.inject.AmbiguousResolutionException}.
  * 
  * @author David Allen
  */
+ at SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification="Workaround for exception classes poor i8ln support")
 public class AmbiguousResolutionException extends javax.enterprise.inject.AmbiguousResolutionException
 {
    private static final long    serialVersionUID = 2L;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/CreationException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/CreationException.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/CreationException.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -17,12 +17,15 @@
 
 package org.jboss.weld.exceptions;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 /**
  * A version of {@link javax.enterprise.inject.CreationException} that supports
  * message localization.
  * 
  * @author David Allen
  */
+ at SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification="Workaround for exception classes poor i8ln support")
 public class CreationException extends javax.enterprise.inject.CreationException
 {
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalArgumentException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalArgumentException.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalArgumentException.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -17,12 +17,15 @@
 
 package org.jboss.weld.exceptions;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 /**
  * An {@link java.lang.IllegalArgumentException} with support for
  * localized messages in Weld.
  * 
  * @author David Allen
  */
+ at SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification="Workaround for exception classes poor i8ln support")
 public class IllegalArgumentException extends java.lang.IllegalArgumentException
 {
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalProductException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalProductException.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalProductException.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -17,12 +17,15 @@
 
 package org.jboss.weld.exceptions;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 /**
  * An {@link javax.enterprise.inject.IllegalProductException} with support for
  * localized messages in Weld.
  * 
  * @author David Allen
  */
+ at SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification="Workaround for exception classes poor i8ln support")
 public class IllegalProductException extends javax.enterprise.inject.IllegalProductException
 {
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalStateException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalStateException.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalStateException.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -17,12 +17,15 @@
 
 package org.jboss.weld.exceptions;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 /**
  * An {@link java.lang.IllegalStateException} with support for
  * localized messages in Weld.
  * 
  * @author David Allen
  */
+ at SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification="Workaround for exception classes poor i8ln support")
 public class IllegalStateException extends java.lang.IllegalStateException
 {
    private static final long    serialVersionUID = 2L;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/InjectionException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/InjectionException.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/InjectionException.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -17,12 +17,15 @@
 
 package org.jboss.weld.exceptions;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 /**
  * Provides message localization service for the
  * {@link javax.enterprise.inject.InjectionException}.
  * 
  * @author David Allen
  */
+ at SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification="Workaround for exception classes poor i8ln support")
 public class InjectionException extends javax.enterprise.inject.InjectionException
 {
    private static final long    serialVersionUID = 2L;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/InvalidObjectException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/InvalidObjectException.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/InvalidObjectException.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -17,12 +17,15 @@
 
 package org.jboss.weld.exceptions;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 /**
  * An extended version of {@link java.io.InvalidObjectException} that supports
  * localization.
  * 
  * @author David Allen
  */
+ at SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification="Workaround for exception classes poor i8ln support")
 public class InvalidObjectException extends java.io.InvalidObjectException
 {
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnproxyableResolutionException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnproxyableResolutionException.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnproxyableResolutionException.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -17,12 +17,15 @@
 
 package org.jboss.weld.exceptions;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 /**
  * Provides message localization service for the
  * {@link javax.enterprise.inject.UnproxyableResolutionException}.
  * 
  * @author David Allen
  */
+ at SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification="Workaround for exception classes poor i8ln support")
 public class UnproxyableResolutionException extends javax.enterprise.inject.UnproxyableResolutionException
 {
    private static final long    serialVersionUID = 2L;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnsatisfiedResolutionException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnsatisfiedResolutionException.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnsatisfiedResolutionException.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -17,12 +17,15 @@
 
 package org.jboss.weld.exceptions;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 /**
  * Provides message localization service for the
  * {@link javax.enterprise.inject.UnsatisfiedResolutionException}.
  * 
  * @author David Allen
  */
+ at SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification="Workaround for exception classes poor i8ln support")
 public class UnsatisfiedResolutionException extends javax.enterprise.inject.UnsatisfiedResolutionException
 {
    private static final long    serialVersionUID = 2L;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnsupportedOperationException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnsupportedOperationException.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnsupportedOperationException.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -17,12 +17,15 @@
 
 package org.jboss.weld.exceptions;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 /**
  * An {@link java.lang.UnsupportedOperationException} with support for
  * localized messages in Weld.
  * 
  * @author David Allen
  */
+ at SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification="Workaround for exception classes poor i8ln support")
 public class UnsupportedOperationException extends java.lang.UnsupportedOperationException
 {
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -48,6 +48,8 @@
 import org.jboss.weld.manager.BeanManagerImpl;
 import org.jboss.weld.util.AnnotatedTypes;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 public class ConstructorInjectionPoint<T> extends ForwardingWeldConstructor<T> implements WeldInjectionPoint<T, Constructor<T>>, Serializable
 {
 
@@ -72,6 +74,7 @@
 
    }
 
+   @SuppressWarnings(value="SE_BAD_FIELD", justification="If the bean is not serializable, we won't ever try to serialize the injection point")
    private final Bean<T> declaringBean;
    private final WeldConstructor<T> constructor;
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -44,9 +44,12 @@
 import org.jboss.weld.manager.BeanManagerImpl;
 import org.jboss.weld.util.AnnotatedTypes;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 public class FieldInjectionPoint<T, X> extends ForwardingWeldField<T, X> implements WeldInjectionPoint<T, Field>, Serializable
 {
 
+   @SuppressWarnings(value="SE_BAD_FIELD", justification="If the bean is not serializable, we won't ever try to serialize the injection point")
    private final Bean<?> declaringBean;
    private final WeldField<T, X> field;
    private final boolean delegate;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -47,6 +47,8 @@
 import org.jboss.weld.logging.messages.ReflectionMessage;
 import org.jboss.weld.manager.BeanManagerImpl;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 public class ParameterInjectionPoint<T, X> extends ForwardingWeldParameter<T, X> implements WeldInjectionPoint<T, Object>, Serializable
 {
 
@@ -55,6 +57,7 @@
       return new ParameterInjectionPoint<T, X>(declaringBean, parameter);
    }
 
+   @SuppressWarnings(value="SE_BAD_FIELD", justification="If the bean is not serializable, we won't ever try to serialize the injection point")
    private final Bean<?> declaringBean;
    private final WeldParameter<T, X> parameter;
    private final boolean delegate;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/injection/ProxyClassConstructorInjectionPointWrapper.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/injection/ProxyClassConstructorInjectionPointWrapper.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/injection/ProxyClassConstructorInjectionPointWrapper.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -33,6 +33,8 @@
  *
  * @author <a href="mailto:mariusb at redhat.com">Marius Bogoevici</a>
  */
+// TODO Needs equals/hashcode
+// TODO Would be clearer to make this either a wrapper or not
 public class ProxyClassConstructorInjectionPointWrapper<T> extends ConstructorInjectionPoint<T>
 {
    private ConstructorInjectionPoint<T> originalConstructorInjectionPoint;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/AnnotatedTypes.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/AnnotatedTypes.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/AnnotatedTypes.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -39,6 +39,8 @@
 import javax.enterprise.inject.spi.AnnotatedParameter;
 import javax.enterprise.inject.spi.AnnotatedType;
 
+import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+
 /**
  * Class that can take an AnnotatedType and return a unique string
  * representation of that type
@@ -52,6 +54,7 @@
     * Does the first stage of comparing AnnoatedCallables, however it cannot
     * compare the method parameters
     */
+   @SuppressWarnings("SE_COMPARATOR_SHOULD_BE_SERIALIZABLE")
    private static class AnnotatedCallableComparator<T> implements Comparator<AnnotatedCallable<? super T>>
    {
 
@@ -74,6 +77,7 @@
 
    }
 
+   @SuppressWarnings("SE_COMPARATOR_SHOULD_BE_SERIALIZABLE")
    private static class AnnotatedMethodComparator<T> implements Comparator<AnnotatedMethod<? super T>>
    {
 
@@ -106,6 +110,7 @@
 
    }
 
+   @SuppressWarnings("SE_COMPARATOR_SHOULD_BE_SERIALIZABLE")
    private static class AnnotatedConstructorComparator<T> implements Comparator<AnnotatedConstructor<? super T>>
    {
 
@@ -138,6 +143,7 @@
 
    }
 
+   @SuppressWarnings("SE_COMPARATOR_SHOULD_BE_SERIALIZABLE")
    private static class AnnotatedFieldComparator<T> implements Comparator<AnnotatedField<? super T>>
    {
 
@@ -157,6 +163,7 @@
 
    }
 
+   @SuppressWarnings("SE_COMPARATOR_SHOULD_BE_SERIALIZABLE")
    private static class AnnotationComparator implements Comparator<Annotation>
    {
 
@@ -168,6 +175,7 @@
       }
    }
 
+   @SuppressWarnings("SE_COMPARATOR_SHOULD_BE_SERIALIZABLE")
    private static class MethodComparator implements Comparator<Method>
    {
       

Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/collections/ImmutableArraySet.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/collections/ImmutableArraySet.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/collections/ImmutableArraySet.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -241,7 +241,7 @@
    @Override
    public int hashCode()
    {
-      return elements.hashCode();
+      return Arrays.hashCode(elements);
    }
 
    @Override

Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/instantiation/ReflectionFactoryInstantiator.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/instantiation/ReflectionFactoryInstantiator.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/instantiation/ReflectionFactoryInstantiator.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -16,8 +16,9 @@
  */
 package org.jboss.weld.util.reflection.instantiation;
 
+import static org.jboss.weld.logging.messages.ReflectionMessage.REFLECTIONFACTORY_INSTANTIATION_FAILED;
+
 import java.lang.reflect.Constructor;
-import static org.jboss.weld.logging.messages.ReflectionMessage.REFLECTIONFACTORY_INSTANTIATION_FAILED;
 import java.lang.reflect.Method;
 
 import org.jboss.weld.exceptions.WeldException;
@@ -46,6 +47,7 @@
       }
       catch (Exception e)
       {
+         // TODO Catch explicit subclasses
          // OK to fail
       }
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/instantiation/UnsafeInstantiator.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/instantiation/UnsafeInstantiator.java	2010-06-03 12:29:11 UTC (rev 6394)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/instantiation/UnsafeInstantiator.java	2010-06-03 13:44:32 UTC (rev 6395)
@@ -16,15 +16,15 @@
  */
 package org.jboss.weld.util.reflection.instantiation;
 
+import static org.jboss.weld.logging.messages.ReflectionMessage.UNSAFE_INSTANTIATION_FAILED;
+
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 
 import org.jboss.weld.exceptions.WeldException;
 import org.jboss.weld.util.reflection.SecureReflections;
 
-import static org.jboss.weld.logging.messages.ReflectionMessage.UNSAFE_INSTANTIATION_FAILED;
 
-
 /**
  * An instantiator for sun.misc.Unsafe
  * 
@@ -50,6 +50,7 @@
       }
       catch (Exception e)
       {
+         // TODO Catch explicit subclasses
          // OK to fail
       }
    }



More information about the weld-commits mailing list