Inspectopedia Help

Suspicious Hooks.onOperatorDebug() usage

Reports the usage of Hooks.onOperatorDebug() when ReactorDebugAgent.init() is called.

If ReactorDebugAgent is in the classpath, and spring.reactor.debug-agent.enabled is true (default value), ReactorDebugAgent.init() is called automatically at startup. Using both Hooks.onOperatorDebug() and ReactorDebugAgent.init() cause doubled debugging stack frames generated by Reactor. Also, Hooks.onOperatorDebug() can cause performance overhead.

The quick-fix removes the invocation of Hooks.onOperatorDebug().


public void hook() { Hooks.onOperatorDebug(); // Reports 'Call Hooks.onOperatorDebug() while ReactorDebugAgent is initialized' }

After the quick-fix is applied:

public void hook() { }

This inspection only triggers when Spring Boot version for the project or module is 2.2.0 or higher.

Inspection Details

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Spring Boot, 241.16690

Last modified: 29 April 2024