13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* @test 25 * @bug 4137605 26 * @summary When the RMIClassLoader.getClassAnnotation() is called with a 27 * class loaded from any URLClassLoader instance (not just those created for 28 * internal use by the RMI runtime), then it should return a String containing 29 * a space-separated list of the class loader's path of URLs. 30 * @author Peter Jones 31 * 32 * @library ../../../testlibrary 33 * @build TestLibrary Dummy 34 * @run main/othervm/policy=security.policy/timeout=120 UseGetURLs 35 */ 36 37 import java.io.*; 38 import java.net.*; 39 import java.util.*; 40 import java.rmi.*; 41 import java.rmi.server.*; 42 43 public class UseGetURLs { 44 45 public static void main(String[] args) { 46 47 System.err.println("\nRegression test for bug 4137605\n"); 48 49 TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager"); 50 System.err.println("Security manager: " + 51 System.getSecurityManager().getClass().getName()); 52 | 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* @test 25 * @bug 4137605 26 * @summary When the RMIClassLoader.getClassAnnotation() is called with a 27 * class loaded from any URLClassLoader instance (not just those created for 28 * internal use by the RMI runtime), then it should return a String containing 29 * a space-separated list of the class loader's path of URLs. 30 * @author Peter Jones 31 * 32 * @library ../../../testlibrary 33 * @modules java.rmi/sun.rmi.registry 34 * java.rmi/sun.rmi.server 35 * java.rmi/sun.rmi.transport 36 * java.rmi/sun.rmi.transport.tcp 37 * @build TestLibrary Dummy 38 * @run main/othervm/policy=security.policy/timeout=120 UseGetURLs 39 */ 40 41 import java.io.*; 42 import java.net.*; 43 import java.util.*; 44 import java.rmi.*; 45 import java.rmi.server.*; 46 47 public class UseGetURLs { 48 49 public static void main(String[] args) { 50 51 System.err.println("\nRegression test for bug 4137605\n"); 52 53 TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager"); 54 System.err.println("Security manager: " + 55 System.getSecurityManager().getClass().getName()); 56 |