Tue, 06 Mar 2012 16:09:35 -0800
7150322: Stop using drop source bundles in jaxws
Reviewed-by: darcy, ohrstrom
1 /*
2 * Copyright (c) 2007, 2010, 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 */
26 package javax.xml.bind;
28 import java.awt.*;
29 import java.security.BasicPermission;
31 /**
32 * This class is for JAXB permissions. A {@code JAXBPermission}
33 * contains a name (also referred to as a "target name") but
34 * no actions list; you either have the named permission
35 * or you don't.
36 *
37 * <P>
38 * The target name is the name of the JAXB permission (see below).
39 *
40 * <P>
41 * The following table lists all the possible {@code JAXBPermission} target names,
42 * and for each provides a description of what the permission allows
43 * and a discussion of the risks of granting code the permission.
44 * <P>
45 *
46 * <table border=1 cellpadding=5 summary="Permission target name, what the permission allows, and associated risks">
47 * <tr>
48 * <th>Permission Target Name</th>
49 * <th>What the Permission Allows</th>
50 * <th>Risks of Allowing this Permission</th>
51 * </tr>
52 *
53 * <tr>
54 * <td>setDatatypeConverter</td>
55 * <td>
56 * Allows the code to set VM-wide {@link DatatypeConverterInterface}
57 * via {@link DatatypeConverter#setDatatypeConverter(DatatypeConverterInterface) the setDatatypeConverter method}
58 * that all the methods on {@link DatatypeConverter} uses.
59 * </td>
60 * <td>
61 * Malicious code can set {@link DatatypeConverterInterface}, which has
62 * VM-wide singleton semantics, before a genuine JAXB implementation sets one.
63 * This allows malicious code to gain access to objects that it may otherwise
64 * not have access to, such as {@link Frame#getFrames()} that belongs to
65 * another application running in the same JVM.
66 * </td>
67 * </tr>
68 * </table>
69 *
70 * @see java.security.BasicPermission
71 * @see java.security.Permission
72 * @see java.security.Permissions
73 * @see java.security.PermissionCollection
74 * @see java.lang.SecurityManager
75 *
76 * @author Joe Fialli
77 * @since JAXB 2.2
78 */
80 /* code was borrowed originally from java.lang.RuntimePermission. */
81 public final class JAXBPermission extends BasicPermission {
82 /**
83 * Creates a new JAXBPermission with the specified name.
84 *
85 * @param name
86 * The name of the JAXBPermission. As of 2.2 only "setDatatypeConverter"
87 * is defined.
88 */
89 public JAXBPermission(String name) {
90 super(name);
91 }
93 private static final long serialVersionUID = 1L;
94 }