Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/sun/security/provider/certpath/SunCertPathBuilderException.java
38923 views
/*1* Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package sun.security.provider.certpath;2627import java.util.List;28import java.security.cert.CertPathBuilderException;2930/**31* This is a subclass of the generic <code>CertPathBuilderException</code>.32* It contains an adjacency list with information regarding the unsuccessful33* paths that the SunCertPathBuilder tried.34*35* @since 1.436* @author Sean Mullan37* @see CertPathBuilderException38*/39public class SunCertPathBuilderException extends CertPathBuilderException {4041private static final long serialVersionUID = -7814288414129264709L;4243/**44* @serial45*/46private transient AdjacencyList adjList;4748/**49* Constructs a <code>SunCertPathBuilderException</code> with50* <code>null</code> as its detail message.51*/52public SunCertPathBuilderException() {53super();54}5556/**57* Constructs a <code>SunCertPathBuilderException</code> with the specified58* detail message. A detail message is a <code>String</code> that59* describes this particular exception.60*61* @param msg the detail message62*/63public SunCertPathBuilderException(String msg) {64super(msg);65}6667/**68* Constructs a <code>SunCertPathBuilderException</code> that wraps the69* specified throwable. This allows any exception to be converted into a70* <code>SunCertPathBuilderException</code>, while retaining information71* about the cause, which may be useful for debugging. The detail message is72* set to (<code>cause==null ? null : cause.toString()</code>) (which73* typically contains the class and detail message of cause).74*75* @param cause the cause (which is saved for later retrieval by the76* {@link #getCause getCause()} method). (A <code>null</code> value is77* permitted, and indicates that the cause is nonexistent or unknown.)78* root cause.79*/80public SunCertPathBuilderException(Throwable cause) {81super(cause);82}8384/**85* Creates a <code>SunCertPathBuilderException</code> with the specified86* detail message and cause.87*88* @param msg the detail message89* @param cause the cause90*/91public SunCertPathBuilderException(String msg, Throwable cause) {92super(msg, cause);93}9495/**96* Creates a <code>SunCertPathBuilderException</code> withe the specified97* detail message and adjacency list.98*99* @param msg the detail message100* @param adjList the adjacency list101*/102SunCertPathBuilderException(String msg, AdjacencyList adjList) {103this(msg);104this.adjList = adjList;105}106107/**108* Creates a <code>SunCertPathBuilderException</code> with the specified109* detail message, cause, and adjacency list.110*111* @param msg the detail message112* @param cause the throwable that occurred113* @param adjList Adjacency list114*/115SunCertPathBuilderException(String msg, Throwable cause,116AdjacencyList adjList)117{118this(msg, cause);119this.adjList = adjList;120}121122/**123* Returns the adjacency list containing information about the build.124*125* @return the adjacency list containing information about the build126*/127public AdjacencyList getAdjacencyList() {128return adjList;129}130}131132133