Repository navigation
Javadoc: Fix swapped '@' and '+' descriptions in PatternOptionBuilder - #446
Merged
Merged
Conversation
The table in the PatternOptionBuilder Javadoc had '@' and '+' the wrong way round. '@' is the code that creates an object through the no-arg constructor of the named class, while '+' only loads the class; the existing tests already check it that way. While at it, note in Converter.OBJECT, Converter.CLASS, TypeHandler.createObject() and TypeHandler.createClass() that they load whatever class the value names, so they shouldn't be used on values from an untrusted source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Thanks for the update. Could you adjust the Javadoc saying “ Maybe: “Property values are added to the returned |
Contributor
Author
|
You're right, sorry about that. Parsing still updates the option group selections, so that was too broad. The sentence is in #450, I've changed it there to your wording. Thanks! |
garydgregory
requested changes
Oct 29, 2026
garydgregory
left a comment
Member
There was a problem hiding this comment.
Hi @oscerd
What do you think about my suggestions?
Co-authored-by: Gary Gregory <garydgregory@users.noreply.github.com>
Co-authored-by: Gary Gregory <garydgregory@users.noreply.github.com>
oscerd
commented
Oct 29, 2026
oscerd
left a comment
Contributor
Author
There was a problem hiding this comment.
Thanks, Suggestions merged
Member
|
TY @oscerd , merged 🚀 |
garydgregory
added a commit
that referenced
this pull request
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The table at the top of the
PatternOptionBuilderJavadoc has the descriptions of@and+swapped.@maps toObjectand creates an instance of the named class through its no-argument constructor, while+maps toClassand only loads the class.PatternOptionBuilderTest.testSimplePatternalready checks it that way (b@gives aVector,f+givesCalendar.class), so only the docs were wrong.Since someone reading the old table could pick
@thinking they just get a class name back, I also added a short note below the example and onConverter.OBJECT,Converter.CLASS,TypeHandler.createObject()andTypeHandler.createClass(): they load whatever class the value names (and@/OBJECTalso runs its constructor), so they shouldn't be used on values from an untrusted source.Javadoc only, no behavior change.
mvn; that'smvnon the command line by itself.🤖 Generated with Claude Code