equal
deleted
inserted
replaced
1288 */ |
1288 */ |
1289 private static final class X509IssuerSerial |
1289 private static final class X509IssuerSerial |
1290 implements Comparable<X509IssuerSerial> { |
1290 implements Comparable<X509IssuerSerial> { |
1291 final X500Principal issuer; |
1291 final X500Principal issuer; |
1292 final BigInteger serial; |
1292 final BigInteger serial; |
1293 volatile int hashcode = 0; |
1293 volatile int hashcode; |
1294 |
1294 |
1295 /** |
1295 /** |
1296 * Create an X509IssuerSerial. |
1296 * Create an X509IssuerSerial. |
1297 * |
1297 * |
1298 * @param issuer the issuer DN |
1298 * @param issuer the issuer DN |
1356 * Returns a hash code value for this X509IssuerSerial. |
1356 * Returns a hash code value for this X509IssuerSerial. |
1357 * |
1357 * |
1358 * @return the hash code value |
1358 * @return the hash code value |
1359 */ |
1359 */ |
1360 public int hashCode() { |
1360 public int hashCode() { |
1361 if (hashcode == 0) { |
1361 int h = hashcode; |
1362 int result = 17; |
1362 if (h == 0) { |
1363 result = 37*result + issuer.hashCode(); |
1363 h = 17; |
1364 result = 37*result + serial.hashCode(); |
1364 h = 37*h + issuer.hashCode(); |
1365 hashcode = result; |
1365 h = 37*h + serial.hashCode(); |
|
1366 if (h != 0) { |
|
1367 hashcode = h; |
|
1368 } |
1366 } |
1369 } |
1367 return hashcode; |
1370 return h; |
1368 } |
1371 } |
1369 |
1372 |
1370 @Override |
1373 @Override |
1371 public int compareTo(X509IssuerSerial another) { |
1374 public int compareTo(X509IssuerSerial another) { |
1372 int cissuer = issuer.toString() |
1375 int cissuer = issuer.toString() |