8044063: Remove com.sun.java.browser.* from jdk repo
authormchung
Fri, 20 Jun 2014 13:36:03 -0700
changeset 25205 e07f924ea72d
parent 25204 65c62411e10f
child 25206 f1ed7d27ec7f
8044063: Remove com.sun.java.browser.* from jdk repo Reviewed-by: darcy, alanb
jdk/src/share/classes/com/sun/java/browser/dom/DOMAccessException.java
jdk/src/share/classes/com/sun/java/browser/dom/DOMAccessor.java
jdk/src/share/classes/com/sun/java/browser/dom/DOMAction.java
jdk/src/share/classes/com/sun/java/browser/dom/DOMService.java
jdk/src/share/classes/com/sun/java/browser/dom/DOMServiceProvider.java
jdk/src/share/classes/com/sun/java/browser/dom/DOMUnsupportedException.java
jdk/src/share/classes/com/sun/java/browser/net/ProxyInfo.java
jdk/src/share/classes/com/sun/java/browser/net/ProxyService.java
jdk/src/share/classes/com/sun/java/browser/net/ProxyServiceProvider.java
--- a/jdk/src/share/classes/com/sun/java/browser/dom/DOMAccessException.java	Fri Jun 20 12:37:08 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.java.browser.dom;
-
-@SuppressWarnings("serial") // JDK implementation class
-public class DOMAccessException extends Exception
-{
-    /**
-     * Constructs a new DOMAccessException with no detail message.
-     */
-    public DOMAccessException()
-    {
-        this(null, null);
-    }
-
-
-    /**
-     * Constructs a new DOMAccessException with the given detail message.
-     *
-     * @param msg Detail message.
-     */
-    public DOMAccessException(String msg)
-    {
-        this(null, msg);
-    }
-
-    /**
-     * Constructs a new DOMAccessException with the given exception as a root clause.
-     *
-     * @param e Exception.
-     */
-    public DOMAccessException(Exception e)
-    {
-        this(e, null);
-    }
-
-    /**
-     * Constructs a new DOMAccessException with the given exception as a root clause and the given detail message.
-     *
-     * @param e Exception.
-     * @param msg Detail message.
-     */
-    public DOMAccessException(Exception e, String msg)
-    {
-        this.ex = e;
-        this.msg = msg;
-    }
-
-    /**
-     * Returns the detail message of the error or null if there is no detail message.
-     */
-    public String getMessage()
-    {
-        return msg;
-    }
-
-    /**
-     * Returns the root cause of the error or null if there is none.
-     */
-    public Throwable getCause()
-    {
-        return ex;
-    }
-
-    private Throwable ex;
-    private String msg;
-}
--- a/jdk/src/share/classes/com/sun/java/browser/dom/DOMAccessor.java	Fri Jun 20 12:37:08 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.java.browser.dom;
-
-
-public interface DOMAccessor
-{
-    /**
-     * Returns the Document object of the DOM.
-     */
-    public org.w3c.dom.Document getDocument(Object obj) throws org.w3c.dom.DOMException;
-
-    /**
-     * Returns a DOMImplementation object.
-     */
-    public org.w3c.dom.DOMImplementation getDOMImplementation();
-}
--- a/jdk/src/share/classes/com/sun/java/browser/dom/DOMAction.java	Fri Jun 20 12:37:08 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.java.browser.dom;
-
-
-public interface DOMAction
-{
-    /**
-     * When an object implementing interface DOMAction is passed
-     * to DOMService.invokeAndWait() or DOMService.invokeLater(),
-     * run method is called in the DOM access dispatch thread.
-     *
-     * accessor is used for the DOMAction to access the entry point of
-     * the browser's DOM, if necessary.
-     *
-     * @param accessor DOMAccessor
-     */
-    public Object run(DOMAccessor accessor);
-}
--- a/jdk/src/share/classes/com/sun/java/browser/dom/DOMService.java	Fri Jun 20 12:37:08 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.java.browser.dom;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-public abstract class DOMService
-{
-    /**
-     * Returns new instance of a DOMService. The implementation
-     * of the DOMService returns depends on the setting of the
-     * com.sun.java.browser.dom.DOMServiceProvider property or,
-     * if the property is not set, a platform specific default.
-     *
-     * Throws DOMUnsupportedException if the DOMService is not
-     * available to the obj.
-     *
-     * @param obj Object to leverage the DOMService
-     */
-    public static DOMService getService(Object obj)
-                  throws DOMUnsupportedException
-    {
-        try
-        {
-            String provider = AccessController.doPrivileged(
-                (PrivilegedAction<String>) () ->
-                    System.getProperty("com.sun.java.browser.dom.DOMServiceProvider"));
-
-            Class clazz = Class.forName("sun.plugin.dom.DOMService");
-
-            return (DOMService) clazz.newInstance();
-        }
-        catch (Throwable e)
-        {
-            throw new DOMUnsupportedException(e.toString());
-        }
-    }
-
-    /**
-     * An empty constructor is provided. Implementations of this
-     * abstract class must provide a public no-argument constructor
-     * in order for the static getService() method to work correctly.
-     * Application programmers should not be able to directly
-     * construct implementation subclasses of this abstract subclass.
-     */
-    public DOMService()
-    {
-    }
-
-    /**
-     * Causes action.run() to be executed synchronously on the
-     * DOM action dispatching thread. This call will block until all
-     * pending DOM actions have been processed and (then)
-     * action.run() returns. This method should be used when an
-     * application thread needs to access the browser's DOM.
-     * It should not be called from the DOMActionDispatchThread.
-     *
-     * Note that if the DOMAction.run() method throws an uncaught
-     * exception (on the DOM action dispatching thread),  it's caught
-     * and re-thrown, as an DOMAccessException, on the caller's thread.
-     *
-     * If the DOMAction.run() method throws any DOM security related
-     * exception (on the DOM action dispatching thread), it's caught
-     * and re-thrown, as an DOMSecurityException, on the caller's thread.
-     *
-     * @param action DOMAction.
-     */
-    public abstract Object invokeAndWait(DOMAction action) throws DOMAccessException;
-
-    /**
-     * Causes action.run() to be executed asynchronously on the
-     * DOM action dispatching thread. This method should be used
-     * when an application thread needs to access the browser's
-     * DOM. It should not be called from the DOMActionDispatchThread.
-     *
-     * Note that if the DOMAction.run() method throws an uncaught
-     * exception (on the DOM action dispatching thread),  it will not be
-     * caught and re-thrown on the caller's thread.
-     *
-     * @param action DOMAction.
-     */
-    public abstract void invokeLater(DOMAction action);
-}
--- a/jdk/src/share/classes/com/sun/java/browser/dom/DOMServiceProvider.java	Fri Jun 20 12:37:08 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.java.browser.dom;
-
-public abstract class DOMServiceProvider
-{
-    /**
-     * An empty constructor is provided. Implementations should
-     * provide a public constructor so that the DOMService
-     * can instantiate instances of the implementation class.
-     * Application programmers should not be able to directly
-     * construct implementation subclasses of this abstract subclass.
-     * The only way an application should be able to obtain a
-     * reference to a DOMServiceProvider implementation
-     * instance is by using the appropriate methods of the
-     * DOMService.
-     */
-    public DOMServiceProvider()
-    {
-    }
-
-    /**
-     * Returns true if the DOMService can determine the association
-     * between the obj and the underlying DOM in the browser.
-     */
-    public abstract boolean canHandle(Object obj);
-
-    /**
-     * Returns the Document object of the DOM.
-     */
-    public abstract org.w3c.dom.Document getDocument(Object obj) throws DOMUnsupportedException;
-
-    /**
-     * Returns the DOMImplemenation object of the DOM.
-     */
-    public abstract org.w3c.dom.DOMImplementation getDOMImplementation();
-}
--- a/jdk/src/share/classes/com/sun/java/browser/dom/DOMUnsupportedException.java	Fri Jun 20 12:37:08 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.java.browser.dom;
-
-@SuppressWarnings("serial") // JDK implementation class
-public class DOMUnsupportedException extends Exception
-{
-    /**
-     * Constructs a new DOMUnsupportedException with no detail message.
-     */
-    public DOMUnsupportedException()
-    {
-        this(null, null);
-    }
-
-    /**
-     * Constructs a new DOMUnsupportedException with the given detail message.
-     *
-     * @param msg Detail message.
-     */
-    public DOMUnsupportedException(String msg)
-    {
-        this(null, msg);
-    }
-
-    /**
-     * Constructs a new DOMUnsupportedException with the given exception as a root clause.
-     *
-     * @param e Exception.
-     */
-    public DOMUnsupportedException(Exception e)
-    {
-        this(e, null);
-    }
-
-    /**
-     * Constructs a new DOMUnsupportedException with the given exception as a root clause and the given detail message.
-     *
-     * @param e Exception.
-     * @param msg Detail message.
-     */
-    public DOMUnsupportedException(Exception e, String msg)
-    {
-        this.ex = e;
-        this.msg = msg;
-    }
-
-    /**
-     * Returns the detail message of the error or null if there is no detail message.
-     */
-    public String getMessage()
-    {
-        return msg;
-    }
-
-    /**
-     * Returns the root cause of the error or null if there is none.
-     */
-    public Throwable getCause()
-    {
-        return ex;
-    }
-
-    private Throwable ex;
-    private String msg;
-}
--- a/jdk/src/share/classes/com/sun/java/browser/net/ProxyInfo.java	Fri Jun 20 12:37:08 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.java.browser.net;
-
-/**
- *
- * @author  Zhengyu Gu
- */
-public interface ProxyInfo {
-    public String   getHost();
-    public int      getPort();
-    public boolean  isSocks();
-}
--- a/jdk/src/share/classes/com/sun/java/browser/net/ProxyService.java	Fri Jun 20 12:37:08 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.java.browser.net;
-
-import java.net.URL;
-import java.io.IOException;
-
-/**
- *
- * @author  Zhengyu Gu
- */
-public class ProxyService extends Object {
-    private static ProxyServiceProvider provider = null;
-
-
-    public static void setProvider(ProxyServiceProvider p)
-    throws IOException {
-        if(null == provider)
-            provider = p;
-        else
-            throw new IOException("Proxy service provider has already been set.");
-    }
-
-
-    /**
-     *  <p>The function returns proxy information of the specified URL.</p>
-     *  @param url URL
-     *  @return returns proxy information. If there is not proxy, returns null
-     *  @since 1.4
-     */
-    public static ProxyInfo[] getProxyInfo(URL url)
-    throws IOException {
-        if(null == provider)
-            throw new IOException("Proxy service provider is not yet set");
-
-        return provider.getProxyInfo(url);
-    }
-}
--- a/jdk/src/share/classes/com/sun/java/browser/net/ProxyServiceProvider.java	Fri Jun 20 12:37:08 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.java.browser.net;
-
-import java.net.URL;
-
-/**
- *
- * @author  Zhengyu Gu
- */
-public interface ProxyServiceProvider {
-    public ProxyInfo[] getProxyInfo(URL url);
-}