jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java
changeset 23782 953bfc3fbe31
parent 22679 d785acd84a14
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java	Wed Jul 05 19:34:04 2017 +0200
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java	Mon Mar 31 10:43:20 2014 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -621,7 +621,8 @@
 
             String plain = user + ":";
             byte[] nameBytes = plain.getBytes();
-            byte[] passwdBytes = password.getBytes();
+            byte[] passwdBytes = (password == null ? new byte[0] : password
+                    .getBytes());
 
             // concatenate user name and password bytes and encode them
             byte[] concat = new byte[nameBytes.length + passwdBytes.length];