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

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed May 26 18:03:33 EDT 2010


Author: lincolnthree
Date: 2010-05-26 18:03:32 -0400 (Wed, 26 May 2010)
New Revision: 12829

Modified:
   modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/event/ServletEventBridge.java
Log:
Fixed potential NPE due to improper construction of AnnotationLiterals

Modified: modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/event/ServletEventBridge.java
===================================================================
--- modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/event/ServletEventBridge.java	2010-05-26 22:02:24 UTC (rev 12828)
+++ modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/event/ServletEventBridge.java	2010-05-26 22:03:32 UTC (rev 12829)
@@ -309,8 +309,10 @@
 
    private class AttributeLiteral extends AnnotationLiteral<Attribute> implements Attribute
    {
-      private final String value;
+      private static final long serialVersionUID = -7137081215123043985L;
 
+      private String value = "";
+
       public String value()
       {
          return value;
@@ -318,14 +320,19 @@
 
       public AttributeLiteral(final String value)
       {
-         this.value = value;
+         if (value != null)
+         {
+            this.value = value;
+         }
       }
    }
 
    private class ValueLiteral extends AnnotationLiteral<Value> implements Value
    {
-      private final String value;
+      private static final long serialVersionUID = 167018557217189041L;
 
+      private String value = "";
+
       public String value()
       {
          return value;
@@ -333,7 +340,10 @@
 
       public ValueLiteral(final String value)
       {
-         this.value = value;
+         if (value != null)
+         {
+            this.value = value;
+         }
       }
    }
 }



More information about the seam-commits mailing list