src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSignerException.java
author naoto
Tue, 24 Oct 2017 08:56:30 -0700
changeset 47441 258dc79d2265
parent 47216 71c04702a3d5
permissions -rw-r--r--
8189291: Test policy should extend the default system policy Reviewed-by: mchung
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33872
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
     1
/*
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
     4
 *
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    10
 *
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    15
 * accompanied this code).
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    16
 *
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    20
 *
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    23
 * questions.
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    24
 */
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    25
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    26
package jdk.security.jarsigner;
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    27
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    28
/**
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    29
 * This exception is thrown when {@link JarSigner#sign} fails.
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    30
 *
35302
e4d2275861c3 8136494: Update "@since 1.9" to "@since 9" to match java.version.specification
iris
parents: 34894
diff changeset
    31
 * @since 9
33872
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    32
 */
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    33
public class JarSignerException extends RuntimeException {
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    34
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    35
    private static final long serialVersionUID = -4732217075689309530L;
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    36
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    37
    /**
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    38
     * Constructs a new {@code JarSignerException} with the specified detail
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    39
     * message and cause.
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    40
     * <p>
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    41
     * Note that the detail message associated with
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    42
     * {@code cause} is <i>not</i> automatically incorporated in
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    43
     * this {@code JarSignerException}'s detail message.
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    44
     *
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    45
     * @param message the detail message (which is saved for later retrieval
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    46
     *      by the {@link #getMessage()} method).
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    47
     * @param cause the cause (which is saved for later retrieval by the
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    48
     *      {@link #getCause()} method).  (A {@code null} value is permitted,
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    49
     *      and indicates that the cause is nonexistent or unknown.)
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    50
     */
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    51
    public JarSignerException(String message, Throwable cause) {
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    52
        super(message, cause);
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    53
    }
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    54
}
94e3836950ec 8056174: New APIs for jar signing
weijun
parents:
diff changeset
    55