SED-4770 handle more keyword types#659
Conversation
|
Will add some unit tests for jmeter and node keywords |
There was a problem hiding this comment.
Code Review
This pull request refactors the automation package collections and fragment management to use a generic, mapper-based architecture, replacing specific collection classes with a single generic AutomationPackageCollection that dynamically scans and utilizes business-object-to-YAML mappers. The review feedback focuses on improving robustness and type safety, recommending defensive null checks in AutomationPackageYamlFragmentManager and CompositeFunctionToYamlMapper to prevent potential NullPointerExceptions, avoiding unsafe casting in AbstractAutomationPackageFragmentYaml, and correcting a typo in a base mapper method name.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| YamlPlan plan = planReader.planToYamlPlan(compositeFunction.getPlan()); | ||
| plan.setName(null); | ||
| yamlComposite.setPlan(plan); |
There was a problem hiding this comment.
If compositeFunction.getPlan() is null, planReader.planToYamlPlan(null) might return null. Calling plan.setName(null) on a null plan will result in a NullPointerException. Adding a defensive null check for plan prevents this potential crash.
| YamlPlan plan = planReader.planToYamlPlan(compositeFunction.getPlan()); | |
| plan.setName(null); | |
| yamlComposite.setPlan(plan); | |
| YamlPlan plan = planReader.planToYamlPlan(compositeFunction.getPlan()); | |
| if (plan != null) { | |
| plan.setName(null); | |
| } | |
| yamlComposite.setPlan(plan); |
No description provided.