Repository navigation
feat: generate fluent builders for codegen model DTOs (#415) #429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
igel-devin-ai
wants to merge
36
commits into
java-helpers:main
Choose a base branch
from
igel-devin-ai:feat/issue-415-codegen-dto-builders
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
209deae
feat: derive String Javadoc example values from field names (#412)
AndreasIgelCC 112fa4a
feat: generate fluent builders for codegen model DTOs (#415)
AndreasIgelCC 548373a
fix: do not abort generation on reserved-word property names (#418)
AndreasIgelCC 6c9d39d
Require field names for Javadoc example value helpers
devin-ai-integration[bot] 6aab31d
fix: derive reserved builder property names from getters
devin-ai-integration[bot] 8d92286
Merge reserved property naming dependency for DTO builders
devin-ai-integration[bot] e2ae12f
Merge field-name example dependency for DTO builders
devin-ai-integration[bot] f9a8d39
fix: preserve wildcard type arguments in generated builders
devin-ai-integration[bot] ece0289
Merge wildcard type argument prerequisite for DTO builders
devin-ai-integration[bot] 60ed4ef
feat: complete and reproducibly regenerate codegen DTO builders
devin-ai-integration[bot] e76889d
Merge remote-tracking branch 'upstream/main' into feat/issue-415-code…
devin-ai-integration[bot] 29936cf
Merge remote-tracking branch 'upstream/main' into feat/issue-415-code…
devin-ai-integration[bot] 960c5d5
codegen-core: copy needed core runtime classes, drop simple-builders-…
devin-ai-integration[bot] c118e2c
codegen-core: drop @Generated/@BuilderImplementation from committed D…
devin-ai-integration[bot] 42743a4
codegen-core: TypeName convenience overloads + one-stream builder test
devin-ai-integration[bot] 2a8370e
codegen-core: DTOs implement their builder's With interface
devin-ai-integration[bot] cbeb930
Merge remote-tracking branch 'upstream/main' into feat/issue-415-code…
devin-ai-integration[bot] 31083f0
merge upstream/main; drop stale processor JavadocExampleValuesTest (m…
devin-ai-integration[bot] f8e7037
processor: add committed builders for internal DTOs
devin-ai-integration[bot] 350149a
builders: add Class-based overloads for TypeName setters
devin-ai-integration[bot] b25a6c5
builders: add type-specific shortcuts for TypeName setters
devin-ai-integration[bot] d02f70f
Use streamed DTO builders for all GenerationTargetClassDto test fixtures
devin-ai-integration[bot] af1d0f4
Use simple-builders-core helpers in processor DTO builders
devin-ai-integration[bot] 964850b
Drop defensive copy in collection setters; guard self-assignment instead
devin-ai-integration[bot] 1ca6b7f
Processor DTO builders: collection suites, setX setters, TypeName sho…
devin-ai-integration[bot] e7ff406
refactor(processor): construct DTOs via streamed XxxDtoBuilder API at…
devin-ai-integration[bot] 5710b0a
docs(codegen-core): note origin and reason on classes copied from sim…
devin-ai-integration[bot] 6dbbb9b
docs(codegen-core): fix javadoc tag order on copied-class origin notes
devin-ai-integration[bot] cca66b9
refactor(codegen-core): flatten copied helper package, add import/mem…
devin-ai-integration[bot] 97e2bce
test(codegen-core): use star imports per project convention in Codege…
devin-ai-integration[bot] 4e24e15
refactor(simple-processor): construct DTOs via XxxDtoBuilder in mappe…
devin-ai-integration[bot] 2377bf3
fix: add missing license header, revert redundant ImportCollector wil…
devin-ai-integration[bot] 1e27d49
refactor: flat single-element/varargs consumer API for DTO builders
devin-ai-integration[bot] 194a4f3
fix: preserve argument order in set-valued varargs builder methods
devin-ai-integration[bot] 232209d
refactor: remove xUpdate methods from committed DTO builders
devin-ai-integration[bot] def6302
chore: broaden sonar cpd exclusions to whole model packages
devin-ai-integration[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
90 changes: 90 additions & 0 deletions
90
codegen-core/src/main/java/org/javahelpers/codegen/builders/ArrayListBuilder.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| /* | ||
| * MIT License | ||
| * | ||
| * Copyright (c) 2025-2026 Andreas Igel | ||
| * | ||
| * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| * of this software and associated documentation files (the "Software"), to deal | ||
| * in the Software without restriction, including without limitation the rights | ||
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| * copies of the Software, and to permit persons to whom the Software is | ||
| * furnished to do so, subject to the following conditions: | ||
| * | ||
| * The above copyright notice and this permission notice shall be included in all | ||
| * copies or substantial portions of the Software. | ||
| * | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| * SOFTWARE. | ||
| */ | ||
|
|
||
| package org.javahelpers.codegen.builders; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
|
|
||
| /** | ||
| * Generic Builder for Lists. Helperclass for being able to provide functional interfaces in | ||
| * extending lists. Using ArrayLists inside. | ||
| * | ||
| * <p><b>Origin:</b> copied from {@code | ||
| * org.javahelpers.simple.builders.core.builders.ArrayListBuilder} of simple-builders-core so that | ||
| * codegen-core does not depend on the builders runtime module. The DTO builders committed in this | ||
| * module must work without forcing a simple-builders-core dependency onto codegen users. | ||
| * | ||
| * @param <T> the type of elements in the targeting list | ||
| */ | ||
| public class ArrayListBuilder<T> { | ||
| private final List<T> mList = new ArrayList<>(); | ||
|
|
||
| /** Creates an empty ArrayListBuilder. */ | ||
| public ArrayListBuilder() {} | ||
|
|
||
| /** | ||
| * Creates an ArrayListBuilder initialized with the elements from the given list. | ||
| * | ||
| * @param initialList list to initialize from | ||
| */ | ||
| public ArrayListBuilder(List<T> initialList) { | ||
| if (initialList != null) { | ||
| mList.addAll(initialList); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Appends the element to the end of the internal list. Calling add-function on inner ArrayList | ||
| * field. | ||
| * | ||
| * @param element Element to be appended | ||
| * @return current instance of ArrayListBuilder for using in stream-notation | ||
| */ | ||
| public ArrayListBuilder<T> add(T element) { | ||
| mList.add(element); | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Appends a list of elements to the end of the internal list. Calling addAll-function on inner | ||
| * ArrayList field. | ||
| * | ||
| * @param elements list of Elements to be appended | ||
| * @return current instance of ArrayListBuilder for using in stream-notation | ||
| */ | ||
| public ArrayListBuilder<T> addAll(List<T> elements) { | ||
| mList.addAll(elements); | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Builds a new list based on the elements appended by the other functions. | ||
| * | ||
| * @return new ArrayList holding all elements which have been added before | ||
| */ | ||
| public List<T> build() { | ||
| return new ArrayList<>(mList); | ||
| } | ||
| } |
117 changes: 117 additions & 0 deletions
117
...e/src/main/java/org/javahelpers/codegen/builders/ArrayListBuilderWithElementBuilders.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| /* | ||
| * MIT License | ||
| * | ||
| * Copyright (c) 2025-2026 Andreas Igel | ||
| * | ||
| * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| * of this software and associated documentation files (the "Software"), to deal | ||
| * in the Software without restriction, including without limitation the rights | ||
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| * copies of the Software, and to permit persons to whom the Software is | ||
| * furnished to do so, subject to the following conditions: | ||
| * | ||
| * The above copyright notice and this permission notice shall be included in all | ||
| * copies or substantial portions of the Software. | ||
| * | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| * SOFTWARE. | ||
| */ | ||
|
|
||
| package org.javahelpers.codegen.builders; | ||
|
|
||
| import java.util.List; | ||
| import java.util.function.Consumer; | ||
| import java.util.function.Supplier; | ||
|
|
||
| /** | ||
| * Enhanced builder for Lists that supports adding elements via builder consumers. This class | ||
| * extends {@link ArrayListBuilder} and adds methods to accept {@link Consumer} functions that | ||
| * configure element builders, eliminating the need to manually call {@code build()} on each element | ||
| * builder. | ||
| * | ||
| * <p>Example usage: | ||
| * | ||
| * <pre>{@code | ||
| * List<Person> people = new ArrayListBuilderWithElementBuilders<>(PersonBuilder::create) | ||
| * .add(personBuilder -> personBuilder | ||
| * .name("John Doe") | ||
| * .age(30)) | ||
| * .add(personBuilder -> personBuilder | ||
| * .name("Jane Smith") | ||
| * .age(25)) | ||
| * .build(); | ||
| * }</pre> | ||
| * | ||
| * <p><b>Origin:</b> copied from {@code | ||
| * org.javahelpers.simple.builders.core.builders.ArrayListBuilderWithElementBuilders} of | ||
| * simple-builders-core so that codegen-core does not depend on the builders runtime module. The DTO | ||
| * builders committed in this module must work without forcing a simple-builders-core dependency | ||
| * onto codegen users. | ||
| * | ||
| * @param <T> the type of elements in the targeting list | ||
| * @param <B> the type of builder used to create elements, must implement {@link IBuilderBase} and | ||
| * building objects of type T | ||
| */ | ||
| public class ArrayListBuilderWithElementBuilders<T, B extends IBuilderBase<T>> | ||
| extends ArrayListBuilder<T> { | ||
| private final Supplier<B> elementBuilderProvider; | ||
|
|
||
| /** | ||
| * Creates an empty ArrayListBuilderWithElementBuilders. | ||
| * | ||
| * @param elementBuilderProvider supplier that provides new instances of element builders | ||
| */ | ||
| public ArrayListBuilderWithElementBuilders(Supplier<B> elementBuilderProvider) { | ||
| this.elementBuilderProvider = elementBuilderProvider; | ||
| } | ||
|
|
||
| /** | ||
| * Creates an ArrayListBuilderWithElementBuilders initialized with the elements from the given | ||
| * list. | ||
| * | ||
| * @param initialList list to initialize from | ||
| * @param elementBuilderProvider supplier that provides new instances of element builders | ||
| */ | ||
| public ArrayListBuilderWithElementBuilders( | ||
| List<T> initialList, Supplier<B> elementBuilderProvider) { | ||
| super(initialList); | ||
| this.elementBuilderProvider = elementBuilderProvider; | ||
| } | ||
|
|
||
| /** | ||
| * Adds an element to the list by providing a consumer that configures an element builder. The | ||
| * builder is automatically created using the elementBuilderProvider and built after | ||
| * configuration. | ||
| * | ||
| * @param elementBuilderConsumer consumer that configures the element builder | ||
| * @return this builder instance for method chaining | ||
| */ | ||
| public ArrayListBuilderWithElementBuilders<T, B> add(Consumer<B> elementBuilderConsumer) { | ||
| B elementBuilder = elementBuilderProvider.get(); | ||
| elementBuilderConsumer.accept(elementBuilder); | ||
| super.add(elementBuilder.build()); | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Adds multiple elements to the list by providing consumers that configure element builders. Each | ||
| * builder is automatically created using the elementBuilderProvider and built after | ||
| * configuration. | ||
| * | ||
| * @param elementBuilderConsumers varargs of consumers that configure element builders | ||
| * @return this builder instance for method chaining | ||
| */ | ||
| @SafeVarargs | ||
| public final ArrayListBuilderWithElementBuilders<T, B> add( | ||
| Consumer<B>... elementBuilderConsumers) { | ||
| for (Consumer<B> elementBuilderConsumer : elementBuilderConsumers) { | ||
| this.add(elementBuilderConsumer); | ||
| } | ||
| return this; | ||
| } | ||
| } |
63 changes: 63 additions & 0 deletions
63
codegen-core/src/main/java/org/javahelpers/codegen/builders/BuilderToStringStyle.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| /* | ||
| * MIT License | ||
| * | ||
| * Copyright (c) 2025-2026 Andreas Igel | ||
| * | ||
| * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| * of this software and associated documentation files (the "Software"), to deal | ||
| * in the Software without restriction, including without limitation the rights | ||
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| * copies of the Software, and to permit persons to whom the Software is | ||
| * furnished to do so, subject to the following conditions: | ||
| * | ||
| * The above copyright notice and this permission notice shall be included in all | ||
| * copies or substantial portions of the Software. | ||
| * | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| * SOFTWARE. | ||
| */ | ||
|
|
||
| package org.javahelpers.codegen.builders; | ||
|
|
||
| import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
|
||
| /** | ||
| * Custom ToStringStyle for builders that automatically handles TrackedValue fields. This style only | ||
| * includes fields that have been set (TrackedValue.isSet() returns true) and unwraps their values | ||
| * automatically. | ||
| * | ||
| * <p><b>Origin:</b> copied from {@code | ||
| * org.javahelpers.simple.builders.core.util.BuilderToStringStyle} of simple-builders-core so that | ||
| * codegen-core does not depend on the builders runtime module. The DTO builders committed in this | ||
| * module must work without forcing a simple-builders-core dependency onto codegen users. | ||
| */ | ||
| public class BuilderToStringStyle extends ToStringStyle { | ||
|
|
||
| private static final long serialVersionUID = 1L; | ||
|
|
||
| public static final BuilderToStringStyle INSTANCE = new BuilderToStringStyle(); | ||
|
|
||
| public BuilderToStringStyle() { | ||
| super(); | ||
| this.setUseClassName(true); | ||
| this.setUseIdentityHashCode(false); | ||
| } | ||
|
|
||
| // Overrides ToStringStyle.append to unwrap TrackedValue fields; the signature must match the | ||
| // overridden method. codeql[java/confusing-method-signature] | ||
| @Override | ||
| public void append(StringBuffer buffer, String fieldName, Object value, Boolean fullDetail) { | ||
| if (value instanceof TrackedValue<?> trackedValue) { | ||
| if (trackedValue.isSet()) { | ||
| super.append(buffer, fieldName, trackedValue.value(), fullDetail); | ||
| } | ||
| } else { | ||
| super.append(buffer, fieldName, value, fullDetail); | ||
| } | ||
| } | ||
| } | ||
122 changes: 122 additions & 0 deletions
122
codegen-core/src/main/java/org/javahelpers/codegen/builders/HashMapBuilder.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| /* | ||
| * MIT License | ||
| * | ||
| * Copyright (c) 2025-2026 Andreas Igel | ||
| * | ||
| * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| * of this software and associated documentation files (the "Software"), to deal | ||
| * in the Software without restriction, including without limitation the rights | ||
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| * copies of the Software, and to permit persons to whom the Software is | ||
| * furnished to do so, subject to the following conditions: | ||
| * | ||
| * The above copyright notice and this permission notice shall be included in all | ||
| * copies or substantial portions of the Software. | ||
| * | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| * SOFTWARE. | ||
| */ | ||
|
|
||
| package org.javahelpers.codegen.builders; | ||
|
|
||
| import java.util.HashMap; | ||
| import java.util.Map; | ||
|
|
||
| /** | ||
| * Generic Builder for Maps. Helperclass for being able to provide functional interfaces in | ||
| * extending maps. Using HashMap inside. | ||
| * | ||
| * <p><b>Origin:</b> copied from {@code | ||
| * org.javahelpers.simple.builders.core.builders.HashMapBuilder} of simple-builders-core so that | ||
| * codegen-core does not depend on the builders runtime module. The DTO builders committed in this | ||
| * module must work without forcing a simple-builders-core dependency onto codegen users. | ||
| * | ||
| * @param <K> the type of keys in the targeting map | ||
| * @param <V> the type of values in the targeting map | ||
| */ | ||
| public class HashMapBuilder<K, V> { | ||
| private final Map<K, V> mMap = new HashMap<>(); | ||
|
|
||
| /** Creates an empty HashMapBuilder. */ | ||
| public HashMapBuilder() {} | ||
|
|
||
| /** | ||
| * Creates a HashMapBuilder initialized with the mappings from the given map. | ||
| * | ||
| * @param initialMap map to initialize from | ||
| */ | ||
| public HashMapBuilder(Map<K, V> initialMap) { | ||
| if (initialMap != null) { | ||
| mMap.putAll(initialMap); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Associates the specified value with the specified key in this map. Using an inner HashMap | ||
| * implementation. If the key already exists in the map, the old value is replaced. | ||
| * | ||
| * @param key key with which the specified value is to be associated | ||
| * @param value value to be associated with the specified key | ||
| * @return Current instance of HashMapBuilder for using in stream-notation | ||
| */ | ||
| public HashMapBuilder<K, V> put(K key, V value) { | ||
| mMap.put(key, value); | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Associates the specified value with the specified key in this map, if the specified key is not | ||
| * already associated. Using an inner HashMap implementation. If {@code null} is associated with | ||
| * the specific key, it will be replaced. | ||
| * | ||
| * @param key key with which the specified value is to be associated | ||
| * @param value value to be associated with the specified key | ||
| * @return Current instance of HashMapBuilder for using in stream-notation | ||
| */ | ||
| public HashMapBuilder<K, V> putIfAbsent(K key, V value) { | ||
| mMap.putIfAbsent(key, value); | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Associates the specified value with the specified key in this map, if the specified value is | ||
| * not null. Using an inner HashMap implementation. | ||
| * | ||
| * @param key key with which the specified value is to be associated | ||
| * @param value value to be associated with the specified key | ||
| * @return Current instance of HashMapBuilder for using in stream-notation | ||
| */ | ||
| public HashMapBuilder<K, V> putIfValueNotNull(K key, V value) { | ||
| if (value != null) { | ||
| mMap.put(key, value); | ||
| } | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Copies all of the mappings from the specified map to the inner map of Builder. Using an inner | ||
| * HashMap implementation. These mappings will replace any mappings that the inner map of | ||
| * HashMapBuilder had before. | ||
| * | ||
| * @param pMap mappings to be added to HashMapBuilder | ||
| * @return Current instance of HashMapBuilder for method chaining | ||
| */ | ||
| public HashMapBuilder<K, V> putAll(Map<K, V> pMap) { | ||
| mMap.putAll(pMap); | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Builds a new Map based on the mappings defined by the other functions. | ||
| * | ||
| * @return new HashMap holding all mappings which have been defined before | ||
| */ | ||
| public Map<K, V> build() { | ||
| return new HashMap<>(mMap); | ||
| } | ||
| } |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be an exact
@Override:ReflectionToStringBuilderdispatches toappend(StringBuffer, String, Object, Boolean)and the style intercepts that call to unwrapTrackedValuefields (only set values are rendered). Renaming would silently break the mechanism — callers reach it through the supertype signature by design. Suppressed inline withcodeql[java/confusing-method-signature]plus a justification comment.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead drop this format here and just use the default style. Tracker value style should be solved in toString method of trackedvalue!?