myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1523389 - in /myfaces/core/trunk/api/src: main/java/javax/faces/application/FacesMessage.java test/java/javax/faces/application/FacesMessageTest.java
Date Sun, 15 Sep 2013 02:33:06 GMT
Author: lu4242
Date: Sun Sep 15 02:33:06 2013
New Revision: 1523389

URL: http://svn.apache.org/r1523389
Log:
MYFACES-3768 FacesMessage Severity ordinal values are not consistent with Mojarra RI 

Modified:
    myfaces/core/trunk/api/src/main/java/javax/faces/application/FacesMessage.java
    myfaces/core/trunk/api/src/test/java/javax/faces/application/FacesMessageTest.java

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/application/FacesMessage.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/application/FacesMessage.java?rev=1523389&r1=1523388&r2=1523389&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/application/FacesMessage.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/application/FacesMessage.java Sun Sep
15 02:33:06 2013
@@ -259,7 +259,7 @@ public class FacesMessage implements Ser
 
         // FacesMessage.Severity is not Serializable, read ordinal and get related FacesMessage.Severity
         int severityOrdinal = in.readInt();
-        _severity = (Severity) VALUES.get(severityOrdinal - 1);
+        _severity = (Severity) VALUES.get(severityOrdinal);
     }
 
     public static class Severity implements Comparable

Modified: myfaces/core/trunk/api/src/test/java/javax/faces/application/FacesMessageTest.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/test/java/javax/faces/application/FacesMessageTest.java?rev=1523389&r1=1523388&r2=1523389&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/test/java/javax/faces/application/FacesMessageTest.java (original)
+++ myfaces/core/trunk/api/src/test/java/javax/faces/application/FacesMessageTest.java Sun
Sep 15 02:33:06 2013
@@ -197,7 +197,7 @@ public class FacesMessageTest extends Te
         for (int i = 0, sz = FacesMessage.VALUES.size(); i < sz; i++)
         {
             FacesMessage.Severity severity = (Severity) FacesMessage.VALUES.get(i);
-            assertEquals(i + 1, severity.getOrdinal());
+            assertEquals(i, severity.getOrdinal());
         }
     }
 



Mime
View raw message