myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1794900 - /myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
Date Thu, 11 May 2017 22:44:41 GMT
Author: lu4242
Date: Thu May 11 22:44:41 2017
New Revision: 1794900

URL: http://svn.apache.org/viewvc?rev=1794900&view=rev
Log:
small fix on encodeWebsocketURL (nullpointerexception on facesContext)

Modified:
    myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java

Modified: myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java?rev=1794900&r1=1794899&r2=1794900&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
(original)
+++ myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
Thu May 11 22:44:41 2017
@@ -392,14 +392,15 @@ public final class ServletExternalContex
     @Override
     public String encodeWebsocketURL(String baseUrl)
     {
+        FacesContext facesContext = getCurrentFacesContext();
         Integer port = WebConfigParamUtils.getIntegerInitParameter(
-                _currentFacesContext.getExternalContext(), ViewHandler.WEBSOCKET_PORT);
+                getCurrentFacesContext().getExternalContext(), ViewHandler.WEBSOCKET_PORT);
         port = (port == 0) ? null : port;
         if (port != null && 
-            !port.equals(_currentFacesContext.getExternalContext().getRequestServerPort()))
+            !port.equals(facesContext.getExternalContext().getRequestServerPort()))
         {
-            String scheme = _currentFacesContext.getExternalContext().getRequestScheme();
-            String serverName = _currentFacesContext.getExternalContext().getRequestServerName();
+            String scheme = facesContext.getExternalContext().getRequestScheme();
+            String serverName = facesContext.getExternalContext().getRequestServerName();
             String url;
             try
             {



Mime
View raw message