[seam-commits] Seam SVN: r12816 - modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed May 26 14:30:47 EDT 2010


Author: lincolnthree
Date: 2010-05-26 14:30:46 -0400 (Wed, 26 May 2010)
New Revision: 12816

Modified:
   modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/SystemEventBridge.java
Log:
Fixed potential for null values in AnnotationLiteral instances, which should never have null member variables.

Modified: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/SystemEventBridge.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/SystemEventBridge.java	2010-05-26 14:49:09 UTC (rev 12815)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/SystemEventBridge.java	2010-05-26 18:30:46 UTC (rev 12816)
@@ -80,7 +80,7 @@
       beanManager.fireEvent(payload, qualifiers);
    }
 
-   private Annotation[] getQualifiers(SystemEvent e)
+   private Annotation[] getQualifiers(final SystemEvent e)
    {
       if (isViewEvent(e))
       {
@@ -98,38 +98,47 @@
       }
    }
 
-   private boolean isViewEvent(SystemEvent e)
+   private boolean isViewEvent(final SystemEvent e)
    {
       return (e instanceof PreRenderViewEvent) || (e instanceof PostConstructViewMapEvent) || (e instanceof PreDestroyViewMapEvent);
    }
 
    private class ComponentLiteral extends AnnotationLiteral<Component> implements Component
    {
-      private final String value;
+      private static final long serialVersionUID = -180390717920002323L;
 
+      private String value = "";
+
       public String value()
       {
          return value;
       }
 
-      public ComponentLiteral(String value)
+      public ComponentLiteral(final String value)
       {
-         this.value = value;
+         if (value != null)
+         {
+            this.value = value;
+         }
       }
    }
 
    private class ViewLiteral extends AnnotationLiteral<View> implements View
    {
-      private final String value;
+      private static final long serialVersionUID = -9101103836360031181L;
+      private String value = "";
 
       public String value()
       {
          return value;
       }
 
-      public ViewLiteral(String value)
+      public ViewLiteral(final String value)
       {
-         this.value = value;
+         if (value != null)
+         {
+            this.value = value;
+         }
       }
    }
 



More information about the seam-commits mailing list