Skip to content

Fail with a clear message for a @ProfileConnection stackDepth below -1 - #292

Merged
jeanbisutti merged 1 commit into
quick-perf:masterfrom
jeanbisutti:fix-profile-connection-negative-stack-depth
Oct 20, 2026
Merged

jeanbisutti merged 1 commit into
quick-perf:masterfrom
jeanbisutti:fix-profile-connection-negative-stack-depth

Conversation

@jeanbisutti

Copy link
Copy Markdown
Collaborator

With @ProfileConnection(displayStackTrace = true, stackDepth = -2), or any other stackDepth below -1, the user's own JDBC call threw an IllegalArgumentException whose message says nothing about the annotation.

For example:

java.lang.IllegalArgumentException: 7 > 5
	at java.base/java.util.Arrays.copyOfRange(Arrays.java:3782)
	at org.quickperf.sql.connection.stack.StackTrace.getElements(StackTrace.java:62)
	at org.quickperf.sql.connection.stack.StackTraceDisplayConfig.format(StackTraceDisplayConfig.java:43)
	at org.quickperf.sql.connection.ConnectionProfiler.printStackTrace(ConnectionProfiler.java:66)
	...
	at org.quickperf.sql.config.library.QuickPerfProxyDataSource.getConnection(QuickPerfProxyDataSource.java:27)
	...
	at SqlTestBase.getConnection(SqlTestBase.java:80)

@jeanbisutti
jeanbisutti merged commit bb00ee4 into quick-perf:master Oct 20, 2026
6 checks passed
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