You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/12/16 17:44:06 UTC
svn commit: r891303 - in /cxf/branches/2.1.x-fixes: ./
rt/transports/http/src/main/java/org/apache/cxf/transport/http/CXFAuthenticator.java
Author: dkulp
Date: Wed Dec 16 16:44:06 2009
New Revision: 891303
URL: http://svn.apache.org/viewvc?rev=891303&view=rev
Log:
Merged revisions 891302 via svnmerge from
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes
................
r891302 | dkulp | 2009-12-16 11:42:43 -0500 (Wed, 16 Dec 2009) | 9 lines
Merged revisions 891301 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r891301 | dkulp | 2009-12-16 11:41:38 -0500 (Wed, 16 Dec 2009) | 1 line
[CXF-2584] NPE guards for CXFAuthenticator
........
................
Modified:
cxf/branches/2.1.x-fixes/ (props changed)
cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/CXFAuthenticator.java
Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Wed Dec 16 16:44:06 2009
@@ -0,0 +1,2 @@
+/cxf/branches/2.2.x-fixes:891302
+/cxf/trunk:891301
Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/CXFAuthenticator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/CXFAuthenticator.java?rev=891303&r1=891302&r2=891303&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/CXFAuthenticator.java (original)
+++ cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/CXFAuthenticator.java Wed Dec 16 16:44:06 2009
@@ -87,15 +87,18 @@
HTTPConduit httpConduit = (HTTPConduit)conduit;
if (getRequestorType() == RequestorType.PROXY
&& httpConduit.getProxyAuthorization() != null) {
-
- auth = new PasswordAuthentication(httpConduit.getProxyAuthorization().getUserName(),
- httpConduit.getProxyAuthorization()
- .getPassword().toCharArray());
+ String un = httpConduit.getProxyAuthorization().getUserName();
+ String pwd = httpConduit.getProxyAuthorization().getPassword();
+ if (un != null && pwd != null) {
+ auth = new PasswordAuthentication(un, pwd.toCharArray());
+ }
} else if (getRequestorType() == RequestorType.SERVER
&& httpConduit.getAuthorization() != null) {
- auth = new PasswordAuthentication(httpConduit.getAuthorization().getUserName(),
- httpConduit.getAuthorization()
- .getPassword().toCharArray());
+ String un = httpConduit.getAuthorization().getUserName();
+ String pwd = httpConduit.getAuthorization().getPassword();
+ if (un != null && pwd != null) {
+ auth = new PasswordAuthentication(un, pwd.toCharArray());
+ }
}
}
}