Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilderException.java
41161 views
1
/*
2
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation. Oracle designates this
8
* particular file as subject to the "Classpath" exception as provided
9
* by Oracle in the LICENSE file that accompanied this code.
10
*
11
* This code is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
* version 2 for more details (a copy is included in the LICENSE file that
15
* accompanied this code).
16
*
17
* You should have received a copy of the GNU General Public License version
18
* 2 along with this work; if not, write to the Free Software Foundation,
19
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
*
21
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
* or visit www.oracle.com if you need additional information or have any
23
* questions.
24
*/
25
26
package sun.security.provider.certpath;
27
28
import java.util.List;
29
import java.security.cert.CertPathBuilderException;
30
31
/**
32
* This is a subclass of the generic <code>CertPathBuilderException</code>.
33
* It contains an adjacency list with information regarding the unsuccessful
34
* paths that the SunCertPathBuilder tried.
35
*
36
* @since 1.4
37
* @author Sean Mullan
38
* @see CertPathBuilderException
39
*/
40
public class SunCertPathBuilderException extends CertPathBuilderException {
41
42
@java.io.Serial
43
private static final long serialVersionUID = -7814288414129264709L;
44
45
/**
46
* @serial
47
*/
48
private transient AdjacencyList adjList;
49
50
/**
51
* Constructs a <code>SunCertPathBuilderException</code> with
52
* <code>null</code> as its detail message.
53
*/
54
public SunCertPathBuilderException() {
55
super();
56
}
57
58
/**
59
* Constructs a <code>SunCertPathBuilderException</code> with the specified
60
* detail message. A detail message is a <code>String</code> that
61
* describes this particular exception.
62
*
63
* @param msg the detail message
64
*/
65
public SunCertPathBuilderException(String msg) {
66
super(msg);
67
}
68
69
/**
70
* Constructs a <code>SunCertPathBuilderException</code> that wraps the
71
* specified throwable. This allows any exception to be converted into a
72
* <code>SunCertPathBuilderException</code>, while retaining information
73
* about the cause, which may be useful for debugging. The detail message is
74
* set to (<code>cause==null ? null : cause.toString()</code>) (which
75
* typically contains the class and detail message of cause).
76
*
77
* @param cause the cause (which is saved for later retrieval by the
78
* {@link #getCause getCause()} method). (A <code>null</code> value is
79
* permitted, and indicates that the cause is nonexistent or unknown.)
80
* root cause.
81
*/
82
public SunCertPathBuilderException(Throwable cause) {
83
super(cause);
84
}
85
86
/**
87
* Creates a <code>SunCertPathBuilderException</code> with the specified
88
* detail message and cause.
89
*
90
* @param msg the detail message
91
* @param cause the cause
92
*/
93
public SunCertPathBuilderException(String msg, Throwable cause) {
94
super(msg, cause);
95
}
96
97
/**
98
* Creates a <code>SunCertPathBuilderException</code> with the specified
99
* detail message and adjacency list.
100
*
101
* @param msg the detail message
102
* @param adjList the adjacency list
103
*/
104
SunCertPathBuilderException(String msg, AdjacencyList adjList) {
105
this(msg);
106
this.adjList = adjList;
107
}
108
109
/**
110
* Creates a <code>SunCertPathBuilderException</code> with the specified
111
* detail message, cause, and adjacency list.
112
*
113
* @param msg the detail message
114
* @param cause the throwable that occurred
115
* @param adjList Adjacency list
116
*/
117
SunCertPathBuilderException(String msg, Throwable cause,
118
AdjacencyList adjList)
119
{
120
this(msg, cause);
121
this.adjList = adjList;
122
}
123
124
/**
125
* Returns the adjacency list containing information about the build.
126
*
127
* @return the adjacency list containing information about the build
128
*/
129
public AdjacencyList getAdjacencyList() {
130
return adjList;
131
}
132
}
133
134