You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rules/S5384/apex/rule.adoc
+7-16Lines changed: 7 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ This rule raises an issue when a Trigger function contains one of the following
15
15
16
16
[source,apex]
17
17
----
18
-
trigger MyTrigger on Account(after insert, after update) { // Noncompliant. The trigger is processing records itself instead of using a Trigger Handler.
18
+
trigger MyTrigger on Account(after insert) { // Noncompliant. The trigger is processing records itself instead of using a Trigger Handler.
19
19
for(Account a : Trigger.New) {
20
20
// ...
21
21
}
@@ -27,27 +27,18 @@ trigger MyTrigger on Account(after insert, after update) { // Noncompliant. The
27
27
28
28
[source,apex]
29
29
----
30
+
// In your .cls file
30
31
public with sharing class AccountTriggerHandler {
31
-
public static void handleAfterEvents(List<Account> newAccounts, System.TriggerOperation triggerEvent) {
0 commit comments