Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, 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
Expand Down Expand Up @@ -37,6 +37,7 @@
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.OutputStream;
import java.io.Serial;
import java.security.*;
import javax.security.auth.Subject;
import javax.security.auth.kerberos.KerberosCredMessage;
Expand Down Expand Up @@ -1332,6 +1333,7 @@ GSSCaller getCaller() {
* The session key returned by inquireSecContext(KRB5_INQ_SSPI_SESSION_KEY)
*/
static class KerberosSessionKey implements Key {
@Serial
private static final long serialVersionUID = 699307378954123869L;

@SuppressWarnings("serial") // Not statically typed as Serializable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@

package sun.security.krb5;

import java.io.Serial;

public class Asn1Exception extends KrbException {

@Serial
private static final long serialVersionUID = 8291288984575084132L;

public Asn1Exception(int i) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@

package sun.security.krb5;

import java.io.Serial;

/**
* KrbCryptoException is a wrapper exception for exceptions thrown by JCE.
*
* @author Yanni Zhang
*/
public class KrbCryptoException extends KrbException {

@Serial
private static final long serialVersionUID = -1657367919979982250L;

public KrbCryptoException(String s) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, 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
Expand Down Expand Up @@ -31,13 +31,15 @@

package sun.security.krb5;

import java.io.Serial;
import java.util.Objects;

import sun.security.krb5.internal.Krb5;
import sun.security.krb5.internal.KRBError;

public class KrbException extends Exception {

@Serial
private static final long serialVersionUID = -4993302876451928596L;

private int returnCode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, 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
Expand Down Expand Up @@ -31,8 +31,11 @@

package sun.security.krb5;

import java.io.Serial;

public class RealmException extends KrbException {

@Serial
private static final long serialVersionUID = -9100385213693792864L;

public RealmException(int i) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, 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
Expand Down Expand Up @@ -40,6 +40,7 @@
import sun.security.util.*;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serial;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -85,7 +86,8 @@
*/

public class KRBError implements java.io.Serializable {
static final long serialVersionUID = 3643809337475284503L;
@Serial
private static final long serialVersionUID = 3643809337475284503L;

private transient int pvno;
private transient int msgType;
Expand Down Expand Up @@ -123,6 +125,7 @@ private void readObject(ObjectInputStream is)
}
}

@Serial
private void writeObject(ObjectOutputStream os)
throws IOException {
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, 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
Expand Down Expand Up @@ -31,8 +31,11 @@

package sun.security.krb5.internal;

import java.io.Serial;

public class KdcErrException extends sun.security.krb5.KrbException {

@Serial
private static final long serialVersionUID = -8788186031117310306L;

public KdcErrException(int i) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, 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
Expand Down Expand Up @@ -31,8 +31,11 @@

package sun.security.krb5.internal;

import java.io.Serial;

public class KrbApErrException extends sun.security.krb5.KrbException {

@Serial
private static final long serialVersionUID = 7545264413323118315L;

public KrbApErrException(int i) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@

package sun.security.krb5.internal;

import java.io.Serial;

public class KrbErrException extends sun.security.krb5.KrbException {

@Serial
private static final long serialVersionUID = 2186533836785448317L;

public KrbErrException(int i) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static void main(String[] args) {

private static class ExitException extends RuntimeException {
@java.io.Serial
static final long serialVersionUID = 0L;
private static final long serialVersionUID = 0L;
private final int errorCode;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that private will not affect the behavior of the code.

public ExitException(int errorCode) {
this.errorCode = errorCode;
Expand Down