Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 11 java.base.jmod - Base Module
JDK 11 java.base.jmod is the JMOD file for JDK 11 Base module.
JDK 11 Base module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.base.jmod.
JDK 11 Base module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Base module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.base.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ java/security/UnresolvedPermissionCollection.java
/* * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.security; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.ObjectStreamField; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; /** * A UnresolvedPermissionCollection stores a collection * of UnresolvedPermission permissions. * * @see java.security.Permission * @see java.security.Permissions * @see java.security.UnresolvedPermission * * * @author Roland Schemers * @since 1.2 * * @serial include */ final class UnresolvedPermissionCollection extends PermissionCollection implements java.io.Serializable { /** * Key is permission type, value is a list of the UnresolvedPermissions * of the same type. * Not serialized; see serialization section at end of class. */ private transient ConcurrentHashMap<String, List<UnresolvedPermission>> perms; /** * Create an empty UnresolvedPermissionCollection object. * */ public UnresolvedPermissionCollection() { perms = new ConcurrentHashMap<>(11); } /** * Adds a permission to this UnresolvedPermissionCollection. * The key for the hash is the unresolved permission's type (class) name. * * @param permission the Permission object to add. */ @Override public void add(Permission permission) { if (! (permission instanceof UnresolvedPermission)) throw new IllegalArgumentException("invalid permission: "+ permission); UnresolvedPermission up = (UnresolvedPermission) permission; // Add permission to map. NOTE: cannot use lambda for // remappingFunction parameter until JDK-8076596 is fixed. perms.compute(up.getName(), new java.util.function.BiFunction<>() { @Override public List<UnresolvedPermission> apply(String key, List<UnresolvedPermission> oldValue) { if (oldValue == null) { List<UnresolvedPermission> v = new CopyOnWriteArrayList<>(); v.add(up); return v; } else { oldValue.add(up); return oldValue; } } } ); } /** * get any unresolved permissions of the same type as p, * and return the List containing them. */ List<UnresolvedPermission> getUnresolvedPermissions(Permission p) { return perms.get(p.getClass().getName()); } /** * always returns false for unresolved permissions * */ @Override public boolean implies(Permission permission) { return false; } /** * Returns an enumeration of all the UnresolvedPermission lists in the * container. * * @return an enumeration of all the UnresolvedPermission objects. */ @Override public Enumeration<Permission> elements() { List<Permission> results = new ArrayList<>(); // where results are stored // Get iterator of Map values (which are lists of permissions) for (List<UnresolvedPermission> l : perms.values()) { results.addAll(l); } return Collections.enumeration(results); } private static final long serialVersionUID = -7176153071733132400L; // Need to maintain serialization interoperability with earlier releases, // which had the serializable field: // private Hashtable permissions; // keyed on type /** * @serialField permissions java.util.Hashtable * A table of the UnresolvedPermissions keyed on type, value is Vector * of permissions */ private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField("permissions", Hashtable.class), }; /** * @serialData Default field. */ /* * Writes the contents of the perms field out as a Hashtable * in which the values are Vectors for * serialization compatibility with earlier releases. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<String, Vector<UnresolvedPermission>> permissions = new Hashtable<>(perms.size()*2); // Convert each entry (List) into a Vector Set<Map.Entry<String, List<UnresolvedPermission>>> set = perms.entrySet(); for (Map.Entry<String, List<UnresolvedPermission>> e : set) { // Convert list into Vector List<UnresolvedPermission> list = e.getValue(); Vector<UnresolvedPermission> vec = new Vector<>(list); // Add to Hashtable being serialized permissions.put(e.getKey(), vec); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("permissions", permissions); out.writeFields(); } /* * Reads in a Hashtable in which the values are Vectors of * UnresolvedPermissions and saves them in the perms field. */ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { // Don't call defaultReadObject() // Read in serialized fields ObjectInputStream.GetField gfields = in.readFields(); // Get permissions @SuppressWarnings("unchecked") // writeObject writes a Hashtable<String, Vector<UnresolvedPermission>> // for the permissions key, so this cast is safe, unless the data is corrupt. Hashtable<String, Vector<UnresolvedPermission>> permissions = (Hashtable<String, Vector<UnresolvedPermission>>) gfields.get("permissions", null); perms = new ConcurrentHashMap<>(permissions.size()*2); // Convert each entry (Vector) into a List Set<Map.Entry<String, Vector<UnresolvedPermission>>> set = permissions.entrySet(); for (Map.Entry<String, Vector<UnresolvedPermission>> e : set) { // Convert Vector into ArrayList Vector<UnresolvedPermission> vec = e.getValue(); List<UnresolvedPermission> list = new CopyOnWriteArrayList<>(vec); // Add to Hashtable being serialized perms.put(e.getKey(), list); } } }
⏎ java/security/UnresolvedPermissionCollection.java
Or download all of them as a single archive file:
File name: java.base-11.0.1-src.zip File size: 8740354 bytes Release date: 2018-11-04 Download
2020-05-29, 242228👍, 0💬
Popular Posts:
What Is poi-ooxml-3.5.jar? poi-ooxml-3.5.jar is one of the JAR files for Apache POI 3.5, which provi...
What Is jaxb-api-2.1.6.jar? Java Architecture for XML Binding (JAXB) is a Java API that allows Java ...
Apache Log4j 1.2 Bridge allows applications coded to use Log4j 1.2 API to use Log4j 2 instead. Bytec...
What Is fop.jar? I got it from the fop-2.7-bin.zip. fop.jar in fop-2.7-bin.zip is the JAR file for F...
What Is commons-net-ftp-2.0.jar? commons-net-ftp-2.0.jar is the JAR file for Apache Commons Net FTP ...