此規則會標示下列已淘汰的方法:
- com.ibm.websphere.management.cmdframework.CommandMgrInitializer.initializeClientMode(AdminClient)
- com.ibm.websphere.management.cmdframework.CommandMgrInitializer.initializeLocalMode()
- com.ibm.websphere.management.cmdframework.CommandMgrInitializer.initializeServerMode()
- com.ibm.websphere.management.cmdframework.CommandMgr.getClientCommandMgr(AdminClient)
該
CommandMgrInitializer
方法在 WebSphere Application Server 6.0版中已淘汰,且
CommandMgr
方法在 7.0版中已淘汰。
它們可能在將來的版本中移除。
對於所有四種方法,請使用
CommandMgr.getCommandMgr(AdminClient)
而是。
在原始檔掃描器中,快速修正程式會將已淘汰的方法變更為偏好的方法。
如果有類別的匯入項目
com.ibm.websphere.management.cmdframework.CommandMgr
,則快速修正程式會在取代中使用簡式類別名稱 (CommandMgr)。
如果找不到匯入項目,就會使用完整名稱 (com.ibm.websphere.management.cmdframework.CommandMgr)。
範例:
import com.ibm.websphere.management.cmdframework.*;
public class MyClass {
// some code
CommandMgrInitializer.initializeLocalMode();
// some code
}
前述範例將變更成:
import com.ibm.websphere.management.cmdframework.*;
public class MyClass {
// some code
CommandMgr.getCommandMgr();
// some code
}
如果,則前述範例中的 import 陳述式為:
import com.ibm.websphere.management.cmdframework.CommandMgrInitializer;
則更新的程式碼將為:
import com.ibm.websphere.management.cmdframework.CommandMgrInitializer;
public class MyClass {
// some code
com.ibm.websphere.management.cmdframework.CommandMgr.getCommandMgr();
// some code
}
如需類別的相關資訊,請參閱
在 說明文件中。
完整
已淘汰的 API
清單位於說明文件中。