GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [apex] New Rule: Invocable Classes require a no argument constructor · Issue #6793 · pmd/pmd Closed Labels a:new-ruleProposal to add a new built-in rule Milestone DescriptionProposed Rule Name: InvocableClassNoArgConstructor Proposed Category: Error Prone Description: Global classes have an additional requirement: the no-arg constructor must be Summer '26 Release Note: Provide Visible No-Argument Constructors for Custom Apex Classes Used as Invocable Action Parameters Code Sample: // BAD: explicit constructor eliminates the default constructor; // Flow cannot instantiate this class at runtime public class FlowInput { @InvocableVariable public String recordId; public FlowInput(String recordId) { this.recordId = recordId; } } // BAD (global class): no-arg constructor is not global; // cross-package Flows cannot instantiate this class global class FlowInput { @InvocableVariable global String recordId; private FlowInput() {} public FlowInput(String recordId) { this.recordId = recordId; } } // GOOD: explicit no-arg constructor restores Flow compatibility public class FlowInput { @InvocableVariable public String recordId; public FlowInput() {} public FlowInput(String recordId) { this.recordId = recordId; } } // GOOD (global class): global no-arg constructor is accessible from managed packages global class FlowInput { @InvocableVariable global String recordId; global FlowInput() {} global FlowInput(String recordId) { this.recordId = recordId; } } Possible Properties: No — the rule has a single clear failure condition (missing accessible no-arg constructor) with no thresholds or configurable behaviour warranted. Activity
MetadataMetadataAssigneesLabelsa:new-ruleProposal to add a new built-in rule TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |