Skip to content

Fix global annotations ignored when the class path contains a plus sign - #291

Merged
jeanbisutti merged 1 commit into
quick-perf:masterfrom
jeanbisutti:fix-global-annotations-plus-sign-in-class-path
Oct 20, 2026
Merged

jeanbisutti merged 1 commit into
quick-perf:masterfrom
jeanbisutti:fix-global-annotations-plus-sign-in-class-path

Conversation

@jeanbisutti

Copy link
Copy Markdown
Collaborator

QuickPerf finds the class implementing SpecifiableGlobalAnnotations, and the one implementing SpecifiableSqlFormatter, by scanning the org/quickperf directories of the class path (QuickPerfUserConfigClasses). It converted each directory URL to a file path with URLDecoder.decode(resource.getPath(), "UTF-8"). URLDecoder decodes HTML form data, where + stands for a space, but in a URL path a space is written %20 and + is a plus sign.

So when the URL of a class path directory contained a +, the decoded path did not exist. For example, C:\work\my+project\target\test-classes became C:\work\my project\target\test-classes, and /home/dev/R+D/app/build/classes/java/test became /home/dev/R D/app/build/classes/java/test. A folder named C++ has the same problem. QuickPerf skipped the directory without any message: the global annotations were not applied, and a user SQL formatter was not used.

This PR encodes + as %2B before decoding, so that a + in the URL decodes to +. An encoded %2B or %20 decodes as before.

@jeanbisutti
jeanbisutti merged commit fbbe6fc 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