add generics support to AutoValueUtils helpers#32977
Conversation
| } | ||
| String builderName = generated.getName() + "$Builder"; | ||
| public static @Nullable TypeDescriptor<?> getAutoValueGeneratedBuilder( | ||
| TypeDescriptor<?> typeDescriptor) { |
There was a problem hiding this comment.
is there a reason you remoevd the code that walks up the class hierarchy here?
There was a problem hiding this comment.
oh, probably did it by mistake, I'll bring it back
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
|
Run Java_IOs_Direct PreCommit |
|
Run Java PreCommit |
| // AutoValue extensions may be nested | ||
| TypeDescriptor<?> firstGeneratedTypeDescriptor = findFirstGeneratedAutoValue(typeDescriptor); | ||
| return Optional.ofNullable(firstGeneratedTypeDescriptor.getRawType().getSuperclass()) | ||
| .map(superClass -> firstGeneratedTypeDescriptor.getSupertype((Class) superClass)) |
There was a problem hiding this comment.
why are we calling getSuperclass here?
There was a problem hiding this comment.
so the findFirstGeneratedAutoValue will return the topmost class which is still generated, the getBaseAutoValueClass is supposed to return the non-generated base class which is the superclass of that
|
Assigning reviewers. If you would like to opt out of this review, comment R: @m-trieu for label java. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
|
Reminder, please take a look at this pr: @m-trieu |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @robertwb for label java. Available commands:
|
|
Reminder, please take a look at this pr: @robertwb |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @damondouglas for label java. Available commands:
|
|
Reminder, please take a look at this pr: @damondouglas |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @Abacn for label java. Available commands:
|
|
Reminder, please take a look at this pr: @Abacn |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @kennknowles for label java. Available commands:
|
|
Reminder, please take a look at this pr: @kennknowles |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @damondouglas for label java. Available commands:
|
|
Reminder, please take a look at this pr: @Abacn |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @robertwb for label java. Available commands:
|
|
Reminder, please take a look at this pr: @robertwb |
|
R: @reuvenlax |
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment |
|
Hi @tilgalas is this progress? |
|
Close this for now. |
|
I think there's a renewed interest in this PR, can we reopen it? I don't think I can do it (I can't see the reopen button anywhere) - cc @stankiewicz |
|
Run Java_GCP_IO_Direct PreCommit |
|
Run Java_IOs_Direct PreCommit |
|
Hi @reuvenlax, can you take a look again? |
|
related to #34672 (acutally this PR is the one referred in Beam 3 milestone doc https://s.apache.org/beam3-milestones: https://docs.google.com/document/d/1KfTMok67-bZBUcCCYeHkdktyQZ6arWQJEPMc-4hUrX0/edit?disco=AAABhaO_SVw) |
|
friendly ping |
|
assign set of reviewers |
|
Assigning reviewers: R: @robertwb for label java. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @chamikaramj for label java. Available commands:
|
|
Reminder, please take a look at this pr: @chamikaramj |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @robertwb for label java. Available commands:
|
This is a 3rd PR in the series of PRs (based on the now closed #31648) whose ultimate goal is to add support for generic classes to schema providers.
This PR updates the AutoValueUtils class which contains helpers that aid in manipulating the AutoValue internal generated classes - builders and concrete implementation of the abstract "spec" classes. The helpers will now be able to correctly find builders and generated implementations for generic AutoValue classes, see the newly added tests to see them in action.