Replies: 1 comment 1 reply
-
@rmccu I prefer the massive blocks of code, instead of trying to dynamically loop through the schema. The code blocks are fairly easy to read (since each line is just mapping 1 field from
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
NebulaLogger/nebula-logger/core/main/log-management/classes/LogEntryEventHandler.cls
Line 162 in 3b04138
Rather than have these massive blocks of code that are basically copying the attributes, it seems like we could read the fields from schema and then loop through them. In the for loop you could have a check to process specific fields in special ways, otherwise just copy the data over referencing the fields using get/set methods. This would remove a lot of lines of code, and make this more resilient so that if you added a new field in the future you wouldn't need to update this code unless you wanted to handle it special.
Beta Was this translation helpful? Give feedback.
All reactions