此規則會標示下列已淘汰的方法:
- 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
清單位於說明文件中。