deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject deltaspike git commit: DELTASPIKE-1135 support for type-safe messages during the startup
Date Fri, 29 Apr 2016 07:11:54 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master b28309f01 -> 53e54564c


DELTASPIKE-1135 support for type-safe messages during the startup


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/53e54564
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/53e54564
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/53e54564

Branch: refs/heads/master
Commit: 53e54564c6de31376a88e22520e63a1d83b8adc5
Parents: b28309f
Author: gpetracek <gpetracek@apache.org>
Authored: Wed Apr 27 08:12:03 2016 +0200
Committer: gpetracek <gpetracek@apache.org>
Committed: Fri Apr 29 09:10:57 2016 +0200

----------------------------------------------------------------------
 .../apache/deltaspike/jsf/impl/message/JsfAwareLocaleResolver.java | 2 +-
 .../org/apache/deltaspike/jsf/impl/message/JsfMessageResolver.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/53e54564/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/message/JsfAwareLocaleResolver.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/message/JsfAwareLocaleResolver.java
b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/message/JsfAwareLocaleResolver.java
index 6f9b7ca..ec5033a 100644
--- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/message/JsfAwareLocaleResolver.java
+++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/message/JsfAwareLocaleResolver.java
@@ -37,7 +37,7 @@ public class JsfAwareLocaleResolver extends DefaultLocaleResolver
     public Locale getLocale()
     {
         FacesContext facesContext = FacesContext.getCurrentInstance();
-        if (facesContext != null)
+        if (facesContext != null && facesContext.getCurrentPhaseId() != null)
         {
             UIViewRoot viewRoot = facesContext.getViewRoot();
             Locale result = null;

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/53e54564/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/message/JsfMessageResolver.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/message/JsfMessageResolver.java
b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/message/JsfMessageResolver.java
index 9f1a20b..13f6959 100644
--- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/message/JsfMessageResolver.java
+++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/message/JsfMessageResolver.java
@@ -37,7 +37,7 @@ public class JsfMessageResolver extends DefaultMessageResolver
 
         FacesContext facesContext = FacesContext.getCurrentInstance();
 
-        if (facesContext == null)
+        if (facesContext == null || facesContext.getCurrentPhaseId() == null)
         {
             return result;
         }


Mime
View raw message