openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1129984 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractAnnotated.java
Date Wed, 01 Jun 2011 02:03:46 GMT
Author: djencks
Date: Wed Jun  1 02:03:46 2011
New Revision: 1129984

URL: http://svn.apache.org/viewvc?rev=1129984&view=rev
Log:
a little input validation

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractAnnotated.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractAnnotated.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractAnnotated.java?rev=1129984&r1=1129983&r2=1129984&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractAnnotated.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractAnnotated.java
Wed Jun  1 02:03:46 2011
@@ -47,7 +47,7 @@ abstract class AbstractAnnotated impleme
     /**Set of annotations*/
     private Set<Annotation> annotations = new HashSet<Annotation>();
 
-    private WebBeansContext webBeansContext;
+    private final WebBeansContext webBeansContext;
     
     /**
      * Createa a new annotated element.
@@ -57,6 +57,14 @@ abstract class AbstractAnnotated impleme
      */
     protected AbstractAnnotated(WebBeansContext webBeansContext, Type baseType)
     {
+        if (webBeansContext == null)
+        {
+            throw new NullPointerException("no WebBeansContext");
+        }
+        if (baseType == null)
+        {
+            throw new NullPointerException("no base type");
+        }
         this.baseType = baseType;
         this.webBeansContext = webBeansContext;
     }



Mime
View raw message