此规则会标记下列不推荐的方法:
CommandMgrInitializer 方法在 WebSphere Application Server V6.0 中已不推荐使用,并且 CommandMgr 方法在 V7.0 中已不推荐使用。 它们可能会在将来发行版中移除。
对于所有四个方法,请改用 CommandMgr.getCommandMgr(AdminClient)。
在源扫描程序中,快速修订将不推荐的方法更改为首选方法。 如果要导入 com.ibm.websphere.management.cmdframework.CommandMgr 类,那么快速修订将在替换方法中使用简单类名 (CommandMgr)。 如果未找到 import,那么将使用标准名称 (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 com.ibm.websphere.management.cmdframework.CommandMgrInitializer;
public class MyClass { // some code com.ibm.websphere.management.cmdframework.CommandMgr.getCommandMgr(); // some code } |
有关更多类信息,请参阅 Knowledge Center 中的下列内容:
文档中包含完整的 不推荐使用的 API 列表。