Azure / autorest.java

Extension for AutoRest (https://github.com/Azure/autorest) that generates Java code
MIT License
33 stars 82 forks source link

client, add shadow variable for discriminator property #2639

Closed weidongxu-microsoft closed 6 months ago

weidongxu-microsoft commented 6 months ago

another fix on https://github.com/Azure/autorest.java/issues/2574

Remove setKind method in superclass. Shadow kind variable in subclass. Override getKind method in subclass.

code change https://github.com/Azure/autorest.java/pull/2639/files/e9c1c0dbad94325dacb299fc8f29a1d6c892fd7b..db632bbb53ab4612517996b0298ea42f44824de1

test like this (for both azure-json and Jackson) https://github.com/Azure/autorest.java/pull/2639/commits/e9c1c0dbad94325dacb299fc8f29a1d6c892fd7b