Re: Revisiting JDK-4512189: ZipConstants leaking into public APIs

2023-12-01 Thread Eirik Bjørsnøs
On Tue, Nov 28, 2023 at 6:16 PM Alan Bateman wrote: > This is a JDK 1.1 era mistake. It would a source incompatible change to > "remove" the constants. It would require corpus searches to gauge the > impact. Alan, I've tried to assess the impact by using Github's Code Search. As far as I can

Re: Revisiting JDK-4512189: ZipConstants leaking into public APIs

2023-11-28 Thread Eirik Bjørsnøs
> > But keeping this "peculiarity" afloat does not come for free either. > Let me add that keeping the constants also incurs a maintenance cost: The fact that these constants are "effectively and accidentally public" is unusual, but needs to be understood and enforced by maintainers. Their names,

Re: Revisiting JDK-4512189: ZipConstants leaking into public APIs

2023-11-28 Thread Eirik Bjørsnøs
On Tue, Nov 28, 2023 at 6:16 PM Alan Bateman wrote: > > In light of this, I would like to revisit this issue, 22 years later: > [...] > > This is a JDK 1.1 era mistake. It would a source incompatible change to > "remove" the constants. It would require corpus searches to gauge the > impact. I

Re: Revisiting JDK-4512189: ZipConstants leaking into public APIs

2023-11-28 Thread Lance Andersen
I agree, I am not sure there is a large benefit to changing this at this time. Seems a lot of effort for minimal gain at best. On Nov 28, 2023, at 12:15 PM, Alan Bateman mailto:alan.bate...@oracle.com>> wrote: On 28/11/2023 15:50, Eirik Bjørsnøs wrote: : In light of this, I would like to

Re: Revisiting JDK-4512189: ZipConstants leaking into public APIs

2023-11-28 Thread Alan Bateman
On 28/11/2023 15:50, Eirik Bjørsnøs wrote: : In light of this, I would like to revisit this issue, 22 years later: - Is my assessment that this change is actually not binary incompatible sound, or did I miss something? - Would it in any case make sense to mark ZipConstants as @Deprecated,

Re: Revisiting JDK-4512189: ZipConstants leaking into public APIs

2023-11-28 Thread David Lloyd
On Tue, Nov 28, 2023 at 10:38 AM Eirik Bjørsnøs wrote: > > > On Tue, Nov 28, 2023 at 5:28 PM David Lloyd > wrote: > >> I agree, I always thought that this was a bizarre thing to expose in a >> public API so it being accidental does explain things. But maybe the >> appropriate fix is even

Re: Revisiting JDK-4512189: ZipConstants leaking into public APIs

2023-11-28 Thread Eirik Bjørsnøs
On Tue, Nov 28, 2023 at 5:28 PM David Lloyd wrote: > I agree, I always thought that this was a bizarre thing to expose in a > public API so it being accidental does explain things. But maybe the > appropriate fix is even simpler now in these modern times: one could remove > the `implements` and

Re: Revisiting JDK-4512189: ZipConstants leaking into public APIs

2023-11-28 Thread David Lloyd
On Tue, Nov 28, 2023 at 10:01 AM Eirik Bjørsnøs wrote: > Hi, > > JDK-4512189 [1] raised the issue that ZipFile, ZipEntry, ZipInputStream > and ZipOutputStream all implement the non-public ZipConstants interface. > While the interface itself is non-public, the constants defined > unfortunately

Revisiting JDK-4512189: ZipConstants leaking into public APIs

2023-11-28 Thread Eirik Bjørsnøs
Hi, JDK-4512189 [1] raised the issue that ZipFile, ZipEntry, ZipInputStream and ZipOutputStream all implement the non-public ZipConstants interface. While the interface itself is non-public, the constants defined unfortunately leak into the public API as constants of the mentioned classes. This