Skip to content

Commit

Permalink
Automation: Fix GUI NPE if tech not specified.
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Bennetts <[email protected]>
  • Loading branch information
psiinon committed Aug 30, 2024
1 parent c0f28a7 commit c80f304
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions addOns/automation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Added
- Allow to configure the structural parameters of a context (Issue 7780).

### Fixed
- NPE in GUI if the technology was not specified.

### Changed
- Rely on Passive Scanner add-on for the passive scan related jobs (Issue 7959).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,19 @@ public void save() {
this.context.setUrls(stringParamToList(URLS_PARAM));
this.context.setIncludePaths(stringParamToList(INCLUDE_PARAM));
this.context.setExcludePaths(stringParamToList(EXCLUDE_PARAM));
this.context
.getTechnology()
.setExclude(
TechnologyUtils.techSetToExcludeList(
this.getTechnologyPanel().getTechSet()));

TechnologyData tech = this.context.getTechnology();
List<String> excludeTech =
TechnologyUtils.techSetToExcludeList(this.getTechnologyPanel().getTechSet());
if (tech == null && excludeTech.size() == 0) {
// Can ignore
} else {
if (tech == null) {
tech = new TechnologyData();
}
tech.setExclude(excludeTech);
this.context.setTechnology(tech);
}
context.setStructure(getStructurePanel().getStructure());
if (this.isNew) {
envDialog.addContext(context);
Expand Down

0 comments on commit c80f304

Please sign in to comment.