mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-15 18:33:41 +00:00
8282632: Cleanup unnecessary calls to Throwable.initCause() in java.security.jgss
Reviewed-by: mullan, rhalade
This commit is contained in:
parent
ccad39237a
commit
50eb915a74
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2022, 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
|
||||
@ -127,9 +127,7 @@ public class NegotiatorImpl extends Negotiator {
|
||||
"fallback to other scheme if allowed. Reason:");
|
||||
e.printStackTrace();
|
||||
}
|
||||
IOException ioe = new IOException("Negotiate support not initiated");
|
||||
ioe.initCause(e);
|
||||
throw ioe;
|
||||
throw new IOException("Negotiate support not initiated", e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -157,9 +155,7 @@ public class NegotiatorImpl extends Negotiator {
|
||||
System.out.println("Negotiate support cannot continue. Reason:");
|
||||
e.printStackTrace();
|
||||
}
|
||||
IOException ioe = new IOException("Negotiate support cannot continue");
|
||||
ioe.initCause(e);
|
||||
throw ioe;
|
||||
throw new IOException("Negotiate support cannot continue", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2022, 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
|
||||
@ -234,10 +234,8 @@ public class KRBError implements java.io.Serializable {
|
||||
System.out.println("Unable to parse eData field of KRB-ERROR:\n" +
|
||||
new sun.security.util.HexDumpEncoder().encodeBuffer(data));
|
||||
}
|
||||
IOException ioe = new IOException(
|
||||
"Unable to parse eData field of KRB-ERROR");
|
||||
ioe.initCause(e);
|
||||
throw ioe;
|
||||
throw new IOException(
|
||||
"Unable to parse eData field of KRB-ERROR", e);
|
||||
}
|
||||
} else {
|
||||
if (DEBUG) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2022, 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
|
||||
@ -29,7 +29,6 @@ import java.security.*;
|
||||
import javax.crypto.*;
|
||||
import javax.crypto.spec.*;
|
||||
import java.util.*;
|
||||
import sun.security.krb5.EncryptedData;
|
||||
import sun.security.krb5.KrbCryptoException;
|
||||
import sun.security.krb5.Confounder;
|
||||
import sun.security.krb5.internal.crypto.KeyUsage;
|
||||
@ -159,10 +158,7 @@ public class ArcFourCrypto extends DkCrypto {
|
||||
System.arraycopy(ss, 0, new_ss, 0, ss.length);
|
||||
Ksign = getHmac(baseKey, new_ss);
|
||||
} catch (Exception e) {
|
||||
GeneralSecurityException gse =
|
||||
new GeneralSecurityException("Calculate Checkum Failed!");
|
||||
gse.initCause(e);
|
||||
throw gse;
|
||||
throw new GeneralSecurityException("Calculate Checksum Failed!", e);
|
||||
}
|
||||
|
||||
// get the salt using key usage
|
||||
@ -173,10 +169,7 @@ public class ArcFourCrypto extends DkCrypto {
|
||||
try {
|
||||
messageDigest = MessageDigest.getInstance("MD5");
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
GeneralSecurityException gse =
|
||||
new GeneralSecurityException("Calculate Checkum Failed!");
|
||||
gse.initCause(e);
|
||||
throw gse;
|
||||
throw new GeneralSecurityException("Calculate Checksum Failed!", e);
|
||||
}
|
||||
messageDigest.update(salt);
|
||||
messageDigest.update(input, start, len);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user