Browse Source

[findbugs] Fix illegal format specifier

For integral arguments the precision is not applicable, would cause a
runtime exception when executed, see
http://download.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html#syntax

Change-Id: I4738c64c1153a8d4ef5430e15d0fe54f0a37949f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-0.10
Matthias Sohn 14 years ago
parent
commit
8067197049
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java

2
org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java

@ -203,7 +203,7 @@ abstract class HttpAuthMethod {
final String expect; final String expect;
if ("auth".equals(qop)) { if ("auth".equals(qop)) {
final String c = p.get("cnonce"); final String c = p.get("cnonce");
final String nc = String.format("%8.8x", ++requestCount); final String nc = String.format("%08x", ++requestCount);
p.put("nc", nc); p.put("nc", nc);
expect = KD(H(A1), nonce + ":" + nc + ":" + c + ":" + qop + ":" expect = KD(H(A1), nonce + ":" + nc + ":" + c + ":" + qop + ":"
+ H(A2)); + H(A2));

Loading…
Cancel
Save