Do not use the setJMSPriority() method that was removed

This rule flags the use of the deprecated method setJMSPriority from the com.ibm.websphere.scheduler.MessageTaskInfo interface. This method is no longer available with no parameters. The method can be detected if it is declared or if it is invoked.

Method Declaration Detection:

1. The class must implement the interface com.ibm.websphere.scheduler.MessageTaskInfo

2. The setJMSPriority method is implemented.

Example 1:

public class MyMessageTaskInfo implements MessagTaskInfo {
public int setJMSPriority(){
// some code
return anInt;
}
}

The setJMSPriority() method in Example 1 will be flagged.

Method Invocation Detection:

1. The object of the invocation must implement the interface com.ibm.websphere.scheduler.MessageTaskInfo

2. The method is referenced by the interface name.

Example 2:

public class MyClass implements MessageTaskInfo {
// some code
...
}

MessageTaskInfo obj = new MyClass();
obj.setJMSPriority();

The obj.setJMSPriority invocation in Example 2 will be flagged.

The documentation has a detailed list, go to the Deprecated features article and select Features deprecated in Version 5.0.2.