myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1516703 - in /myfaces/core/trunk: api/src/main/java/javax/faces/component/ api/src/main/java/javax/faces/event/ impl/src/main/java/org/apache/myfaces/application/
Date Fri, 23 Aug 2013 04:43:47 GMT
Author: lu4242
Date: Fri Aug 23 04:43:47 2013
New Revision: 1516703

URL: http://svn.apache.org/r1516703
Log:
add NullPointerException check

Modified:
    myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java
    myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java
    myfaces/core/trunk/api/src/main/java/javax/faces/event/FacesEvent.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java?rev=1516703&r1=1516702&r2=1516703&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java Fri Aug 23 04:43:47
2013
@@ -1571,6 +1571,10 @@ public class UIData extends UIComponentB
     @Override
     public void queueEvent(FacesEvent event)
     {
+        if (event == null)
+        {
+            throw new NullPointerException("event");
+        }
         super.queueEvent(new FacesEventWrapper(event, getRowIndex(), this));
     }
 

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java?rev=1516703&r1=1516702&r2=1516703&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java Fri Aug 23 04:43:47
2013
@@ -387,6 +387,10 @@ public class UIInput extends UIOutput im
 
     public void updateModel(FacesContext context)
     {
+        if (context == null)
+        {
+            throw new NullPointerException();
+        }
         if (!isValid())
         {
             return;

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/event/FacesEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/event/FacesEvent.java?rev=1516703&r1=1516702&r2=1516703&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/event/FacesEvent.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/event/FacesEvent.java Fri Aug 23 04:43:47
2013
@@ -65,6 +65,10 @@ public abstract class FacesEvent extends
 
     public void setPhaseId(PhaseId phaseId)
     {
+        if (phaseId == null)
+        {
+            throw new IllegalArgumentException("phaseId");
+        }
         _phaseId = phaseId;
     }
 }

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java?rev=1516703&r1=1516702&r2=1516703&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java
Fri Aug 23 04:43:47 2013
@@ -262,12 +262,16 @@ public class ViewHandlerImpl extends Vie
     @Override
     public String getActionURL(FacesContext context, String viewId)
     {
+        checkNull(context, "facesContext");
+        checkNull(viewId, "viewId");
         return getViewHandlerSupport(context).calculateActionURL(context, viewId);
     }
 
     @Override
     public String getResourceURL(FacesContext facesContext, String path)
     {
+        checkNull(facesContext, "facesContext");
+        checkNull(path, "path");
         if (path.length() > 0 && path.charAt(0) == '/')
         {
             return facesContext.getExternalContext().getRequestContextPath() + path;



Mime
View raw message