< prev index next >

jdk/test/javax/management/remote/mandatory/loading/DeserializeEncodedURLTest.java

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  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 /*
  25  * @test
  26  * @bug 4924683
  27  * @summary Check RMI/JRMP stubs can be deserialized using user's loader
  28  * @author Eamonn McManus
  29  * @modules java.management
  30  * @run clean DeserializeEncodedURLTest SingleClassLoader
  31  * @run build DeserializeEncodedURLTest SingleClassLoader
  32  * @run main DeserializeEncodedURLTest
  33  */
  34 
  35 import java.io.*;
  36 import java.rmi.*;
  37 import java.util.*;
  38 import javax.management.*;
  39 import javax.management.remote.*;
  40 import javax.management.remote.rmi.*;
  41 
  42 /*
  43   Test that the RMI connector client can handle a URL of the form
  44   where the serialized RMIServer stub is encoded directly in the URL,
  45   when the class of that stub is known to the supplied
  46   DEFAULT_CLASS_LOADER but not to the calling code's class loader.
  47   This is an unusual usage, and is not explicitly specified in the JMX
  48   Remote API, but it is potentially useful where client and server
  49   agree to a code base for mutant stubs (that e.g. use a different




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  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 /*
  25  * @test
  26  * @bug 4924683
  27  * @summary Check RMI/JRMP stubs can be deserialized using user's loader
  28  * @author Eamonn McManus
  29  * @modules java.management.rmi
  30  * @run clean DeserializeEncodedURLTest SingleClassLoader
  31  * @run build DeserializeEncodedURLTest SingleClassLoader
  32  * @run main DeserializeEncodedURLTest
  33  */
  34 
  35 import java.io.*;
  36 import java.rmi.*;
  37 import java.util.*;
  38 import javax.management.*;
  39 import javax.management.remote.*;
  40 import javax.management.remote.rmi.*;
  41 
  42 /*
  43   Test that the RMI connector client can handle a URL of the form
  44   where the serialized RMIServer stub is encoded directly in the URL,
  45   when the class of that stub is known to the supplied
  46   DEFAULT_CLASS_LOADER but not to the calling code's class loader.
  47   This is an unusual usage, and is not explicitly specified in the JMX
  48   Remote API, but it is potentially useful where client and server
  49   agree to a code base for mutant stubs (that e.g. use a different


< prev index next >