This rule flags the following deprecated methods:
- 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)
The
CommandMgrInitializer
methods were deprecated in WebSphere Application Server Version 6.0,
and the
CommandMgr
method was deprecated in Version 7.0.
They might be removed in a future release.
For all four methods, use
CommandMgr.getCommandMgr(AdminClient)
instead.
The automated fix will change the deprecated methods to the preferred method.
If there is an import for the class
com.ibm.websphere.management.cmdframework.CommandMgr
,
then the automated fix will use the simple class name (CommandMgr) in the replacement.
If no import is found,
the fully qualified name (com.ibm.websphere.management.cmdframework.CommandMgr) is used.
Example:
import com.ibm.websphere.management.cmdframework.*;
public class MyClass {
// some code
CommandMgrInitializer.initializeLocalMode();
// some code
}
The preceding example will be changed to:
import com.ibm.websphere.management.cmdframework.*;
public class MyClass {
// some code
CommandMgr.getCommandMgr();
// some code
}
If, the import statement in the preceding example was:
import com.ibm.websphere.management.cmdframework.CommandMgrInitializer;
then the updated code will be:
import com.ibm.websphere.management.cmdframework.CommandMgrInitializer;
public class MyClass {
// some code
com.ibm.websphere.management.cmdframework.CommandMgr.getCommandMgr();
// some code
}
For more class information, see the
in the documentation.
The full
Deprecated API
list is in the documentation.