Skip to content

Conversation

ricekot
Copy link
Contributor

@ricekot ricekot commented Jan 15, 2025

CPG generation for enum classes fails with the following error when keepTypeArguments is enabled. I couldn't get to the bottom of the issue but I've added a unit test in this PR to reproduce the error.

java.lang.RuntimeException: SOE getting binding table for Color
	at io.joern.javasrc2cpg.util.BindingTable$.createBindingTable$$anonfun$2(BindingTable.scala:68) ~[classes/:?]
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) ~[scala3-library_3-3.5.2.jar:3.5.2]
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) ~[scala3-library_3-3.5.2.jar:3.5.2]
	at scala.collection.immutable.List.foreach(List.scala:334) ~[scala-library-2.13.14.jar:?]
	at io.joern.javasrc2cpg.util.BindingTable$.createBindingTable(BindingTable.scala:62) ~[classes/:?]
	at io.joern.javasrc2cpg.astcreation.AstCreator.getMultiBindingTable$$anonfun$1(AstCreator.scala:328) ~[classes/:?]
	at scala.collection.mutable.HashMap.getOrElseUpdate(HashMap.scala:469) ~[scala-library-2.13.14.jar:?]
	at io.joern.javasrc2cpg.astcreation.AstCreator.getMultiBindingTable(AstCreator.scala:329) ~[classes/:?]
	at io.joern.javasrc2cpg.astcreation.AstCreator.getBindingTable(AstCreator.scala:334) ~[classes/:?]
...

@ricekot ricekot force-pushed the javasrc2cpg/keep-type-args-enums branch from 4d07cab to 973aeda Compare January 15, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant