myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grantsm...@apache.org
Subject svn commit: r209348 - in /myfaces/api/trunk/src/java/javax/faces/application: FacesMessage.java ViewHandler.java
Date Tue, 05 Jul 2005 23:17:21 GMT
Author: grantsmith
Date: Tue Jul  5 16:17:19 2005
New Revision: 209348

URL: http://svn.apache.org/viewcvs?rev=209348&view=rev
Log:
MYFACES-303:  The spec requires that FacesMessage.getSeverity() default to INFO.  Furthermore,
a null severity passed to the constructor or setSeverity() should result in a NullPointerException.


Modified:
    myfaces/api/trunk/src/java/javax/faces/application/FacesMessage.java
    myfaces/api/trunk/src/java/javax/faces/application/ViewHandler.java

Modified: myfaces/api/trunk/src/java/javax/faces/application/FacesMessage.java
URL: http://svn.apache.org/viewcvs/myfaces/api/trunk/src/java/javax/faces/application/FacesMessage.java?rev=209348&r1=209347&r2=209348&view=diff
==============================================================================
--- myfaces/api/trunk/src/java/javax/faces/application/FacesMessage.java (original)
+++ myfaces/api/trunk/src/java/javax/faces/application/FacesMessage.java Tue Jul  5 16:17:19
2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 2004 The Apache Software Foundation.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -50,23 +50,27 @@
 
     public FacesMessage()
     {
+        _severity = SEVERITY_INFO;
     }
 
     public FacesMessage(String summary)
     {
         _summary = summary;
+        _severity = SEVERITY_INFO;
     }
 
     public FacesMessage(String summary, String detail)
     {
         _summary = summary;
         _detail = detail;
+        _severity = SEVERITY_INFO;
     }
 
     public FacesMessage(FacesMessage.Severity severity,
                         String summary,
                         String detail)
     {
+        if(severity == null) throw new NullPointerException("severity");
         _severity = severity;
         _summary = summary;
         _detail = detail;
@@ -79,6 +83,7 @@
 
     public void setSeverity(FacesMessage.Severity severity)
     {
+        if(severity == null) throw new NullPointerException("severity");
         _severity = severity;
     }
 

Modified: myfaces/api/trunk/src/java/javax/faces/application/ViewHandler.java
URL: http://svn.apache.org/viewcvs/myfaces/api/trunk/src/java/javax/faces/application/ViewHandler.java?rev=209348&r1=209347&r2=209348&view=diff
==============================================================================
--- myfaces/api/trunk/src/java/javax/faces/application/ViewHandler.java (original)
+++ myfaces/api/trunk/src/java/javax/faces/application/ViewHandler.java Tue Jul  5 16:17:19
2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 2004 The Apache Software Foundation.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,15 +36,15 @@
                                                                 String viewId);
 
     public abstract String getActionURL(javax.faces.context.FacesContext context,
-                                                  String viewId);
+                                        String viewId);
 
     public abstract String getResourceURL(javax.faces.context.FacesContext context,
-                                                    String path);
+                                          String path);
 
     public abstract void renderView(javax.faces.context.FacesContext context,
                                     javax.faces.component.UIViewRoot viewToRender)
             throws java.io.IOException,
-                   FacesException;
+            FacesException;
 
     public abstract javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext
context,
                                                                  String viewId);



Mime
View raw message