Skip to content

Infinite Recursion in org.springframework.core.ResolvableType.hashCode(ResolvableType.java:692) [SPR-11219] #15844

@spring-projects-issues

Description

@spring-projects-issues

Russ Tennant opened SPR-11219 and commented

We're getting a StackOverflowError during dependency injection.

 
Caused by: java.lang.StackOverflowError
	at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:72)
	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.springframework.core.SerializableTypeWrapper$TypeProxyInvocationHandler.invoke(SerializableTypeWrapper.java:220)
	at com.sun.proxy.$Proxy4.hashCode(Unknown Source)
	at org.springframework.util.ObjectUtils.nullSafeHashCode(ObjectUtils.java:336)
	at org.springframework.core.ResolvableType.hashCode(ResolvableType.java:692)
	at org.springframework.util.ObjectUtils.nullSafeHashCode(ObjectUtils.java:336)
	at org.springframework.core.ResolvableType.hashCode(ResolvableType.java:693)

The class that is triggering the issue is ITableColumnScriptableType which has this hierarchy.

public class ITableColumnScriptableType extends JSR223LibraryType<ITableColumnScriptableType>

public abstract class JSR223LibraryType<LT extends JSR223LibraryType<LT>> extends AbstractLibraryType<LT>

public abstract class AbstractLibraryType<LT extends AbstractLibraryType<LT>> implements ILibraryType<LT>

public interface ILibraryType<LT extends ILibraryType<LT>>

This did not occur in version 3.2.5.

Attached is the error log from the StackOverflowError and a thread dump taken before the stack overflow.


Affects: 4.0 GA

Attachments:

Referenced from: commits 994efe4, aa2fadd

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions