- changed status to open
Wrong Implementing Methods
Issue #2375
resolved
Hi Scott, we have a following abstract class in our code base. And when we extend it and try to automatically implement methods. The generated methods are wrong and not deployable.
public abstract inherited sharing class ChainableAdapter implements Queueable, Finalizer {
ChainableAdapter next;
public void chain(ChainableAdapter next) {
if (this.next == null) {
this.next = next;
} else {
this.next.chain(next);
}
}
public void execute(QueueableContext param1) {
execute();
System.attachFinalizer(this);
}
abstract void execute();
public void execute(FinalizerContext param1) {
if (this.next != null) {
System.enqueueJob(this.next);
}
}
}
This generates the following method signature
public with sharing class TestChainable2 extends ChainableAdapter {
protected override void execute() {
}
}
But it actually should be this
public with sharing class TestChainable2 extends ChainableAdapter {
void execute() {
}
}
Comments (3)
-
repo owner -
repo owner Thanks for reporting. Fortunately a pretty simple fix:
I’ll plan to include this in Monday’s Summer '23 build.
-
repo owner - changed status to resolved
Delivered in 2.2.7.2.
- Log in to comment