Author: maartenc
Date: Tue Feb 14 23:18:51 2012
New Revision: 1244267
URL: http://svn.apache.org/viewvc?rev=1244267&view=rev
Log:
FIX: NullPointerException when providing empty password to <credentials>
(IVY-1335)
Modified:
ant/ivy/core/trunk/CHANGES.txt
ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/IvyAuthenticator.java
Modified: ant/ivy/core/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=1244267&r1=1244266&r2=1244267&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Tue Feb 14 23:18:51 2012
@@ -139,6 +139,7 @@ for detailed view of each issue, please
- IMPROVEMENT: ivy:retrieve can now convert 'dotted'-organisation names into a
directory tree.
- IMPROVEMENT: ivy:retrieve now accepts a nested mapper type.
+- FIX: NullPointerException when providing empty password to <credentials>
(IVY-1335)
- FIX: [originalname] not expanded for source and javadoc types during publish
in ivy:install (IVY-1324)
- FIX: cannot resolve from repositories that return HTTP 204 in response to an
HTTP HEAD request (IVY-1328)
- FIX: extra attributes lost from info when ivy file is merged with parent
(IVY-1206)
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/IvyAuthenticator.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/IvyAuthenticator.java?rev=1244267&r1=1244266&r2=1244267&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/IvyAuthenticator.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/IvyAuthenticator.java
Tue Feb 14 23:18:51 2012
@@ -94,7 +94,8 @@ public final class IvyAuthenticator exte
+ Credentials.buildKey(getRequestingPrompt(),
getRequestingHost()) + "' c='" + c
+ "'");
if (c != null) {
- result = new PasswordAuthentication(c.getUserName(),
c.getPasswd().toCharArray());
+ final String password = c.getPasswd() == null ? "" :
c.getPasswd();
+ result = new PasswordAuthentication(c.getUserName(),
password.toCharArray());
}
}