From e4db9235e4f6d22ec0a983c4fee4779d2c576efa Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Fri, 20 Jun 2014 13:36:03 -0700 Subject: [PATCH] 8044063: Remove com.sun.java.browser.* from jdk repo Reviewed-by: darcy, alanb --- .../java/browser/dom/DOMAccessException.java | 90 --------------- .../com/sun/java/browser/dom/DOMAccessor.java | 40 ------- .../com/sun/java/browser/dom/DOMAction.java | 42 ------- .../com/sun/java/browser/dom/DOMService.java | 107 ------------------ .../java/browser/dom/DOMServiceProvider.java | 60 ---------- .../browser/dom/DOMUnsupportedException.java | 89 --------------- .../com/sun/java/browser/net/ProxyInfo.java | 36 ------ .../sun/java/browser/net/ProxyService.java | 61 ---------- .../browser/net/ProxyServiceProvider.java | 36 ------ 9 files changed, 561 deletions(-) delete mode 100644 jdk/src/share/classes/com/sun/java/browser/dom/DOMAccessException.java delete mode 100644 jdk/src/share/classes/com/sun/java/browser/dom/DOMAccessor.java delete mode 100644 jdk/src/share/classes/com/sun/java/browser/dom/DOMAction.java delete mode 100644 jdk/src/share/classes/com/sun/java/browser/dom/DOMService.java delete mode 100644 jdk/src/share/classes/com/sun/java/browser/dom/DOMServiceProvider.java delete mode 100644 jdk/src/share/classes/com/sun/java/browser/dom/DOMUnsupportedException.java delete mode 100644 jdk/src/share/classes/com/sun/java/browser/net/ProxyInfo.java delete mode 100644 jdk/src/share/classes/com/sun/java/browser/net/ProxyService.java delete mode 100644 jdk/src/share/classes/com/sun/java/browser/net/ProxyServiceProvider.java diff --git a/jdk/src/share/classes/com/sun/java/browser/dom/DOMAccessException.java b/jdk/src/share/classes/com/sun/java/browser/dom/DOMAccessException.java deleted file mode 100644 index 77307d834f5..00000000000 --- a/jdk/src/share/classes/com/sun/java/browser/dom/DOMAccessException.java +++ /dev/null @@ -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; -} diff --git a/jdk/src/share/classes/com/sun/java/browser/dom/DOMAccessor.java b/jdk/src/share/classes/com/sun/java/browser/dom/DOMAccessor.java deleted file mode 100644 index 6435be4e705..00000000000 --- a/jdk/src/share/classes/com/sun/java/browser/dom/DOMAccessor.java +++ /dev/null @@ -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(); -} diff --git a/jdk/src/share/classes/com/sun/java/browser/dom/DOMAction.java b/jdk/src/share/classes/com/sun/java/browser/dom/DOMAction.java deleted file mode 100644 index 8e8e4e420c1..00000000000 --- a/jdk/src/share/classes/com/sun/java/browser/dom/DOMAction.java +++ /dev/null @@ -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); -} diff --git a/jdk/src/share/classes/com/sun/java/browser/dom/DOMService.java b/jdk/src/share/classes/com/sun/java/browser/dom/DOMService.java deleted file mode 100644 index 9a418cf5edc..00000000000 --- a/jdk/src/share/classes/com/sun/java/browser/dom/DOMService.java +++ /dev/null @@ -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) () -> - 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); -} diff --git a/jdk/src/share/classes/com/sun/java/browser/dom/DOMServiceProvider.java b/jdk/src/share/classes/com/sun/java/browser/dom/DOMServiceProvider.java deleted file mode 100644 index 8cd7aa1e3a8..00000000000 --- a/jdk/src/share/classes/com/sun/java/browser/dom/DOMServiceProvider.java +++ /dev/null @@ -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(); -} diff --git a/jdk/src/share/classes/com/sun/java/browser/dom/DOMUnsupportedException.java b/jdk/src/share/classes/com/sun/java/browser/dom/DOMUnsupportedException.java deleted file mode 100644 index 2796339f39a..00000000000 --- a/jdk/src/share/classes/com/sun/java/browser/dom/DOMUnsupportedException.java +++ /dev/null @@ -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; -} diff --git a/jdk/src/share/classes/com/sun/java/browser/net/ProxyInfo.java b/jdk/src/share/classes/com/sun/java/browser/net/ProxyInfo.java deleted file mode 100644 index f966e813591..00000000000 --- a/jdk/src/share/classes/com/sun/java/browser/net/ProxyInfo.java +++ /dev/null @@ -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(); -} diff --git a/jdk/src/share/classes/com/sun/java/browser/net/ProxyService.java b/jdk/src/share/classes/com/sun/java/browser/net/ProxyService.java deleted file mode 100644 index b4960905fda..00000000000 --- a/jdk/src/share/classes/com/sun/java/browser/net/ProxyService.java +++ /dev/null @@ -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."); - } - - - /** - *

The function returns proxy information of the specified URL.

- * @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); - } -} diff --git a/jdk/src/share/classes/com/sun/java/browser/net/ProxyServiceProvider.java b/jdk/src/share/classes/com/sun/java/browser/net/ProxyServiceProvider.java deleted file mode 100644 index df4513a34a0..00000000000 --- a/jdk/src/share/classes/com/sun/java/browser/net/ProxyServiceProvider.java +++ /dev/null @@ -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); -}