Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-04-29 Thread Alexey Ivanov
On Mon, 29 Apr 2024 12:44:14 GMT, Joel Uckelman wrote: > Will this be backported to Java 21 and 22? It would be very helpful if it > could be. It is already backported to 22. I'm working on backporting it to all supported Oracle releases of Java. It is up to the OpenJDK community to backport

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-04-29 Thread Joel Uckelman
On Tue, 5 Mar 2024 17:40:01 GMT, Alexey Ivanov wrote: >> The implementation of `Win32ShellFolder2.compareTo` is inconsistent: there >> are cases where >> `a < b & b < c but a == c` >> which *violates its general contract*. >> >> In particular, it happens for the personal folder

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-04-08 Thread Sergey Bylokhov
On Tue, 5 Mar 2024 17:40:01 GMT, Alexey Ivanov wrote: >> The implementation of `Win32ShellFolder2.compareTo` is inconsistent: there >> are cases where >> `a < b & b < c but a == c` >> which *violates its general contract*. >> >> In particular, it happens for the personal folder

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-04-08 Thread Alexey Ivanov
On Tue, 5 Mar 2024 17:40:01 GMT, Alexey Ivanov wrote: >> The implementation of `Win32ShellFolder2.compareTo` is inconsistent: there >> are cases where >> `a < b & b < c but a == c` >> which *violates its general contract*. >> >> In particular, it happens for the personal folder

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-03-26 Thread Phil Race
On Tue, 5 Mar 2024 17:40:01 GMT, Alexey Ivanov wrote: >> The implementation of `Win32ShellFolder2.compareTo` is inconsistent: there >> are cases where >> `a < b & b < c but a == c` >> which *violates its general contract*. >> >> In particular, it happens for the personal folder

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-03-26 Thread Alexey Ivanov
On Mon, 25 Mar 2024 23:48:23 GMT, Joel Uckelman wrote: > I haven't heard back yet. I hope investigating the second bug will not hold > up the fix for the first bug getting merged. It's not a show-stopper. These are different bugs. If possible, I'd like to follow up and find the root cause of

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-03-25 Thread Joel Uckelman
On Thu, 21 Mar 2024 17:01:49 GMT, Joel Uckelman wrote: >> @uckelman Is there a way to reproduce the original bug in the user's >> environment? >> >> I think there's a bug in JDK which leads to two _Documents_ folders in the >> list. If the bug is still reproducible, collecting more data will

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-03-21 Thread Joel Uckelman
On Thu, 21 Mar 2024 12:02:52 GMT, Alexey Ivanov wrote: >> Hi, I'm the submitter of the original bug report. I can confirm that you got >> the reason for the change exactly right. > > @uckelman Is there a way to reproduce the original bug in the user's > environment? > > I think there's a bug

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-03-21 Thread Alexey Ivanov
On Fri, 15 Mar 2024 15:00:40 GMT, Joel Uckelman wrote: >> So, changing the condition in the `if`-block from `special1 || special2` to >> `special1 && special2` makes the sorting order consistent because the >> relation is now *transitive*: >> >> >> a < b & b < c therefore a < c > > Hi, I'm

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-03-21 Thread Alexey Ivanov
On Fri, 15 Mar 2024 15:00:40 GMT, Joel Uckelman wrote: >> So, changing the condition in the `if`-block from `special1 || special2` to >> `special1 && special2` makes the sorting order consistent because the >> relation is now *transitive*: >> >> >> a < b & b < c therefore a < c > > Hi, I'm

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-03-21 Thread Joel Uckelman
On Thu, 14 Mar 2024 16:56:03 GMT, Alexey Ivanov wrote: >> It is well described in a [JBS >> comment](https://bugs.openjdk.org/browse/JDK-8305072?focusedId=14610400=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14610400) >> by the submitter. >> >> Let's consider the

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-03-16 Thread Alexey Ivanov
On Thu, 14 Mar 2024 16:56:03 GMT, Alexey Ivanov wrote: >> It is well described in a [JBS >> comment](https://bugs.openjdk.org/browse/JDK-8305072?focusedId=14610400=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14610400) >> by the submitter. >> >> Let's consider the

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-03-14 Thread Alexey Ivanov
On Thu, 14 Mar 2024 16:49:39 GMT, Alexey Ivanov wrote: >> src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java >> line 525: >> >>> 523: boolean special2 = sf2.isSpecial(); >>> 524: >>> 525: if (special1 && special2) { >> >> Could you please say

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-03-14 Thread Alexey Ivanov
On Tue, 12 Mar 2024 19:35:30 GMT, Phil Race wrote: >> Alexey Ivanov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Handle fakePersonal on Windows 10 >> >> The desktop folder on Windows 10 does not include >> the Personal

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-03-12 Thread Phil Race
On Tue, 5 Mar 2024 17:40:01 GMT, Alexey Ivanov wrote: >> The implementation of `Win32ShellFolder2.compareTo` is inconsistent: there >> are cases where >> `a < b & b < c but a == c` >> which *violates its general contract*. >> >> In particular, it happens for the personal folder

Re: RFR: 8305072: Win32ShellFolder2.compareTo is inconsistent [v2]

2024-03-05 Thread Alexey Ivanov
> The implementation of `Win32ShellFolder2.compareTo` is inconsistent: there > are cases where > `a < b & b < c but a == c` > which *violates its general contract*. > > In particular, it happens for the personal folder (*Documents*) if it is > listed *twice*: as a special and as a regular