File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
joern-cli/frontends/x2cpg/src/main/scala/io/joern/x2cpg/passes/controlflow/codepencegraph Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -44,11 +44,17 @@ class CdgPass(cpg: Cpg) extends ForkJoinParallelCpgPass[Method](cpg) {
4444 val containsIn = postDomFrontierNode._containsIn
4545 // duplicate check looks (and is) superfluous, but it's a fastpath micro optimization
4646 if (hasLogged.get() > 0 && hasLogged.decrementAndGet() > 0 ) {
47- val method = containsIn.nextOption().map(_.toString).getOrElse(" N/A" )
47+ val method = containsIn
48+ .nextOption()
49+ .map {
50+ case method : Method => method.fullName
51+ case other => other.toString
52+ }
53+ .getOrElse(" N/A" )
4854 logger.warn(
49- s " Found CDG edge starting at $nodeLabel node $node < -> ${postDomFrontierNode} . This is most likely caused by an invalid CFG. " +
50- s " Method: ${ method} " +
51- s " number of outgoing CFG edges from $nodeLabel node: ${postDomFrontierNode._cfgOut.size}"
55+ s """ | Found CDG edge starting at $nodeLabel node $postDomFrontierNode -> $node .
56+ |This is most likely caused by an invalid CFG in method $method .
57+ |Number of outgoing CFG edges from $nodeLabel node: ${postDomFrontierNode._cfgOut.size}""" .stripMargin
5258 )
5359 }
5460 }
You can’t perform that action at this time.
0 commit comments