Skip to content

StackOverflow Error during Symbol resolution in JavaParser #137

Open
@rahlk

Description

@rahlk

Describe the bug
When analyzing Java projects JavaParser's ReflectionTypeSolver, a StackOverflowError is thrown.

To Reproduce
Steps to reproduce the behavior:

  1. Clone fastjson2
  2. Run java -jar build/libs/codeanalyzer-2.3.4.jar --input /path/to/fastjson2
  3. Observe StackOverflowError during interface resolution

Expected behavior
Analysis level 1 should complete or gracefully proceed without causing a StackOverflowError.

Logs

Exception in thread "main" java.lang.StackOverflowError
	at com.github.javaparser.symbolsolver.reflectionmodel.ReflectionFactory.typeUsageFor(ReflectionFactory.java:73)
	at com.github.javaparser.symbolsolver.reflectionmodel.ReflectionClassAdapter.lambda$getInterfaces$1(ReflectionClassAdapter.java:79)
	... (recurses into getAncestors and getAllFields repeatedly)

Additional context
N/A

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions