myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1098567 - /myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
Date Mon, 02 May 2011 13:50:59 GMT
Author: lu4242
Date: Mon May  2 13:50:59 2011
New Revision: 1098567

URL: http://svn.apache.org/viewvc?rev=1098567&view=rev
Log:
add some null checks to comply with the spec

Modified:
    myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java

Modified: myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java?rev=1098567&r1=1098566&r2=1098567&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
(original)
+++ myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
Mon May  2 13:50:59 2011
@@ -618,6 +618,8 @@ public class FaceletViewDeclarationLangu
     {
         BeanInfo beanInfo = null;
         
+        checkNull(context, "context");
+        
         try 
         {
             Facelet compositeComponentFacelet;
@@ -756,6 +758,10 @@ public class FaceletViewDeclarationLangu
     public void retargetAttachedObjects(FacesContext context,
             UIComponent topLevelComponent, List<AttachedObjectHandler> handlerList)
     {
+        checkNull(context, "context");
+        checkNull(topLevelComponent, "topLevelComponent");
+        checkNull(handlerList, "handlerList");
+        
         BeanInfo compositeComponentMetadata = (BeanInfo) topLevelComponent.getAttributes().get(UIComponent.BEANINFO_KEY);
         
         if (compositeComponentMetadata == null)
@@ -884,6 +890,8 @@ public class FaceletViewDeclarationLangu
     public void retargetMethodExpressions(FacesContext context,
             UIComponent topLevelComponent)
     {
+        checkNull(context, "context");
+        
         BeanInfo compositeComponentMetadata = (BeanInfo) topLevelComponent.getAttributes().get(UIComponent.BEANINFO_KEY);
         
         if (compositeComponentMetadata == null)
@@ -1369,6 +1377,8 @@ public class FaceletViewDeclarationLangu
     @Override
     public Resource getScriptComponentResource(FacesContext context, Resource componentResource)
     {
+        checkNull(context, "context");
+        checkNull(componentResource, "componentResource");
         // TODO Auto-generated method stub
         return null;
     }
@@ -1395,6 +1405,7 @@ public class FaceletViewDeclarationLangu
     @Override
     public ViewMetadata getViewMetadata(FacesContext context, String viewId)
     {
+        checkNull(viewId, "viewId");
         return new FaceletViewMetadata(viewId);
     }
 
@@ -1539,6 +1550,7 @@ public class FaceletViewDeclarationLangu
     @Override
     public UIViewRoot createView(FacesContext context, String viewId)
     {
+        checkNull(viewId, "viewId");
         // we have to check for a possible debug request
         if (UIDebug.debugRequest(context))
         {
@@ -1560,6 +1572,7 @@ public class FaceletViewDeclarationLangu
     @Override
     public UIViewRoot restoreView(FacesContext context, String viewId)
     {
+        checkNull(viewId, "viewId");
         // Currently there is no way, in which UIDebug.debugRequest(context)
         // can create debug information and return true at this point,
         // because this method is only accessed if the current request



Mime
View raw message