* [ecj] VMStackWalker merges
@ 2006-12-04 16:24 Gary Benson
0 siblings, 0 replies; only message in thread
From: Gary Benson @ 2006-12-04 16:24 UTC (permalink / raw)
To: java-patches
[-- Attachment #1: Type: text/plain, Size: 183 bytes --]
Hi all,
This commit removes the gcj-specific versions of
java.lang.SecurityManager, javax.naming.spi.NamingManager,
gnu.CORBA.ObjectCreator and sun.reflect.Reflection.
Cheers,
Gary
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 104279 bytes --]
Index: ChangeLog
===================================================================
--- ChangeLog (revision 119405)
+++ ChangeLog (working copy)
@@ -1,3 +1,17 @@
+2006-12-04 Gary Benson <gbenson@redhat.com>
+
+ * java/lang/SecurityManager.java: Removed.
+ * java/lang/VMSecurityManager.java: Likewise.
+ * java/lang/natVMSecurityManager.cc: Likewise.
+ * javax/naming/spi/NamingManager.java: Likewise.
+ * gnu/CORBA/ObjectCreator.java: Likewise.
+ * sun/reflect/Reflection.java: Replaced with reference.
+ * sun/reflect/natReflection.cc: Removed.
+ * gcj/javaprims.h: Removed reference to VMSecurityManager.
+ * Makefile.am (nat_source_files): Removed natReflection.cc
+ and natVMSecurityManager.cc.
+ * sources.am, Makefile.in: Rebuilt.
+
2006-12-01 Gary Benson <gbenson@redhat.com>
* java/net/URLClassLoader.java
Index: java/lang/SecurityManager.java
===================================================================
--- java/lang/SecurityManager.java (revision 119399)
+++ java/lang/SecurityManager.java (working copy)
@@ -1,1057 +0,0 @@
-/* SecurityManager.java -- security checks for privileged actions
- Copyright (C) 1998, 1999, 2001, 2002, 2005, 2006
- Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-
-package java.lang;
-
-import java.awt.AWTPermission;
-import java.io.File;
-import java.io.FileDescriptor;
-import java.io.FilePermission;
-import java.lang.reflect.Member;
-import java.net.InetAddress;
-import java.net.SocketPermission;
-import java.security.AccessController;
-import java.security.AccessControlContext;
-import java.security.AllPermission;
-import java.security.Permission;
-import java.security.PrivilegedAction;
-import java.security.Security;
-import java.security.SecurityPermission;
-import java.util.PropertyPermission;
-import java.util.StringTokenizer;
-
-/**
- * SecurityManager is a class you can extend to create your own Java
- * security policy. By default, there is no SecurityManager installed in
- * 1.1, which means that all things are permitted to all people. The security
- * manager, if set, is consulted before doing anything with potentially
- * dangerous results, and throws a <code>SecurityException</code> if the
- * action is forbidden.
- *
- * <p>A typical check is as follows, just before the dangerous operation:<br>
- * <pre>
- * SecurityManager sm = System.getSecurityManager();
- * if (sm != null)
- * sm.checkABC(<em>argument</em>, ...);
- * </pre>
- * Note that this is thread-safe, by caching the security manager in a local
- * variable rather than risking a NullPointerException if the mangager is
- * changed between the check for null and before the permission check.
- *
- * <p>The special method <code>checkPermission</code> is a catchall, and
- * the default implementation calls
- * <code>AccessController.checkPermission</code>. In fact, all the other
- * methods default to calling checkPermission.
- *
- * <p>Sometimes, the security check needs to happen from a different context,
- * such as when called from a worker thread. In such cases, use
- * <code>getSecurityContext</code> to take a snapshot that can be passed
- * to the worker thread:<br>
- * <pre>
- * Object context = null;
- * SecurityManager sm = System.getSecurityManager();
- * if (sm != null)
- * context = sm.getSecurityContext(); // defaults to an AccessControlContext
- * // now, in worker thread
- * if (sm != null)
- * sm.checkPermission(permission, context);
- * </pre>
- *
- * <p>Permissions fall into these categories: File, Socket, Net, Security,
- * Runtime, Property, AWT, Reflect, and Serializable. Each of these
- * permissions have a property naming convention, that follows a hierarchical
- * naming convention, to make it easy to grant or deny several permissions
- * at once. Some permissions also take a list of permitted actions, such
- * as "read" or "write", to fine-tune control even more. The permission
- * <code>java.security.AllPermission</code> grants all permissions.
- *
- * <p>The default methods in this class deny all things to all people. You
- * must explicitly grant permission for anything you want to be legal when
- * subclassing this class.
- *
- * @author John Keiser
- * @author Eric Blake (ebb9@email.byu.edu)
- * @see ClassLoader
- * @see SecurityException
- * @see #checkTopLevelWindow(Object)
- * @see System#getSecurityManager()
- * @see System#setSecurityManager(SecurityManager)
- * @see AccessController
- * @see AccessControlContext
- * @see AccessControlException
- * @see Permission
- * @see BasicPermission
- * @see java.io.FilePermission
- * @see java.net.SocketPermission
- * @see java.util.PropertyPermission
- * @see RuntimePermission
- * @see java.awt.AWTPermission
- * @see Policy
- * @see SecurityPermission
- * @see ProtectionDomain
- * @since 1.0
- * @status still missing 1.4 functionality
- */
-public class SecurityManager
-{
- /**
- * The current security manager. This is located here instead of in
- * System, to avoid security problems, as well as bootstrap issues.
- * Make sure to access it in a thread-safe manner; it is package visible
- * to avoid overhead in java.lang.
- */
- static volatile SecurityManager current;
-
- /**
- * Tells whether or not the SecurityManager is currently performing a
- * security check.
- * @deprecated Use {@link #checkPermission(Permission)} instead.
- */
- protected boolean inCheck;
-
- /**
- * Construct a new security manager. There may be a security check, of
- * <code>RuntimePermission("createSecurityManager")</code>.
- *
- * @throws SecurityException if permission is denied
- */
- public SecurityManager()
- {
- SecurityManager sm = System.getSecurityManager();
- if (sm != null)
- sm.checkPermission(new RuntimePermission("createSecurityManager"));
- }
-
- /**
- * Tells whether or not the SecurityManager is currently performing a
- * security check.
- *
- * @return true if the SecurityManager is in a security check
- * @see #inCheck
- * @deprecated use {@link #checkPermission(Permission)} instead
- */
- public boolean getInCheck()
- {
- return inCheck;
- }
-
- /**
- * Get a list of all the classes currently executing methods on the Java
- * stack. getClassContext()[0] is the currently executing method (ie. the
- * class that CALLED getClassContext, not SecurityManager).
- *
- * @return an array of classes on the Java execution stack
- */
- protected Class[] getClassContext()
- {
- return VMSecurityManager.getClassContext(SecurityManager.class);
- }
-
- /**
- * Find the ClassLoader of the first non-system class on the execution
- * stack. A non-system class is one whose ClassLoader is not equal to
- * {@link ClassLoader#getSystemClassLoader()} or its ancestors. This
- * will return null in three cases:
- *
- * <ul>
- * <li>All methods on the stack are from system classes</li>
- * <li>All methods on the stack up to the first "privileged" caller, as
- * created by {@link AccessController#doPrivileged(PrivilegedAction)},
- * are from system classes</li>
- * <li>A check of <code>java.security.AllPermission</code> succeeds.</li>
- * </ul>
- *
- * @return the most recent non-system ClassLoader on the execution stack
- * @deprecated use {@link #checkPermission(Permission)} instead
- */
- protected ClassLoader currentClassLoader()
- {
- return VMSecurityManager.currentClassLoader(SecurityManager.class);
- }
-
- /**
- * Find the first non-system class on the execution stack. A non-system
- * class is one whose ClassLoader is not equal to
- * {@link ClassLoader#getSystemClassLoader()} or its ancestors. This
- * will return null in three cases:
- *
- * <ul>
- * <li>All methods on the stack are from system classes</li>
- * <li>All methods on the stack up to the first "privileged" caller, as
- * created by {@link AccessController#doPrivileged(PrivilegedAction)},
- * are from system classes</li>
- * <li>A check of <code>java.security.AllPermission</code> succeeds.</li>
- * </ul>
- *
- * @return the most recent non-system Class on the execution stack
- * @deprecated use {@link #checkPermission(Permission)} instead
- */
- protected Class currentLoadedClass()
- {
- int i = classLoaderDepth();
- return i >= 0 ? getClassContext()[i] : null;
- }
-
- /**
- * Get the depth of a particular class on the execution stack.
- *
- * @param className the fully-qualified name to search for
- * @return the index of the class on the stack, or -1
- * @deprecated use {@link #checkPermission(Permission)} instead
- */
- protected int classDepth(String className)
- {
- Class[] c = getClassContext();
- for (int i = 0; i < c.length; i++)
- if (className.equals(c[i].getName()))
- return i;
- return -1;
- }
-
- /**
- * Get the depth on the execution stack of the most recent non-system class.
- * A non-system class is one whose ClassLoader is not equal to
- * {@link ClassLoader#getSystemClassLoader()} or its ancestors. This
- * will return -1 in three cases:
- *
- * <ul>
- * <li>All methods on the stack are from system classes</li>
- * <li>All methods on the stack up to the first "privileged" caller, as
- * created by {@link AccessController#doPrivileged(PrivilegedAction)},
- * are from system classes</li>
- * <li>A check of <code>java.security.AllPermission</code> succeeds.</li>
- * </ul>
- *
- * @return the index of the most recent non-system Class on the stack
- * @deprecated use {@link #checkPermission(Permission)} instead
- */
- protected int classLoaderDepth()
- {
- try
- {
- checkPermission(new AllPermission());
- }
- catch (SecurityException e)
- {
- Class[] c = getClassContext();
- for (int i = 0; i < c.length; i++)
- if (c[i].getClassLoader() != null)
- // XXX Check if c[i] is AccessController, or a system class.
- return i;
- }
- return -1;
- }
-
- /**
- * Tell whether the specified class is on the execution stack.
- *
- * @param className the fully-qualified name of the class to find
- * @return whether the specified class is on the execution stack
- * @deprecated use {@link #checkPermission(Permission)} instead
- */
- protected boolean inClass(String className)
- {
- return classDepth(className) != -1;
- }
-
- /**
- * Tell whether there is a class loaded with an explicit ClassLoader on
- * the stack.
- *
- * @return whether a class with an explicit ClassLoader is on the stack
- * @deprecated use {@link #checkPermission(Permission)} instead
- */
- protected boolean inClassLoader()
- {
- return classLoaderDepth() != -1;
- }
-
- /**
- * Get an implementation-dependent Object that contains enough information
- * about the current environment to be able to perform standard security
- * checks later. This is used by trusted methods that need to verify that
- * their callers have sufficient access to perform certain operations.
- *
- * <p>Currently the only methods that use this are checkRead() and
- * checkConnect(). The default implementation returns an
- * <code>AccessControlContext</code>.
- *
- * @return a security context
- * @see #checkConnect(String, int, Object)
- * @see #checkRead(String, Object)
- * @see AccessControlContext
- * @see AccessController#getContext()
- */
- public Object getSecurityContext()
- {
- return AccessController.getContext();
- }
-
- /**
- * Check if the current thread is allowed to perform an operation that
- * requires the specified <code>Permission</code>. This defaults to
- * <code>AccessController.checkPermission</code>.
- *
- * @param perm the <code>Permission</code> required
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if perm is null
- * @since 1.2
- */
- public void checkPermission(Permission perm)
- {
- AccessController.checkPermission(perm);
- }
-
- /**
- * Check if the current thread is allowed to perform an operation that
- * requires the specified <code>Permission</code>. This is done in a
- * context previously returned by <code>getSecurityContext()</code>. The
- * default implementation expects context to be an AccessControlContext,
- * and it calls <code>AccessControlContext.checkPermission(perm)</code>.
- *
- * @param perm the <code>Permission</code> required
- * @param context a security context
- * @throws SecurityException if permission is denied, or if context is
- * not an AccessControlContext
- * @throws NullPointerException if perm is null
- * @see #getSecurityContext()
- * @see AccessControlContext#checkPermission(Permission)
- * @since 1.2
- */
- public void checkPermission(Permission perm, Object context)
- {
- if (! (context instanceof AccessControlContext))
- throw new SecurityException("Missing context");
- ((AccessControlContext) context).checkPermission(perm);
- }
-
- /**
- * Check if the current thread is allowed to create a ClassLoader. This
- * method is called from ClassLoader.ClassLoader(), and checks
- * <code>RuntimePermission("createClassLoader")</code>. If you override
- * this, you should call <code>super.checkCreateClassLoader()</code> rather
- * than throwing an exception.
- *
- * @throws SecurityException if permission is denied
- * @see ClassLoader#ClassLoader()
- */
- public void checkCreateClassLoader()
- {
- checkPermission(new RuntimePermission("createClassLoader"));
- }
-
- /**
- * Check if the current thread is allowed to modify another Thread. This is
- * called by Thread.stop(), suspend(), resume(), interrupt(), destroy(),
- * setPriority(), setName(), and setDaemon(). The default implementation
- * checks <code>RuntimePermission("modifyThread")</code> on system threads
- * (ie. threads in ThreadGroup with a null parent), and returns silently on
- * other threads.
- *
- * <p>If you override this, you must do two things. First, call
- * <code>super.checkAccess(t)</code>, to make sure you are not relaxing
- * requirements. Second, if the calling thread has
- * <code>RuntimePermission("modifyThread")</code>, return silently, so that
- * core classes (the Classpath library!) can modify any thread.
- *
- * @param thread the other Thread to check
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if thread is null
- * @see Thread#stop()
- * @see Thread#suspend()
- * @see Thread#resume()
- * @see Thread#setPriority(int)
- * @see Thread#setName(String)
- * @see Thread#setDaemon(boolean)
- */
- public void checkAccess(Thread thread)
- {
- if (thread.getThreadGroup() != null
- && thread.getThreadGroup().getParent() == null)
- checkPermission(new RuntimePermission("modifyThread"));
- }
-
- /**
- * Check if the current thread is allowed to modify a ThreadGroup. This is
- * called by Thread.Thread() (to add a thread to the ThreadGroup),
- * ThreadGroup.ThreadGroup() (to add this ThreadGroup to a parent),
- * ThreadGroup.stop(), suspend(), resume(), interrupt(), destroy(),
- * setDaemon(), and setMaxPriority(). The default implementation
- * checks <code>RuntimePermission("modifyThread")</code> on the system group
- * (ie. the one with a null parent), and returns silently on other groups.
- *
- * <p>If you override this, you must do two things. First, call
- * <code>super.checkAccess(t)</code>, to make sure you are not relaxing
- * requirements. Second, if the calling thread has
- * <code>RuntimePermission("modifyThreadGroup")</code>, return silently,
- * so that core classes (the Classpath library!) can modify any thread.
- *
- * @param g the ThreadGroup to check
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if g is null
- * @see Thread#Thread()
- * @see ThreadGroup#ThreadGroup(String)
- * @see ThreadGroup#stop()
- * @see ThreadGroup#suspend()
- * @see ThreadGroup#resume()
- * @see ThreadGroup#interrupt()
- * @see ThreadGroup#setDaemon(boolean)
- * @see ThreadGroup#setMaxPriority(int)
- */
- public void checkAccess(ThreadGroup g)
- {
- if (g.getParent() == null)
- checkPermission(new RuntimePermission("modifyThreadGroup"));
- }
-
- /**
- * Check if the current thread is allowed to exit the JVM with the given
- * status. This method is called from Runtime.exit() and Runtime.halt().
- * The default implementation checks
- * <code>RuntimePermission("exitVM")</code>. If you override this, call
- * <code>super.checkExit</code> rather than throwing an exception.
- *
- * @param status the status to exit with
- * @throws SecurityException if permission is denied
- * @see Runtime#exit(int)
- * @see Runtime#halt(int)
- */
- public void checkExit(int status)
- {
- checkPermission(new RuntimePermission("exitVM"));
- }
-
- /**
- * Check if the current thread is allowed to execute the given program. This
- * method is called from Runtime.exec(). If the name is an absolute path,
- * the default implementation checks
- * <code>FilePermission(program, "execute")</code>, otherwise it checks
- * <code>FilePermission("<<ALL FILES>>", "execute")</code>. If
- * you override this, call <code>super.checkExec</code> rather than
- * throwing an exception.
- *
- * @param program the name of the program to exec
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if program is null
- * @see Runtime#exec(String[], String[], File)
- */
- public void checkExec(String program)
- {
- if (! program.equals(new File(program).getAbsolutePath()))
- program = "<<ALL FILES>>";
- checkPermission(new FilePermission(program, "execute"));
- }
-
- /**
- * Check if the current thread is allowed to link in the given native
- * library. This method is called from Runtime.load() (and hence, by
- * loadLibrary() as well). The default implementation checks
- * <code>RuntimePermission("loadLibrary." + filename)</code>. If you
- * override this, call <code>super.checkLink</code> rather than throwing
- * an exception.
- *
- * @param filename the full name of the library to load
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if filename is null
- * @see Runtime#load(String)
- */
- public void checkLink(String filename)
- {
- // Use the toString() hack to do the null check.
- checkPermission(new RuntimePermission("loadLibrary."
- + filename.toString()));
- }
-
- /**
- * Check if the current thread is allowed to read the given file using the
- * FileDescriptor. This method is called from
- * FileInputStream.FileInputStream(). The default implementation checks
- * <code>RuntimePermission("readFileDescriptor")</code>. If you override
- * this, call <code>super.checkRead</code> rather than throwing an
- * exception.
- *
- * @param desc the FileDescriptor representing the file to access
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if desc is null
- * @see FileInputStream#FileInputStream(FileDescriptor)
- */
- public void checkRead(FileDescriptor desc)
- {
- if (desc == null)
- throw new NullPointerException();
- checkPermission(new RuntimePermission("readFileDescriptor"));
- }
-
- /**
- * Check if the current thread is allowed to read the given file. This
- * method is called from FileInputStream.FileInputStream(),
- * RandomAccessFile.RandomAccessFile(), File.exists(), canRead(), isFile(),
- * isDirectory(), lastModified(), length() and list(). The default
- * implementation checks <code>FilePermission(filename, "read")</code>. If
- * you override this, call <code>super.checkRead</code> rather than
- * throwing an exception.
- *
- * @param filename the full name of the file to access
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if filename is null
- * @see File
- * @see FileInputStream#FileInputStream(String)
- * @see RandomAccessFile#RandomAccessFile(String, String)
- */
- public void checkRead(String filename)
- {
- checkPermission(new FilePermission(filename, "read"));
- }
-
- /**
- * Check if the current thread is allowed to read the given file. using the
- * given security context. The context must be a result of a previous call
- * to <code>getSecurityContext()</code>. The default implementation checks
- * <code>AccessControlContext.checkPermission(new FilePermission(filename,
- * "read"))</code>. If you override this, call <code>super.checkRead</code>
- * rather than throwing an exception.
- *
- * @param filename the full name of the file to access
- * @param context the context to determine access for
- * @throws SecurityException if permission is denied, or if context is
- * not an AccessControlContext
- * @throws NullPointerException if filename is null
- * @see #getSecurityContext()
- * @see AccessControlContext#checkPermission(Permission)
- */
- public void checkRead(String filename, Object context)
- {
- if (! (context instanceof AccessControlContext))
- throw new SecurityException("Missing context");
- AccessControlContext ac = (AccessControlContext) context;
- ac.checkPermission(new FilePermission(filename, "read"));
- }
-
- /**
- * Check if the current thread is allowed to write the given file using the
- * FileDescriptor. This method is called from
- * FileOutputStream.FileOutputStream(). The default implementation checks
- * <code>RuntimePermission("writeFileDescriptor")</code>. If you override
- * this, call <code>super.checkWrite</code> rather than throwing an
- * exception.
- *
- * @param desc the FileDescriptor representing the file to access
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if desc is null
- * @see FileOutputStream#FileOutputStream(FileDescriptor)
- */
- public void checkWrite(FileDescriptor desc)
- {
- if (desc == null)
- throw new NullPointerException();
- checkPermission(new RuntimePermission("writeFileDescriptor"));
- }
-
- /**
- * Check if the current thread is allowed to write the given file. This
- * method is called from FileOutputStream.FileOutputStream(),
- * RandomAccessFile.RandomAccessFile(), File.canWrite(), mkdir(), and
- * renameTo(). The default implementation checks
- * <code>FilePermission(filename, "write")</code>. If you override this,
- * call <code>super.checkWrite</code> rather than throwing an exception.
- *
- * @param filename the full name of the file to access
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if filename is null
- * @see File
- * @see File#canWrite()
- * @see File#mkdir()
- * @see File#renameTo(File)
- * @see FileOutputStream#FileOutputStream(String)
- * @see RandomAccessFile#RandomAccessFile(String, String)
- */
- public void checkWrite(String filename)
- {
- checkPermission(new FilePermission(filename, "write"));
- }
-
- /**
- * Check if the current thread is allowed to delete the given file. This
- * method is called from File.delete(). The default implementation checks
- * <code>FilePermission(filename, "delete")</code>. If you override this,
- * call <code>super.checkDelete</code> rather than throwing an exception.
- *
- * @param filename the full name of the file to delete
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if filename is null
- * @see File#delete()
- */
- public void checkDelete(String filename)
- {
- checkPermission(new FilePermission(filename, "delete"));
- }
-
- /**
- * Check if the current thread is allowed to connect to a given host on a
- * given port. This method is called from Socket.Socket(). A port number
- * of -1 indicates the caller is attempting to determine an IP address, so
- * the default implementation checks
- * <code>SocketPermission(host, "resolve")</code>. Otherwise, the default
- * implementation checks
- * <code>SocketPermission(host + ":" + port, "connect")</code>. If you
- * override this, call <code>super.checkConnect</code> rather than throwing
- * an exception.
- *
- * @param host the host to connect to
- * @param port the port to connect on
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if host is null
- * @see Socket#Socket()
- */
- public void checkConnect(String host, int port)
- {
- if (port == -1)
- checkPermission(new SocketPermission(host, "resolve"));
- else
- // Use the toString() hack to do the null check.
- checkPermission(new SocketPermission(host.toString() + ":" + port,
- "connect"));
- }
-
- /**
- * Check if the current thread is allowed to connect to a given host on a
- * given port, using the given security context. The context must be a
- * result of a previous call to <code>getSecurityContext</code>. A port
- * number of -1 indicates the caller is attempting to determine an IP
- * address, so the default implementation checks
- * <code>AccessControlContext.checkPermission(new SocketPermission(host,
- * "resolve"))</code>. Otherwise, the default implementation checks
- * <code>AccessControlContext.checkPermission(new SocketPermission(host
- * + ":" + port, "connect"))</code>. If you override this, call
- * <code>super.checkConnect</code> rather than throwing an exception.
- *
- * @param host the host to connect to
- * @param port the port to connect on
- * @param context the context to determine access for
- *
- * @throws SecurityException if permission is denied, or if context is
- * not an AccessControlContext
- * @throws NullPointerException if host is null
- *
- * @see #getSecurityContext()
- * @see AccessControlContext#checkPermission(Permission)
- */
- public void checkConnect(String host, int port, Object context)
- {
- if (! (context instanceof AccessControlContext))
- throw new SecurityException("Missing context");
- AccessControlContext ac = (AccessControlContext) context;
- if (port == -1)
- ac.checkPermission(new SocketPermission(host, "resolve"));
- else
- // Use the toString() hack to do the null check.
- ac.checkPermission(new SocketPermission(host.toString() + ":" + port,
- "connect"));
- }
-
- /**
- * Check if the current thread is allowed to listen to a specific port for
- * data. This method is called by ServerSocket.ServerSocket(). The default
- * implementation checks
- * <code>SocketPermission("localhost:" + (port == 0 ? "1024-" : "" + port),
- * "listen")</code>. If you override this, call
- * <code>super.checkListen</code> rather than throwing an exception.
- *
- * @param port the port to listen on
- * @throws SecurityException if permission is denied
- * @see ServerSocket#ServerSocket(int)
- */
- public void checkListen(int port)
- {
- checkPermission(new SocketPermission("localhost:"
- + (port == 0 ? "1024-" : "" +port),
- "listen"));
- }
-
- /**
- * Check if the current thread is allowed to accept a connection from a
- * particular host on a particular port. This method is called by
- * ServerSocket.implAccept(). The default implementation checks
- * <code>SocketPermission(host + ":" + port, "accept")</code>. If you
- * override this, call <code>super.checkAccept</code> rather than throwing
- * an exception.
- *
- * @param host the host which wishes to connect
- * @param port the port the connection will be on
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if host is null
- * @see ServerSocket#accept()
- */
- public void checkAccept(String host, int port)
- {
- // Use the toString() hack to do the null check.
- checkPermission(new SocketPermission(host.toString() + ":" + port,
- "accept"));
- }
-
- /**
- * Check if the current thread is allowed to read and write multicast to
- * a particular address. The default implementation checks
- * <code>SocketPermission(addr.getHostAddress(), "accept,connect")</code>.
- * If you override this, call <code>super.checkMulticast</code> rather than
- * throwing an exception.
- *
- * @param addr the address to multicast to
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if host is null
- * @since 1.1
- */
- public void checkMulticast(InetAddress addr)
- {
- checkPermission(new SocketPermission(addr.getHostAddress(),
- "accept,connect"));
- }
-
- /**
- *Check if the current thread is allowed to read and write multicast to
- * a particular address with a particular ttl (time-to-live) value. The
- * default implementation ignores ttl, and checks
- * <code>SocketPermission(addr.getHostAddress(), "accept,connect")</code>.
- * If you override this, call <code>super.checkMulticast</code> rather than
- * throwing an exception.
- *
- * @param addr the address to multicast to
- * @param ttl value in use for multicast send
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if host is null
- * @since 1.1
- * @deprecated use {@link #checkPermission(Permission)} instead
- */
- public void checkMulticast(InetAddress addr, byte ttl)
- {
- checkPermission(new SocketPermission(addr.getHostAddress(),
- "accept,connect"));
- }
-
- /**
- * Check if the current thread is allowed to read or write all the system
- * properties at once. This method is called by System.getProperties()
- * and setProperties(). The default implementation checks
- * <code>PropertyPermission("*", "read,write")</code>. If you override
- * this, call <code>super.checkPropertiesAccess</code> rather than
- * throwing an exception.
- *
- * @throws SecurityException if permission is denied
- * @see System#getProperties()
- * @see System#setProperties(Properties)
- */
- public void checkPropertiesAccess()
- {
- checkPermission(new PropertyPermission("*", "read,write"));
- }
-
- /**
- * Check if the current thread is allowed to read a particular system
- * property (writes are checked directly via checkPermission). This method
- * is called by System.getProperty() and setProperty(). The default
- * implementation checks <code>PropertyPermission(key, "read")</code>. If
- * you override this, call <code>super.checkPropertyAccess</code> rather
- * than throwing an exception.
- *
- * @param key the key of the property to check
- *
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if key is null
- * @throws IllegalArgumentException if key is ""
- *
- * @see System#getProperty(String)
- */
- public void checkPropertyAccess(String key)
- {
- checkPermission(new PropertyPermission(key, "read"));
- }
-
- /**
- * Check if the current thread is allowed to create a top-level window. If
- * it is not, the operation should still go through, but some sort of
- * nonremovable warning should be placed on the window to show that it
- * is untrusted. This method is called by Window.Window(). The default
- * implementation checks
- * <code>AWTPermission("showWindowWithoutWarningBanner")</code>, and returns
- * true if no exception was thrown. If you override this, use
- * <code>return super.checkTopLevelWindow</code> rather than returning
- * false.
- *
- * @param window the window to create
- * @return true if there is permission to show the window without warning
- * @throws NullPointerException if window is null
- * @see java.awt.Window#Window(java.awt.Frame)
- */
- public boolean checkTopLevelWindow(Object window)
- {
- if (window == null)
- throw new NullPointerException();
- try
- {
- checkPermission(new AWTPermission("showWindowWithoutWarningBanner"));
- return true;
- }
- catch (SecurityException e)
- {
- return false;
- }
- }
-
- /**
- * Check if the current thread is allowed to create a print job. This
- * method is called by Toolkit.getPrintJob(). The default implementation
- * checks <code>RuntimePermission("queuePrintJob")</code>. If you override
- * this, call <code>super.checkPrintJobAccess</code> rather than throwing
- * an exception.
- *
- * @throws SecurityException if permission is denied
- * @see java.awt.Toolkit#getPrintJob(java.awt.Frame, String, Properties)
- * @since 1.1
- */
- public void checkPrintJobAccess()
- {
- checkPermission(new RuntimePermission("queuePrintJob"));
- }
-
- /**
- * Check if the current thread is allowed to use the system clipboard. This
- * method is called by Toolkit.getSystemClipboard(). The default
- * implementation checks <code>AWTPermission("accessClipboard")</code>. If
- * you override this, call <code>super.checkSystemClipboardAccess</code>
- * rather than throwing an exception.
- *
- * @throws SecurityException if permission is denied
- * @see java.awt.Toolkit#getSystemClipboard()
- * @since 1.1
- */
- public void checkSystemClipboardAccess()
- {
- checkPermission(new AWTPermission("accessClipboard"));
- }
-
- /**
- * Check if the current thread is allowed to use the AWT event queue. This
- * method is called by Toolkit.getSystemEventQueue(). The default
- * implementation checks <code>AWTPermission("accessEventQueue")</code>.
- * you override this, call <code>super.checkAwtEventQueueAccess</code>
- * rather than throwing an exception.
- *
- * @throws SecurityException if permission is denied
- * @see java.awt.Toolkit#getSystemEventQueue()
- * @since 1.1
- */
- public void checkAwtEventQueueAccess()
- {
- checkPermission(new AWTPermission("accessEventQueue"));
- }
-
- /**
- * Check if the current thread is allowed to access the specified package
- * at all. This method is called by ClassLoader.loadClass() in user-created
- * ClassLoaders. The default implementation gets a list of all restricted
- * packages, via <code>Security.getProperty("package.access")</code>. Then,
- * if packageName starts with or equals any restricted package, it checks
- * <code>RuntimePermission("accessClassInPackage." + packageName)</code>.
- * If you override this, you should call
- * <code>super.checkPackageAccess</code> before doing anything else.
- *
- * @param packageName the package name to check access to
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if packageName is null
- * @see ClassLoader#loadClass(String, boolean)
- * @see Security#getProperty(String)
- */
- public void checkPackageAccess(String packageName)
- {
- checkPackageList(packageName, "package.access", "accessClassInPackage.");
- }
-
- /**
- * Check if the current thread is allowed to define a class into the
- * specified package. This method is called by ClassLoader.loadClass() in
- * user-created ClassLoaders. The default implementation gets a list of all
- * restricted packages, via
- * <code>Security.getProperty("package.definition")</code>. Then, if
- * packageName starts with or equals any restricted package, it checks
- * <code>RuntimePermission("defineClassInPackage." + packageName)</code>.
- * If you override this, you should call
- * <code>super.checkPackageDefinition</code> before doing anything else.
- *
- * @param packageName the package name to check access to
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if packageName is null
- * @see ClassLoader#loadClass(String, boolean)
- * @see Security#getProperty(String)
- */
- public void checkPackageDefinition(String packageName)
- {
- checkPackageList(packageName, "package.definition", "defineClassInPackage.");
- }
-
- /**
- * Check if the current thread is allowed to set the current socket factory.
- * This method is called by Socket.setSocketImplFactory(),
- * ServerSocket.setSocketFactory(), and URL.setURLStreamHandlerFactory().
- * The default implementation checks
- * <code>RuntimePermission("setFactory")</code>. If you override this, call
- * <code>super.checkSetFactory</code> rather than throwing an exception.
- *
- * @throws SecurityException if permission is denied
- * @see Socket#setSocketImplFactory(SocketImplFactory)
- * @see ServerSocket#setSocketFactory(SocketImplFactory)
- * @see URL#setURLStreamHandlerFactory(URLStreamHandlerFactory)
- */
- public void checkSetFactory()
- {
- checkPermission(new RuntimePermission("setFactory"));
- }
-
- /**
- * Check if the current thread is allowed to get certain types of Methods,
- * Fields and Constructors from a Class object. This method is called by
- * Class.getMethod[s](), Class.getField[s](), Class.getConstructor[s],
- * Class.getDeclaredMethod[s](), Class.getDeclaredField[s](), and
- * Class.getDeclaredConstructor[s](). The default implementation allows
- * PUBLIC access, and access to classes defined by the same classloader as
- * the code performing the reflection. Otherwise, it checks
- * <code>RuntimePermission("accessDeclaredMembers")</code>. If you override
- * this, do not call <code>super.checkMemberAccess</code>, as this would
- * mess up the stack depth check that determines the ClassLoader requesting
- * the access.
- *
- * @param c the Class to check
- * @param memberType either DECLARED or PUBLIC
- * @throws SecurityException if permission is denied, including when
- * memberType is not DECLARED or PUBLIC
- * @throws NullPointerException if c is null
- * @see Class
- * @see Member#DECLARED
- * @see Member#PUBLIC
- * @since 1.1
- */
- public void checkMemberAccess(Class c, int memberType)
- {
- if (c == null)
- throw new NullPointerException();
- if (memberType == Member.PUBLIC)
- return;
- // XXX Allow access to classes created by same classloader before next
- // check.
- checkPermission(new RuntimePermission("accessDeclaredMembers"));
- }
-
- /**
- * Test whether a particular security action may be taken. The default
- * implementation checks <code>SecurityPermission(action)</code>. If you
- * override this, call <code>super.checkSecurityAccess</code> rather than
- * throwing an exception.
- *
- * @param action the desired action to take
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if action is null
- * @throws IllegalArgumentException if action is ""
- * @since 1.1
- */
- public void checkSecurityAccess(String action)
- {
- checkPermission(new SecurityPermission(action));
- }
-
- /**
- * Get the ThreadGroup that a new Thread should belong to by default. Called
- * by Thread.Thread(). The default implementation returns the current
- * ThreadGroup of the current Thread. <STRONG>Spec Note:</STRONG> it is not
- * clear whether the new Thread is guaranteed to pass the
- * checkAccessThreadGroup() test when using this ThreadGroup, but I presume
- * so.
- *
- * @return the ThreadGroup to put the new Thread into
- * @since 1.1
- */
- public ThreadGroup getThreadGroup()
- {
- return Thread.currentThread().getThreadGroup();
- }
-
- /**
- * Helper that checks a comma-separated list of restricted packages, from
- * <code>Security.getProperty("package.definition")</code>, for the given
- * package access permission. If packageName starts with or equals any
- * restricted package, it checks
- * <code>RuntimePermission(permission + packageName)</code>.
- *
- * @param packageName the package name to check access to
- * @param restriction "package.access" or "package.definition"
- * @param permission the base permission, including the '.'
- * @throws SecurityException if permission is denied
- * @throws NullPointerException if packageName is null
- * @see #checkPackageAccess(String)
- * @see #checkPackageDefinition(String)
- */
- void checkPackageList(String packageName, final String restriction,
- String permission)
- {
- if (packageName == null)
- throw new NullPointerException();
-
- String list = (String)AccessController.doPrivileged(new PrivilegedAction()
- {
- public Object run()
- {
- return Security.getProperty(restriction);
- }
- });
-
- if (list == null || list.equals(""))
- return;
-
- String packageNamePlusDot = packageName + ".";
-
- StringTokenizer st = new StringTokenizer(list, ",");
- while (st.hasMoreTokens())
- {
- if (packageNamePlusDot.startsWith(st.nextToken()))
- {
- Permission p = new RuntimePermission(permission + packageName);
- checkPermission(p);
- return;
- }
- }
- }
-}
Index: java/lang/VMSecurityManager.java
===================================================================
--- java/lang/VMSecurityManager.java (revision 119399)
+++ java/lang/VMSecurityManager.java (working copy)
@@ -1,68 +0,0 @@
-/*
- * java.lang.SecurityManager: part of the Java Class Libraries project.
- * Copyright (C) 1998, 2001, 2002, 2005 Free Software Foundation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-package java.lang;
-
-import java.net.*;
-import java.util.*;
-import java.io.*;
-
-/**
- ** VMSecurityManager is a helper class for SecurityManager the VM must
- ** implement.
- **
- ** @author John Keiser
- ** @version 1.1.0, 31 May 1998
- **/
-class VMSecurityManager
-{
- /** Get a list of all the classes currently executing
- ** methods on the Java stack. getClassContext()[0] is
- ** the currently executing method
- ** <STRONG>Spec Note:</STRONG> does not say whether
- ** the stack will include the getClassContext() call or
- ** the one just before it.
- **
- ** @return an array containing all the methods on classes
- ** on the Java execution stack.
- **/
- static native Class[] getClassContext(Class caller);
-
- /** Get the current ClassLoader--the one nearest to the
- ** top of the stack.
- ** @return the current ClassLoader.
- **/
- static ClassLoader currentClassLoader(Class caller)
- {
- // The docs above are wrong. See the online docs.
- // FIXME this implementation is a bit wrong too -- the docs say we
- // must also consider ancestors of the system class loader.
- ClassLoader systemClassLoader = ClassLoader.systemClassLoader;
- Class[] classStack = getClassContext (caller);
- for (int i = 0; i < classStack.length; i++)
- {
- ClassLoader loader = classStack[i].getClassLoader();
- if (loader != null && loader != systemClassLoader)
- return loader;
- }
-
- return null;
- }
-}
Index: java/lang/natVMSecurityManager.cc
===================================================================
--- java/lang/natVMSecurityManager.cc (revision 119399)
+++ java/lang/natVMSecurityManager.cc (working copy)
@@ -1,29 +0,0 @@
-/* Copyright (C) 2002 Free Software Foundation
-
- This file is part of libgcj.
-
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-details. */
-
-// Written by Tom Tromey <tromey@redhat.com>
-
-#include <config.h>
-
-#include <gcj/cni.h>
-#include <jvm.h>
-#include <java-stack.h>
-
-#include <java/lang/VMSecurityManager.h>
-#include <java/lang/SecurityManager.h>
-#include <java/lang/ClassLoader.h>
-#include <java/lang/Class.h>
-
-JArray<jclass> *
-java::lang::VMSecurityManager::getClassContext (jclass klass)
-{
- JArray<jclass> *result =
- _Jv_StackTrace::GetClassContext (klass);
-
- return result;
-}
Index: javax/naming/spi/NamingManager.java
===================================================================
--- javax/naming/spi/NamingManager.java (revision 119399)
+++ javax/naming/spi/NamingManager.java (working copy)
@@ -1,659 +0,0 @@
-/* NamingManager.java -- Creates contexts and objects
- Copyright (C) 2000, 2001, 2002, 2003, 2004,
- 2006 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-
-package javax.naming.spi;
-
-// GCJ LOCAL - We don't have this yet.
-// import gnu.classpath.VMStackWalker;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.StringTokenizer;
-
-import javax.naming.CannotProceedException;
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.NamingException;
-import javax.naming.NoInitialContextException;
-import javax.naming.RefAddr;
-import javax.naming.Reference;
-import javax.naming.Referenceable;
-import javax.naming.StringRefAddr;
-
-/**
- * Contains methods for creating contexts and objects referred to by
- * location information. The location is specified in the scope of the
- * certain naming or directory service. This class only contais static
- * methods and cannot be instantiated.
- */
-public class NamingManager
-{
- /**
- * The environment property into which getContinuationContext() stores the
- * value of the CannotProceedException parameter. The value of this field
- * is <i>java.naming.spi.CannotProceedException<i>.
- */
- public static final String CPE = "java.naming.spi.CannotProceedException";
-
- private static InitialContextFactoryBuilder icfb;
-
- // Package private so DirectoryManager can access it.
- static ObjectFactoryBuilder ofb;
-
- // This class cannot be instantiated.
- NamingManager ()
- {
- }
-
- /**
- * Checks if the initial context factory builder has been set.
- *
- * @return true if the builder has been set
- *
- * @see #setInitialContextFactoryBuilder(InitialContextFactoryBuilder)
- */
- public static boolean hasInitialContextFactoryBuilder ()
- {
- return icfb != null;
- }
-
- /**
- * Creates the initial context. If the initial object factory builder has
- * been set with {@link #setObjectFactoryBuilder(ObjectFactoryBuilder)},
- * the work is delegated to this builder. Otherwise, the method searches
- * for the property Context.INITIAL_CONTEXT_FACTORY first in the passed
- * table and then in the system properties. The value of this property is
- * uses as a class name to install the context factory. The corresponding
- * class must exist, be public and have the public parameterless constructor.
- *
- * @param environment the properties, used to create the context.
- *
- * @return the created context
- *
- * @throws NoInitialContextException if the initial builder is not set,
- * the property Context.INITIAL_CONTEXT_FACTORY is missing of the
- * class, named by this property, cannot be instantiated.
- * @throws NamingException if throws by the context factory
- */
- public static Context getInitialContext (Hashtable<?, ?> environment)
- throws NamingException
- {
- InitialContextFactory icf = null;
-
- if (icfb != null)
- icf = icfb.createInitialContextFactory(environment);
- else
- {
- String java_naming_factory_initial = null;
- if (environment != null)
- java_naming_factory_initial
- = (String) environment.get (Context.INITIAL_CONTEXT_FACTORY);
- if (java_naming_factory_initial == null)
- java_naming_factory_initial =
- System.getProperty (Context.INITIAL_CONTEXT_FACTORY);
- if (java_naming_factory_initial == null)
- throw new
- NoInitialContextException ("Can't find property: "
- + Context.INITIAL_CONTEXT_FACTORY);
-
- try
- {
- icf = (InitialContextFactory)Class.forName
- (java_naming_factory_initial, true,
- Thread.currentThread().getContextClassLoader())
- .newInstance ();
- }
- catch (Exception exception)
- {
- NoInitialContextException e
- = new NoInitialContextException
- ("Can't load InitialContextFactory class: "
- + java_naming_factory_initial);
- e.setRootCause(exception);
- throw e;
- }
- }
-
- return icf.getInitialContext (environment);
- }
-
- /**
- * <p>
- * Creates the URL context for the given URL scheme id.
- * </p>
- * <p>
- * The class name of the factory that creates the context has the naming
- * pattern scheme-idURLContextFactory. For instance, the factory for the "ftp"
- * sheme should be named "ftpURLContextFactory".
- * </p>
- * <p>
- * The Context.URL_PKG_PREFIXES environment property contains the
- * colon-separated list of the possible package prefixes. The package name is
- * constructed concatenating the package prefix with the scheme id. This
- * property is searched in the passed <i>environment</i> parameter and later
- * in the system properties.
- * </p>
- * <p>
- * If the factory class cannot be found in the specified packages, system will
- * try to use the default internal factory for the given scheme.
- * </p>
- * <p>
- * After the factory is instantiated, its method
- * {@link ObjectFactory#getObjectInstance(Object, Name, Context, Hashtable)}
- * is called to create and return the object instance.
- *
- * @param refInfo passed to the factory
- * @param name passed to the factory
- * @param nameCtx passed to the factory
- * @param scheme the url scheme that must be supported by the given context
- * @param environment the properties for creating the factory and context (may
- * be null)
- * @return the created context
- * @throws NamingException if thrown by the factory when creating the context.
- */
- static Context getURLContext(Object refInfo, Name name, Context nameCtx,
- String scheme, Hashtable<?,?> environment)
- throws NamingException
- {
- // Specified as the default in the docs. Unclear if this is
- // right for us.
- String defaultPrefix = "com.sun.jndi.url";
-
- StringBuffer allPrefixes = new StringBuffer();
-
- String prefixes;
- if (environment != null)
- {
- prefixes = (String) environment.get(Context.URL_PKG_PREFIXES);
- if (prefixes != null)
- allPrefixes.append(prefixes);
- }
-
- prefixes = System.getProperty(Context.URL_PKG_PREFIXES);
- if (prefixes != null)
- {
- if (allPrefixes.length() > 0)
- allPrefixes.append(':');
- allPrefixes.append(prefixes);
- }
-
- if (allPrefixes.length() > 0)
- allPrefixes.append(':');
- allPrefixes.append(defaultPrefix);
-
- scheme = scheme + "." + scheme + "URLContextFactory";
-
- StringTokenizer tokens = new StringTokenizer(allPrefixes.toString(), ":");
- while (tokens.hasMoreTokens())
- {
- String aTry = tokens.nextToken();
- try
- {
- String tryClass = aTry + "." + scheme;
- Class factoryClass = forName(tryClass);
- if (factoryClass != null)
- {
- ObjectFactory factory = (ObjectFactory) factoryClass.newInstance();
- Object obj = factory.getObjectInstance(refInfo, name, nameCtx,
- environment);
- Context ctx = (Context) obj;
- if (ctx != null)
- return ctx;
- }
- }
- catch (ClassNotFoundException _1)
- {
- // Ignore it.
- }
- catch (ClassCastException _2)
- {
- // This means that the class we found was not an
- // ObjectFactory or that the factory returned something
- // which was not a Context.
- }
- catch (InstantiationException _3)
- {
- // If we couldn't instantiate the factory we might get
- // this.
- }
- catch (IllegalAccessException _4)
- {
- // Another possibility when instantiating.
- }
- catch (NamingException _5)
- {
- throw _5;
- }
- catch (Exception _6)
- {
- // Anything from getObjectInstance.
- }
- }
-
- return null;
- }
-
- /**
- * Load the class with the given name. This method tries to use the context
- * class loader first. If this fails, it searches for the suitable class
- * loader in the caller stack trace. This method is a central point where all
- * requests to find a class by name are delegated.
- */
- static Class forName(String className)
- {
- try
- {
- return Class.forName(className, true,
- Thread.currentThread().getContextClassLoader());
- }
- catch (ClassNotFoundException nex)
- {
- /**
- * Returns the first user defined class loader on the call stack, or
- * null when no non-null class loader was found.
- */
-// GCJ LOCAL - We don't have VMStackWalker yet.
-// We only try the SystemClassLoader for now.
-// Class[] ctx = VMStackWalker.getClassContext();
-// for (int i = 0; i < ctx.length; i++)
-// {
- // Since we live in a class loaded by the bootstrap
- // class loader, getClassLoader is safe to call without
- // needing to be wrapped in a privileged action.
-// ClassLoader cl = ctx[i].getClassLoader();
- ClassLoader cl = ClassLoader.getSystemClassLoader();
- try
- {
- if (cl != null)
- return Class.forName(className, true, cl);
- }
- catch (ClassNotFoundException nex2)
- {
- // Try next.
- }
-// }
- }
- return null;
- }
-
-
- /**
- * <p>
- * Creates the URL context for the given URL scheme id.
- * </p>
- * <p>
- * The class name of the factory that creates the context has the naming
- * pattern scheme-idURLContextFactory. For instance, the factory for the
- * "ftp" scheme should be named "ftpURLContextFactory".
- * The Context.URL_PKG_PREFIXES environment property contains the
- * colon-separated list of the possible package prefixes. The package name
- * is constructed by concatenating the package prefix with the scheme id.
- * </p>
- * <p>
- * If the factory class cannot be found in the specified packages, the
- * system will try to use the default internal factory for the given scheme.
- * </p>
- * <p>
- * After the factory is instantiated, its method
- * {@link ObjectFactory#getObjectInstance(Object, Name, Context, Hashtable)}
- * is called to create and return the object instance.
- *
- * @param scheme the url scheme that must be supported by the given context
- * @param environment the properties for creating the factory and context
- * (may be null)
- * @return the created context
- * @throws NamingException if thrown by the factory when creating the
- * context.
- */
- public static Context getURLContext (String scheme,
- Hashtable<?, ?> environment)
- throws NamingException
- {
- return getURLContext (null, null, null, scheme, environment);
- }
-
- /**
- * Sets the initial object factory builder.
- *
- * @param builder the builder to set
- *
- * @throws SecurityException if the builder cannot be installed due
- * security restrictions.
- * @throws NamingException if the builder cannot be installed due other
- * reasons
- * @throws IllegalStateException if setting the builder repeatedly
- */
- public static void setObjectFactoryBuilder (ObjectFactoryBuilder builder)
- throws NamingException
- {
- SecurityManager sm = System.getSecurityManager ();
- if (sm != null)
- sm.checkSetFactory ();
- // Once the builder is installed it cannot be replaced.
- if (ofb != null)
- throw new IllegalStateException ("object factory builder already installed");
- if (builder != null)
- ofb = builder;
- }
-
- static StringTokenizer getPlusPath (String property, Hashtable env,
- Context nameCtx)
- throws NamingException
- {
- String path = (String) env.get (property);
- if (nameCtx == null)
- nameCtx = getInitialContext (env);
- String path2 = (String) nameCtx.getEnvironment ().get (property);
- if (path == null)
- path = path2;
- else if (path2 != null)
- path += ":" + path2;
- return new StringTokenizer (path != null ? path : "", ":");
- }
-
- /**
- * <p>Creates an object for the specified name context, environment and
- * referencing context object.</p>
- * <p>
- * If the builder factory is set by
- * {@link #setObjectFactoryBuilder(ObjectFactoryBuilder)}, the call is
- * delegated to that factory. Otherwise, the object is created using the
- * following rules:
- * <ul>
- * <li>If the referencing object (refInfo) contains the factory class name,
- * the object is created by this factory. If the creation fails,
- * the parameter refInfo is returned as the method return value.</li>
- * <li>If the referencing object has no factory class name, and the addresses
- * are StringRefAddrs having the address type "URL", the object is
- * created by the URL context factory. The used factory corresponds the
- * the naming schema of the each URL. If the attempt to create
- * the object this way is not successful, the subsequent rule is
- * tried.</li>
- * <li> If the refInfo is not an instance of Reference or Referencable
- * (for example, null), the object is created by the factories,
- * specified in the Context.OBJECT_FACTORIES property of the
- * environment and the provider resource file, associated with the
- * nameCtx. The value of this property is the colon separated list
- * of the possible factories. If none of the factories can be
- * loaded, the refInfo is returned.
- * </ul>
- * </p>
- * <p>The object factory must be public and have the public parameterless
- * constructor.</p>
- *
- * @param refInfo the referencing object, for which the new object must be
- * created (can be null). If not null, it is usually an instance of
- * the {@link Reference} or {@link Referenceable}.
- * @param name the name of the object. The name is relative to
- * the nameCtx naming context. The value of this parameter can be
- * null if the name is not specified.
- * @param nameCtx the naming context, in which scope the name of the new
- * object is specified. If this parameter is null, the name is
- * specified in the scope of the initial context.
- * @param environment contains additional information for creating the object.
- * This paramter can be null if there is no need to provide any
- * additional information.
- *
- * @return the created object. If the creation fails, in some cases
- * the parameter refInfo may be returned.
- *
- * @throws NamingException if the attempt to name the new object has failed
- * @throws Exception if the object factory throws it. The object factory
- * only throws an exception if it does not want other factories
- * to be used to create the object.
- */
- public static Object getObjectInstance (Object refInfo,
- Name name,
- Context nameCtx,
- Hashtable<?, ?> environment)
- throws Exception
- {
- ObjectFactory factory = null;
-
- if (ofb != null)
- factory = ofb.createObjectFactory (refInfo, environment);
- else
- {
- // First see if we have a Reference or a Referenceable. If so
- // we do some special processing.
- Object ref2 = refInfo;
- if (refInfo instanceof Referenceable)
- ref2 = ((Referenceable) refInfo).getReference ();
- if (ref2 instanceof Reference)
- {
- Reference ref = (Reference) ref2;
-
- // If we have a factory class name then we use that.
- String fClass = ref.getFactoryClassName ();
- if (fClass != null)
- {
- // Exceptions here are passed to the caller.
- Class k = Class.forName (fClass,
- true,
- Thread.currentThread().getContextClassLoader());
- factory = (ObjectFactory) k.newInstance ();
- }
- else
- {
- // There's no factory class name. If the address is a
- // StringRefAddr with address type `URL', then we try
- // the URL's context factory.
- Enumeration e = ref.getAll ();
- while (e.hasMoreElements ())
- {
- RefAddr ra = (RefAddr) e.nextElement ();
- if (ra instanceof StringRefAddr
- && "URL".equals (ra.getType ()))
- {
- factory
- = (ObjectFactory) getURLContext (refInfo,
- name,
- nameCtx,
- (String) ra.getContent (),
- environment);
- Object obj = factory.getObjectInstance (refInfo,
- name,
- nameCtx,
- environment);
- if (obj != null)
- return obj;
- }
- }
-
- // Have to try the next step.
- factory = null;
- }
- }
-
- // Now look at OBJECT_FACTORIES to find the factory.
- if (factory == null)
- {
- StringTokenizer tokens = getPlusPath (Context.OBJECT_FACTORIES,
- environment, nameCtx);
-
- while (tokens.hasMoreTokens ())
- {
- String klassName = tokens.nextToken ();
- Class k = Class.forName (klassName,
- true,
- Thread.currentThread().getContextClassLoader());
- factory = (ObjectFactory) k.newInstance ();
- Object obj = factory.getObjectInstance (refInfo, name,
- nameCtx, environment);
- if (obj != null)
- return obj;
- }
-
- // Failure.
- return refInfo;
- }
- }
-
- if (factory == null)
- return refInfo;
- Object obj = factory.getObjectInstance (refInfo, name,
- nameCtx, environment);
- return obj == null ? refInfo : obj;
- }
-
- /**
- * Sets the initial context factory builder.
- *
- * @param builder the builder to set
- *
- * @throws SecurityException if the builder cannot be installed due
- * security restrictions.
- * @throws NamingException if the builder cannot be installed due other
- * reasons
- * @throws IllegalStateException if setting the builder repeatedly
- *
- * @see #hasInitialContextFactoryBuilder()
- */
- public static void setInitialContextFactoryBuilder
- (InitialContextFactoryBuilder builder)
- throws NamingException
- {
- SecurityManager sm = System.getSecurityManager ();
- if (sm != null)
- sm.checkSetFactory ();
- // Once the builder is installed it cannot be replaced.
- if (icfb != null)
- throw new IllegalStateException ("ctx factory builder already installed");
- if (builder != null)
- icfb = builder;
- }
-
- /**
- * Creates a context in which the context operation must be continued.
- * This method is used by operations on names that span multiple namespaces.
- *
- * @param cpe the exception that triggered this continuation. This method
- * obtains the environment ({@link CannotProceedException#getEnvironment()}
- * and sets the environment property {@link #CPE} = cpe.
- *
- * @return a non null context for continuing the operation
- *
- * @throws NamingException if the naming problems have occured
- */
- public static Context getContinuationContext (CannotProceedException cpe)
- throws NamingException
- {
- Hashtable env = cpe.getEnvironment ();
- if (env != null)
- env.put (CPE, cpe);
-
- // TODO: Check if this implementation matches the API specification
- try
- {
- Object obj = getObjectInstance (cpe.getResolvedObj(),
- cpe.getAltName (),
- cpe.getAltNameCtx (),
- env);
- if (obj != null)
- return (Context) obj;
- }
- catch (Exception _)
- {
- }
-
- // fix stack trace for re-thrown exception (message confusing otherwise)
- cpe.fillInStackTrace();
-
- throw cpe;
- }
-
- /**
- * Get the object state for binding.
- *
- * @param obj the object, for that the binding state must be retrieved. Cannot
- * be null.
- * @param name the name of this object, related to the nameCtx. Can be null if
- * not specified.
- * @param nameCtx the naming context, to that the object name is related. Can
- * be null if the name is related to the initial default context.
- * @param environment the properties for creating the object state. Can be
- * null if no properties are provided.
- * @return the object state for binding, may be null if no changes are
- * returned by the factory
- * @throws NamingException
- */
- public static Object getStateToBind (Object obj, Name name,
- Context nameCtx, Hashtable<?, ?> environment)
- throws NamingException
- {
- StringTokenizer tokens = getPlusPath (Context.STATE_FACTORIES,
- environment, nameCtx);
- while (tokens.hasMoreTokens ())
- {
- String klassName = tokens.nextToken ();
- try
- {
- Class k = Class.forName (klassName,
- true,
- Thread.currentThread().getContextClassLoader());
- StateFactory factory = (StateFactory) k.newInstance ();
- Object o = factory.getStateToBind (obj, name, nameCtx,
- environment);
- if (o != null)
- return o;
- }
- catch (ClassNotFoundException _1)
- {
- // Ignore it.
- }
- catch (ClassCastException _2)
- {
- // This means that the class we found was not an
- // ObjectFactory or that the factory returned something
- // which was not a Context.
- }
- catch (InstantiationException _3)
- {
- // If we couldn't instantiate the factory we might get
- // this.
- }
- catch (IllegalAccessException _4)
- {
- // Another possibility when instantiating.
- }
- }
-
- return obj;
- }
-}
Index: gnu/CORBA/ObjectCreator.java
===================================================================
--- gnu/CORBA/ObjectCreator.java (revision 119399)
+++ gnu/CORBA/ObjectCreator.java (working copy)
@@ -1,596 +0,0 @@
-/* ObjectCreator.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-
-package gnu.CORBA;
-
-import gnu.CORBA.CDR.UnknownExceptionCtxHandler;
-import gnu.CORBA.CDR.BufferredCdrInput;
-import gnu.CORBA.CDR.BufferedCdrOutput;
-import gnu.CORBA.CDR.AbstractCdrInput;
-import gnu.CORBA.GIOP.ServiceContext;
-import gnu.CORBA.typecodes.RecordTypeCode;
-// GCJ LOCAL - We don't have this yet.
-// import gnu.classpath.VMStackWalker;
-
-import org.omg.CORBA.Any;
-import org.omg.CORBA.CompletionStatus;
-import org.omg.CORBA.CompletionStatusHelper;
-import org.omg.CORBA.MARSHAL;
-import org.omg.CORBA.SystemException;
-import org.omg.CORBA.TCKind;
-import org.omg.CORBA.UNKNOWN;
-import org.omg.CORBA.UserException;
-import org.omg.CORBA.portable.IDLEntity;
-import org.omg.CORBA.portable.InputStream;
-import org.omg.CORBA.portable.OutputStream;
-import org.omg.CORBA.portable.ValueBase;
-
-import java.lang.reflect.Method;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-import javax.rmi.CORBA.Util;
-
-/**
- * Creates java objects from the agreed IDL names for the simple case when the
- * CORBA object is directly mapped into the locally defined java class.
- *
- * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
- */
-public class ObjectCreator
-{
- /**
- * The standard OMG prefix.
- */
- public static final String OMG_PREFIX = "omg.org/";
-
- /**
- * The standard java prefix.
- */
- public static final String JAVA_PREFIX = "org.omg.";
-
- /**
- * The prefix for classes that are placed instide the gnu.CORBA namespace.
- */
- public static final String CLASSPATH_PREFIX = "gnu.CORBA.";
-
- /**
- * Maps classes to they IDL or RMI names. Computing RMI name is an expensive
- * operations, so frequently used RMI keys are reused. The map must be weak to
- * ensure that the class can be unloaded, when applicable.
- */
- public static Map m_names = new WeakHashMap();
-
- /**
- * Maps IDL strings into known classes. The map must be weak to ensure that
- * the class can be unloaded, when applicable.
- */
- public static Map m_classes = new WeakHashMap();
-
- /**
- * Maps IDL types to they helpers.
- */
- public static Map m_helpers = new WeakHashMap();
-
- /**
- * Try to instantiate an object with the given IDL name. The object must be
- * mapped to the local java class. The omg.org domain must be mapped into the
- * object in either org/omg or gnu/CORBA namespace.
- *
- * @param IDL name
- * @return instantiated object instance or null if no such available.
- */
- public static java.lang.Object createObject(String idl, String suffix)
- {
- synchronized (m_classes)
- {
- Class known = (Class) (suffix == null ? m_classes.get(idl)
- : m_classes.get(idl + 0xff + suffix));
- Object object;
-
- if (known != null)
- {
- try
- {
- return known.newInstance();
- }
- catch (Exception ex)
- {
- RuntimeException rex = new RuntimeException(idl + " suffix "
- + suffix, ex);
- throw rex;
- }
- }
- else
- {
- if (suffix == null)
- suffix = "";
- try
- {
- known = forName(toClassName(JAVA_PREFIX, idl) + suffix);
- object = known.newInstance();
- }
- catch (Exception ex)
- {
- try
- {
- known = forName(toClassName(CLASSPATH_PREFIX, idl)
- + suffix);
- object = known.newInstance();
- }
- catch (Exception exex)
- {
- return null;
- }
- }
- m_classes.put(idl + 0xff + suffix, known);
- return object;
- }
- }
- }
-
- /**
- * Read the system exception from the given stream.
- *
- * @param input the CDR stream to read from.
- * @param contexts the service contexts in request/reply header/
- *
- * @return the exception that has been stored in the stream (IDL name, minor
- * code and completion status).
- */
- public static SystemException readSystemException(InputStream input,
- ServiceContext[] contexts)
- {
- SystemException exception;
-
- String idl = input.read_string();
- int minor = input.read_ulong();
- CompletionStatus completed = CompletionStatusHelper.read(input);
-
- try
- {
- exception = (SystemException) createObject(idl, null);
- exception.minor = minor;
- exception.completed = completed;
- }
- catch (Exception ex)
- {
- UNKNOWN u = new UNKNOWN("Unsupported system exception " + idl, minor,
- completed);
- u.initCause(ex);
- throw u;
- }
-
- try
- {
- // If UnknownExceptionInfo is present in the contexts, read it and
- // set as a cause of this exception.
- ServiceContext uEx = ServiceContext.find(
- ServiceContext.UnknownExceptionInfo, contexts);
-
- if (uEx != null)
- {
- BufferredCdrInput in = new BufferredCdrInput(uEx.context_data);
- in.setOrb(in.orb());
- if (input instanceof AbstractCdrInput)
- {
- ((AbstractCdrInput) input).cloneSettings(in);
- }
-
- Throwable t = UnknownExceptionCtxHandler.read(in, contexts);
- exception.initCause(t);
- }
- }
- catch (Exception ex)
- {
- // Unsupported context format. Do not terminate as the user program may
- // not need it.
- }
-
- return exception;
- }
-
- /**
- * Reads the user exception, having the given Id, from the input stream. The
- * id is expected to be in the form like
- * 'IDL:test/org/omg/CORBA/ORB/communication/ourUserException:1.0'
- *
- * @param idl the exception idl name.
- * @param input the stream to read from.
- *
- * @return the loaded exception.
- * @return null if the helper class cannot be found.
- */
- public static UserException readUserException(String idl, InputStream input)
- {
- try
- {
- Class helperClass = findHelper(idl);
-
- Method read = helperClass.getMethod("read",
- new Class[] { org.omg.CORBA.portable.InputStream.class });
-
- return (UserException) read.invoke(null, new Object[] { input });
- }
- catch (MARSHAL mex)
- {
- // This one is ok to throw
- throw mex;
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- return null;
- }
- }
-
- /**
- * Gets the helper class name from the string like
- * 'IDL:test/org/omg/CORBA/ORB/communication/ourUserException:1.0'
- *
- * @param IDL the idl name.
- */
- public static String toHelperName(String IDL)
- {
- String s = IDL;
- int a = s.indexOf(':') + 1;
- int b = s.lastIndexOf(':');
-
- s = IDL.substring(a, b);
-
- if (s.startsWith(OMG_PREFIX))
- s = JAVA_PREFIX + s.substring(OMG_PREFIX.length());
-
- return s.replace('/', '.') + "Helper";
- }
-
- /**
- * Writes the system exception data to CDR output stream.
- *
- * @param output a stream to write data to.
- * @param ex an exception to write.
- */
- public static void writeSystemException(OutputStream output,
- SystemException ex)
- {
- String exIDL = getRepositoryId(ex.getClass());
- output.write_string(exIDL);
- output.write_ulong(ex.minor);
- CompletionStatusHelper.write(output, ex.completed);
- }
-
- /**
- * Converts the given IDL name to class name.
- *
- * @param IDL the idl name.
- *
- */
- protected static String toClassName(String prefix, String IDL)
- {
- String s = IDL;
- int a = s.indexOf(':') + 1;
- int b = s.lastIndexOf(':');
-
- s = IDL.substring(a, b);
-
- if (s.startsWith(OMG_PREFIX))
- s = prefix + s.substring(OMG_PREFIX.length());
-
- return s.replace('/', '.');
- }
-
- /**
- * Converts the given IDL name to class name and tries to load the matching
- * class. The OMG prefix (omg.org) is replaced by the java prefix org.omg. No
- * other prefixes are added.
- *
- * @param IDL the idl name.
- *
- * @return the matching class or null if no such is available.
- */
- public static Class Idl2class(String IDL)
- {
- synchronized (m_classes)
- {
- Class c = (Class) m_classes.get(IDL);
-
- if (c != null)
- return c;
- else
- {
- String s = IDL;
- int a = s.indexOf(':') + 1;
- int b = s.lastIndexOf(':');
-
- s = IDL.substring(a, b);
-
- if (s.startsWith(OMG_PREFIX))
- s = JAVA_PREFIX + s.substring(OMG_PREFIX.length());
-
- String cn = s.replace('/', '.');
-
- try
- {
- c = forName(cn);
- m_classes.put(IDL, c);
- return c;
- }
- catch (ClassNotFoundException ex)
- {
- return null;
- }
- }
- }
- }
-
- /**
- * Converts the given IDL name to class name, tries to load the matching class
- * and create an object instance with parameterless constructor. The OMG
- * prefix (omg.org) is replaced by the java prefix org.omg. No other prefixes
- * are added.
- *
- * @param IDL the idl name.
- *
- * @return instantiated object instance or null if such attempt was not
- * successful.
- */
- public static java.lang.Object Idl2Object(String IDL)
- {
- Class cx = Idl2class(IDL);
-
- try
- {
- if (cx != null)
- return cx.newInstance();
- else
- return null;
- }
- catch (Exception ex)
- {
- return null;
- }
- }
-
- /**
- * Convert the class name to IDL or RMI name (repository id). If the class
- * inherits from IDLEntity, ValueBase or SystemException, returns repository
- * Id in the IDL:(..) form. If it does not, returns repository Id in the
- * RMI:(..) form.
- *
- * @param cx the class for that the name must be computed.
- *
- * @return the idl or rmi name.
- */
- public static synchronized String getRepositoryId(Class cx)
- {
- String name = (String) m_names.get(cx);
- if (name != null)
- return name;
-
- String cn = cx.getName();
- if (!(IDLEntity.class.isAssignableFrom(cx)
- || ValueBase.class.isAssignableFrom(cx) || SystemException.class.isAssignableFrom(cx)))
- {
- // Not an IDL entity.
- name = Util.createValueHandler().getRMIRepositoryID(cx);
- }
- else
- {
- if (cn.startsWith(JAVA_PREFIX))
- cn = OMG_PREFIX
- + cn.substring(JAVA_PREFIX.length()).replace('.', '/');
- else if (cn.startsWith(CLASSPATH_PREFIX))
- cn = OMG_PREFIX
- + cn.substring(CLASSPATH_PREFIX.length()).replace('.', '/');
-
- name = "IDL:" + cn + ":1.0";
- }
- m_names.put(cx, name);
- return name;
- }
-
- /**
- * Insert the passed parameter into the given Any, assuming that the helper
- * class is available. The helper class must have the "Helper" suffix and be
- * in the same package as the class of the object being inserted.
- *
- * @param into the target to insert.
- *
- * @param object the object to insert. It can be any object as far as the
- * corresponding helper is provided.
- *
- * @return true on success, false otherwise.
- */
- public static boolean insertWithHelper(Any into, Object object)
- {
- try
- {
- String helperClassName = object.getClass().getName() + "Helper";
- Class helperClass = forName(helperClassName);
-
- Method insert = helperClass.getMethod("insert", new Class[] {
- Any.class, object.getClass() });
-
- insert.invoke(null, new Object[] { into, object });
-
- return true;
- }
- catch (Exception exc)
- {
- // Failed due some reason.
- return false;
- }
- }
-
- /**
- * Insert the system exception into the given Any.
- */
- public static boolean insertSysException(Any into, SystemException exception)
- {
- try
- {
- BufferedCdrOutput output = new BufferedCdrOutput();
-
- String m_exception_id = getRepositoryId(exception.getClass());
- output.write_string(m_exception_id);
- output.write_ulong(exception.minor);
- CompletionStatusHelper.write(output, exception.completed);
-
- String name = getDefaultName(m_exception_id);
-
- GeneralHolder h = new GeneralHolder(output);
-
- into.insert_Streamable(h);
-
- RecordTypeCode r = new RecordTypeCode(TCKind.tk_except);
- r.setId(m_exception_id);
- r.setName(name);
- into.type(r);
-
- return true;
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- return false;
- }
- }
-
- /**
- * Get the type name from the IDL string.
- */
- public static String getDefaultName(String idl)
- {
- int f1 = idl.lastIndexOf("/");
- int p1 = (f1 < 0) ? 0 : f1;
- int p2 = idl.indexOf(":", p1);
- if (p2 < 0)
- p2 = idl.length();
-
- String name = idl.substring(f1 + 1, p2);
- return name;
- }
-
- /**
- * Insert this exception into the given Any. On failure, insert the UNKNOWN
- * exception.
- */
- public static void insertException(Any into, Throwable exception)
- {
- boolean ok = false;
- if (exception instanceof SystemException)
- ok = insertSysException(into, (SystemException) exception);
- else if (exception instanceof UserException)
- ok = insertWithHelper(into, exception);
-
- if (!ok)
- ok = insertSysException(into, new UNKNOWN());
- if (!ok)
- throw new InternalError("Exception wrapping broken");
- }
-
- /**
- * Find helper for the class with the given name.
- */
- public static Class findHelper(String idl)
- {
- synchronized (m_helpers)
- {
- Class c = (Class) m_helpers.get(idl);
- if (c != null)
- return c;
- try
- {
- String helper = toHelperName(idl);
- c = forName(helper);
-
- m_helpers.put(idl, c);
- return c;
- }
- catch (Exception ex)
- {
- return null;
- }
- }
- }
-
- /**
- * Load the class with the given name. This method tries to use the context
- * class loader first. If this fails, it searches for the suitable class
- * loader in the caller stack trace. This method is a central point where all
- * requests to find a class by name are delegated.
- */
- public static Class forName(String className) throws ClassNotFoundException
- {
- try
- {
- return Class.forName(className, true,
- Thread.currentThread().getContextClassLoader());
- }
- catch (ClassNotFoundException nex)
- {
- /**
- * Returns the first user defined class loader on the call stack, or
- * null when no non-null class loader was found.
- */
-
-// GCJ LOCAL - We don't have VMStackWalker yet.
-// We only try the SystemClassLoader for now.
-// Class[] ctx = VMStackWalker.getClassContext();
-// for (int i = 0; i < ctx.length; i++)
-// {
-// // Since we live in a class loaded by the bootstrap
-// // class loader, getClassLoader is safe to call without
-// // needing to be wrapped in a privileged action.
-// ClassLoader cl = ctx[i].getClassLoader();
- ClassLoader cl = ClassLoader.getSystemClassLoader();
- try
- {
- if (cl != null)
- return Class.forName(className, true, cl);
- }
- catch (ClassNotFoundException nex2)
- {
- // Try next.
- }
-// }
-
- }
- throw new ClassNotFoundException(className);
- }
-}
Index: sun/reflect/Reflection.java
===================================================================
--- sun/reflect/Reflection.java (revision 119489)
+++ sun/reflect/Reflection.java (working copy)
@@ -37,14 +37,15 @@
package sun.reflect;
-// GCJ LOCAL - We don't have this yet.
-// import gnu.classpath.VMStackWalker;
+import gnu.classpath.VMStackWalker;
public class Reflection
{
/**
* A stack-walking wrapper method used by the JSR 166 RI.
*/
- public static native Class getCallerClass(int depth);
+ public static Class getCallerClass(int depth)
+ {
+ return VMStackWalker.getClassContext()[depth];
+ }
}
-
Index: sun/reflect/natReflection.cc
===================================================================
--- sun/reflect/natReflection.cc (revision 119489)
+++ sun/reflect/natReflection.cc (working copy)
@@ -1,28 +0,0 @@
-// natReflection.cc
-
-/* Copyright (C) 2006
- Free Software Foundation
-
- This file is part of libgcj.
-
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-details. */
-
-#include <sun/reflect/Reflection.h>
-#include <java/lang/Thread.h>
-
-#include <java-interp.h>
-#include <java-stack.h>
-#include <execution.h>
-
-jclass
-sun::reflect::Reflection::getCallerClass (jint n)
-{
- // FIXME: grossly inefficient. What we really need is
- // _Jv_StackTrace::GetCallerClass(int), so we don't end up tracing
- // the entire stack.
-
- JArray<jclass> *result = _Jv_StackTrace::GetClassContext (NULL);
- return elements (result)[n-1];
-}
Index: gcj/javaprims.h
===================================================================
--- gcj/javaprims.h (revision 119399)
+++ gcj/javaprims.h (working copy)
@@ -246,7 +246,6 @@
class VMCompiler;
class VMDouble;
class VMFloat;
- class VMSecurityManager;
class VMThrowable;
class VerifyError;
class VirtualMachineError;
Index: Makefile.am
===================================================================
--- Makefile.am (revision 119405)
+++ Makefile.am (working copy)
@@ -774,7 +774,6 @@
java/lang/natThread.cc \
java/lang/natThreadLocal.cc \
java/lang/natVMClassLoader.cc \
-java/lang/natVMSecurityManager.cc \
java/lang/natVMThrowable.cc \
java/lang/ref/natReference.cc \
java/lang/reflect/natArray.cc \
@@ -794,8 +793,7 @@
java/util/logging/natLogger.cc \
java/util/zip/natDeflater.cc \
java/util/zip/natInflater.cc \
-sun/misc/natUnsafe.cc \
-sun/reflect/natReflection.cc
+sun/misc/natUnsafe.cc
xlib_nat_source_files = \
gnu/gcj/xlib/natClip.cc \
Index: sources.am
===================================================================
--- sources.am (revision 119399)
+++ sources.am (working copy)
@@ -95,7 +95,7 @@
classpath/gnu/CORBA/NamingService/NamingMap.java \
classpath/gnu/CORBA/NamingService/NamingServiceTransient.java \
classpath/gnu/CORBA/NamingService/TransientContext.java \
-gnu/CORBA/ObjectCreator.java \
+classpath/gnu/CORBA/ObjectCreator.java \
classpath/gnu/CORBA/OctetHolder.java \
classpath/gnu/CORBA/OrbFocused.java \
classpath/gnu/CORBA/OrbFunctional.java \
@@ -4468,7 +4468,7 @@
classpath/java/lang/RuntimeException.java \
classpath/java/lang/RuntimePermission.java \
classpath/java/lang/SecurityException.java \
-java/lang/SecurityManager.java \
+classpath/java/lang/SecurityManager.java \
classpath/java/lang/Short.java \
classpath/java/lang/StackOverflowError.java \
classpath/java/lang/StackTraceElement.java \
@@ -4493,7 +4493,6 @@
java/lang/VMCompiler.java \
java/lang/VMDouble.java \
java/lang/VMFloat.java \
-java/lang/VMSecurityManager.java \
java/lang/VMThrowable.java \
classpath/java/lang/VerifyError.java \
classpath/java/lang/VirtualMachineError.java \
@@ -5900,7 +5899,7 @@
classpath/javax/naming/spi/DirectoryManager.java \
classpath/javax/naming/spi/InitialContextFactory.java \
classpath/javax/naming/spi/InitialContextFactoryBuilder.java \
-javax/naming/spi/NamingManager.java \
+classpath/javax/naming/spi/NamingManager.java \
classpath/javax/naming/spi/ObjectFactory.java \
classpath/javax/naming/spi/ObjectFactoryBuilder.java \
classpath/javax/naming/spi/ResolveResult.java \
Index: Makefile.in
===================================================================
--- Makefile.in (revision 119405)
+++ Makefile.in (working copy)
@@ -307,8 +307,8 @@
java/lang/natStringBuffer.cc java/lang/natStringBuilder.cc \
java/lang/natSystem.cc java/lang/natThread.cc \
java/lang/natThreadLocal.cc java/lang/natVMClassLoader.cc \
- java/lang/natVMSecurityManager.cc java/lang/natVMThrowable.cc \
- java/lang/ref/natReference.cc java/lang/reflect/natArray.cc \
+ java/lang/natVMThrowable.cc java/lang/ref/natReference.cc \
+ java/lang/reflect/natArray.cc \
java/lang/reflect/natConstructor.cc \
java/lang/reflect/natField.cc java/lang/reflect/natMethod.cc \
java/net/natVMInetAddress.cc java/net/natVMNetworkInterface.cc \
@@ -320,10 +320,9 @@
java/text/natCollator.cc java/util/natVMTimeZone.cc \
java/util/concurrent/atomic/natAtomicLong.cc \
java/util/logging/natLogger.cc java/util/zip/natDeflater.cc \
- java/util/zip/natInflater.cc sun/misc/natUnsafe.cc \
- sun/reflect/natReflection.cc boehm.cc nogc.cc posix.cc \
- win32.cc darwin.cc posix-threads.cc win32-threads.cc \
- no-threads.cc
+ java/util/zip/natInflater.cc sun/misc/natUnsafe.cc boehm.cc \
+ nogc.cc posix.cc win32.cc darwin.cc posix-threads.cc \
+ win32-threads.cc no-threads.cc
am__objects_2 = gnu/classpath/jdwp/natVMFrame.lo \
gnu/classpath/jdwp/natVMMethod.lo \
gnu/classpath/jdwp/natVMVirtualMachine.lo \
@@ -370,8 +369,8 @@
java/lang/natStringBuffer.lo java/lang/natStringBuilder.lo \
java/lang/natSystem.lo java/lang/natThread.lo \
java/lang/natThreadLocal.lo java/lang/natVMClassLoader.lo \
- java/lang/natVMSecurityManager.lo java/lang/natVMThrowable.lo \
- java/lang/ref/natReference.lo java/lang/reflect/natArray.lo \
+ java/lang/natVMThrowable.lo java/lang/ref/natReference.lo \
+ java/lang/reflect/natArray.lo \
java/lang/reflect/natConstructor.lo \
java/lang/reflect/natField.lo java/lang/reflect/natMethod.lo \
java/net/natVMInetAddress.lo java/net/natVMNetworkInterface.lo \
@@ -383,8 +382,7 @@
java/text/natCollator.lo java/util/natVMTimeZone.lo \
java/util/concurrent/atomic/natAtomicLong.lo \
java/util/logging/natLogger.lo java/util/zip/natDeflater.lo \
- java/util/zip/natInflater.lo sun/misc/natUnsafe.lo \
- sun/reflect/natReflection.lo
+ java/util/zip/natInflater.lo sun/misc/natUnsafe.lo
@USING_BOEHMGC_TRUE@am__objects_3 = boehm.lo
@USING_NOGC_TRUE@am__objects_4 = nogc.lo
@USING_POSIX_PLATFORM_TRUE@am__objects_5 = posix.lo
@@ -980,7 +978,7 @@
classpath/gnu/CORBA/NamingService/NamingMap.java \
classpath/gnu/CORBA/NamingService/NamingServiceTransient.java \
classpath/gnu/CORBA/NamingService/TransientContext.java \
-gnu/CORBA/ObjectCreator.java \
+classpath/gnu/CORBA/ObjectCreator.java \
classpath/gnu/CORBA/OctetHolder.java \
classpath/gnu/CORBA/OrbFocused.java \
classpath/gnu/CORBA/OrbFunctional.java \
@@ -4082,7 +4080,7 @@
classpath/java/lang/RuntimeException.java \
classpath/java/lang/RuntimePermission.java \
classpath/java/lang/SecurityException.java \
-java/lang/SecurityManager.java \
+classpath/java/lang/SecurityManager.java \
classpath/java/lang/Short.java \
classpath/java/lang/StackOverflowError.java \
classpath/java/lang/StackTraceElement.java \
@@ -4107,7 +4105,6 @@
java/lang/VMCompiler.java \
java/lang/VMDouble.java \
java/lang/VMFloat.java \
-java/lang/VMSecurityManager.java \
java/lang/VMThrowable.java \
classpath/java/lang/VerifyError.java \
classpath/java/lang/VirtualMachineError.java \
@@ -5157,7 +5154,7 @@
classpath/javax/naming/spi/DirectoryManager.java \
classpath/javax/naming/spi/InitialContextFactory.java \
classpath/javax/naming/spi/InitialContextFactoryBuilder.java \
-javax/naming/spi/NamingManager.java \
+classpath/javax/naming/spi/NamingManager.java \
classpath/javax/naming/spi/ObjectFactory.java \
classpath/javax/naming/spi/ObjectFactoryBuilder.java \
classpath/javax/naming/spi/ResolveResult.java \
@@ -7635,7 +7632,6 @@
java/lang/natThread.cc \
java/lang/natThreadLocal.cc \
java/lang/natVMClassLoader.cc \
-java/lang/natVMSecurityManager.cc \
java/lang/natVMThrowable.cc \
java/lang/ref/natReference.cc \
java/lang/reflect/natArray.cc \
@@ -7655,8 +7651,7 @@
java/util/logging/natLogger.cc \
java/util/zip/natDeflater.cc \
java/util/zip/natInflater.cc \
-sun/misc/natUnsafe.cc \
-sun/reflect/natReflection.cc
+sun/misc/natUnsafe.cc
xlib_nat_source_files = \
gnu/gcj/xlib/natClip.cc \
@@ -8140,8 +8135,6 @@
java/lang/$(DEPDIR)/$(am__dirstamp)
java/lang/natVMClassLoader.lo: java/lang/$(am__dirstamp) \
java/lang/$(DEPDIR)/$(am__dirstamp)
-java/lang/natVMSecurityManager.lo: java/lang/$(am__dirstamp) \
- java/lang/$(DEPDIR)/$(am__dirstamp)
java/lang/natVMThrowable.lo: java/lang/$(am__dirstamp) \
java/lang/$(DEPDIR)/$(am__dirstamp)
java/lang/ref/$(am__dirstamp):
@@ -8257,14 +8250,6 @@
@: > sun/misc/$(DEPDIR)/$(am__dirstamp)
sun/misc/natUnsafe.lo: sun/misc/$(am__dirstamp) \
sun/misc/$(DEPDIR)/$(am__dirstamp)
-sun/reflect/$(am__dirstamp):
- @$(mkdir_p) sun/reflect
- @: > sun/reflect/$(am__dirstamp)
-sun/reflect/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) sun/reflect/$(DEPDIR)
- @: > sun/reflect/$(DEPDIR)/$(am__dirstamp)
-sun/reflect/natReflection.lo: sun/reflect/$(am__dirstamp) \
- sun/reflect/$(DEPDIR)/$(am__dirstamp)
java/lang/Object.lo: java/lang/$(am__dirstamp) \
java/lang/$(DEPDIR)/$(am__dirstamp)
libgcj.la: $(libgcj_la_OBJECTS) $(libgcj_la_DEPENDENCIES)
@@ -8558,8 +8543,6 @@
-rm -f java/lang/natThreadLocal.lo
-rm -f java/lang/natVMClassLoader.$(OBJEXT)
-rm -f java/lang/natVMClassLoader.lo
- -rm -f java/lang/natVMSecurityManager.$(OBJEXT)
- -rm -f java/lang/natVMSecurityManager.lo
-rm -f java/lang/natVMThrowable.$(OBJEXT)
-rm -f java/lang/natVMThrowable.lo
-rm -f java/lang/ref/natReference.$(OBJEXT)
@@ -8600,8 +8583,6 @@
-rm -f java/util/zip/natInflater.lo
-rm -f sun/misc/natUnsafe.$(OBJEXT)
-rm -f sun/misc/natUnsafe.lo
- -rm -f sun/reflect/natReflection.$(OBJEXT)
- -rm -f sun/reflect/natReflection.lo
distclean-compile:
-rm -f *.tab.c
@@ -8709,7 +8690,6 @@
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natThread.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natThreadLocal.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natVMClassLoader.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natVMSecurityManager.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natVMThrowable.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/management/$(DEPDIR)/natVMManagementFactory.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/lang/ref/$(DEPDIR)/natReference.Plo@am__quote@
@@ -8731,7 +8711,6 @@
@AMDEP_TRUE@@am__include@ @am__quote@java/util/zip/$(DEPDIR)/natDeflater.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/util/zip/$(DEPDIR)/natInflater.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sun/misc/$(DEPDIR)/natUnsafe.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sun/reflect/$(DEPDIR)/natReflection.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \
@@ -8980,7 +8959,6 @@
-rm -rf java/util/logging/.libs java/util/logging/_libs
-rm -rf java/util/zip/.libs java/util/zip/_libs
-rm -rf sun/misc/.libs sun/misc/_libs
- -rm -rf sun/reflect/.libs sun/reflect/_libs
distclean-libtool:
-rm -f libtool
@@ -9402,8 +9380,6 @@
-rm -f java/util/zip/$(am__dirstamp)
-rm -f sun/misc/$(DEPDIR)/$(am__dirstamp)
-rm -f sun/misc/$(am__dirstamp)
- -rm -f sun/reflect/$(DEPDIR)/$(am__dirstamp)
- -rm -f sun/reflect/$(am__dirstamp)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@@ -9417,7 +9393,7 @@
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf ./$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/classpath/jdwp/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/jvmti/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/lang/management/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/management/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/security/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/concurrent/atomic/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR) sun/misc/$(DEPDIR) sun/reflect/$(DEPDIR)
+ -rm -rf ./$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/classpath/jdwp/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/jvmti/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/lang/management/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/management/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/security/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/concurrent/atomic/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR) sun/misc/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-local distclean-tags
@@ -9450,7 +9426,7 @@
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf ./$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/classpath/jdwp/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/jvmti/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/lang/management/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/management/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/security/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/concurrent/atomic/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR) sun/misc/$(DEPDIR) sun/reflect/$(DEPDIR)
+ -rm -rf ./$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/classpath/jdwp/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/jvmti/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/lang/management/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/management/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/security/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/concurrent/atomic/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR) sun/misc/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-04 16:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-04 16:24 [ecj] VMStackWalker merges Gary Benson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).