RFR: 8311085: Remove implementation detail writeTo from LocalVariable(Type) [v3]

Julian Waters jwaters at openjdk.org
Mon Jul 31 05:06:51 UTC 2023


On Sun, 2 Jul 2023 12:16:17 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix line ending, update corpus test
>
> Please hold off on sponsoring this; after another look, I find that LocalVariable and LocalVariableType can probably implement `WritableElement`.
> 
> Per our previous discussion, `WritableElement` should probably not be exposed; it is currently only exposed as a type parameter upper bound in `<T extends WritableElement<?>> void writeList(List<T> list);`
> 
> I think we might convert the `WritableElement` to an internal interface: is it possible to declare the method as `void writeTo(BufWriterImpl)`, and the public method is yet hidden from the API because `BufWriterImpl` is not in an exported package? For the `writeList`, I would turn it into `<T> void writeList(List<T> list, BiConsumer<T, BufWriter> writer)` or simply remove it.

@liach You can turn this back to draft or run the reviewers 2 command to reduce this risk of accidental sponsorship

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14705#issuecomment-1657600250


More information about the core-libs-dev mailing list