⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dispatchnullprogramid.java

📁 java 与COM组件的连接桥
💻 JAVA
字号:
package com.jacob.com;

/**
 * This test verifies that the Dispatch object protects itself when
 * the constructor is called with a null program id.
 * Prior to this protection, the VM might crash.m
 * @author joe
 *
 */
public class DispatchNullProgramId {

	public static void main(String[] args) {
		try {
			String nullParam = null;
			new Dispatch(nullParam);
			System.out.println(
					"the dispatch failed to protect itself from null program ids");
		} catch (IllegalArgumentException iae){
			System.out.println(
					"the dispatch protected itself from null program ids");
		}
		try {
			String nullParam = "";
			new Dispatch(nullParam);
			System.out.println(
			"the dispatch failed to protect itself from empty string program ids");
		} catch (IllegalArgumentException iae){
			System.out.println(
					"the dispatch protected itself from empty string program ids");
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -