Skip to content

Commit

Permalink
Merge pull request #8 from ShiftLeftSecurity/max/saferDependencyNodes
Browse files Browse the repository at this point in the history
Safer NewDependency node creation
  • Loading branch information
max-leuthaeuser authored Sep 1, 2021
2 parents 02c8874 + fc4fc0d commit f9755fb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ class AstNodeBuilder[NodeBuilderType](private val diffGraph: DiffGraph.Builder,

def createDependencyNode(name: String, groupId: String, version: String): NewDependency = {
val dependency = NewDependency()
.version(version)
.name(name)
.dependencyGroupId(Some(groupId))
.name(Option(name).getOrElse("<n/a>"))
.dependencyGroupId(Option(groupId).getOrElse("<n/a>"))
.version(Option(version).getOrElse("<n/a>"))
.build
diffGraph.addNode(dependency)
dependency
Expand Down

0 comments on commit f9755fb

Please sign in to comment.