Skip to content

Commit

Permalink
Merge pull request #5687 from psiinon/auto/tech-npe
Browse files Browse the repository at this point in the history
Automation: Fix GUI NPE if tech not specified.
  • Loading branch information
thc202 authored Aug 30, 2024
2 parents c0f28a7 + c80f304 commit 0c5252a
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 0c5252a

Please sign in to comment.