Re: RFR: 8305734: BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set

2023-09-15 Thread Andy-Tatman
On Sat, 22 Jul 2023 04:44:21 GMT, Stuart Marks wrote: >> See https://bugs.java.com/bugdatabase/view_bug?bug_id=8305734 and >> https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8311905 > > Hi, thanks for the background and the discussion of the alternatives. I'm not > sure that drafting the

Re: RFR: 8305734: BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set

2023-07-19 Thread Andy-Tatman
On Fri, 14 Apr 2023 15:53:41 GMT, Alan Bateman wrote: >> @AlanBateman >> It is a known issue that size() may return a negative integer, see >> [JDK-8230557](https://bugs.openjdk.org/browse/JDK-8230557), and the accepted >> workaround is to interpret the returned integer as an unsigned value an

Re: RFR: 8305734+8311905: "BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set" + "BitSet.valueOf(...) allows bitsets to be created that behave incorrectly."

2023-07-12 Thread Andy-Tatman
On Fri, 7 Apr 2023 12:22:03 GMT, Andy-Tatman wrote: > See https://bugs.java.com/bugdatabase/view_bug?bug_id=8305734 and > https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8311905 Hi everyone, Apologies for not being very active recently. I have been looking at the BitSet class

Re: RFR: 8305734+8311905: "BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set" + "BitSet.valueOf(...) allows bitsets to be created that behave incorrectly."

2023-07-12 Thread Andy-Tatman
On Fri, 7 Apr 2023 12:22:03 GMT, Andy-Tatman wrote: > See https://bugs.java.com/bugdatabase/view_bug?bug_id=8305734 and > https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8311905 I posted a second bug report & edited this PR to also include this second bug. https://bugs.o

Re: RFR: 8305734: BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set

2023-06-20 Thread Andy-Tatman
On Tue, 9 May 2023 00:12:19 GMT, Stuart Marks wrote: > This isn't correct. When length() returns Integer.MIN_VALUE, this doesn't > _necessarily_ cause get(from, to) to always return an empty BitSet. Well, it > does in the current implementation, but that's simply a bug that can be > fixed. The

Re: RFR: 8305734: BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set

2023-05-05 Thread Andy-Tatman
On Fri, 7 Apr 2023 12:22:03 GMT, Andy-Tatman wrote: > See https://bugs.java.com/bugdatabase/view_bug?bug_id=8305734 I was first in favour of just doing the suggested fix in the commit, but given that functions such as get(int **, int**) can't access this bit anyway, I agree it might m

Re: RFR: 8305734: BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set

2023-05-05 Thread Andy-Tatman
On Sat, 22 Apr 2023 01:26:08 GMT, Chen Liang wrote: > > I would be happy to fill out the CSR, but unfortunately I don't think I am > > able to currently as I'm not an author on OpenJDK and as such don't have a > > JBS account. (I reported the bug through the Oracle site, rather than > > throug

Re: RFR: 8305734: BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set

2023-04-24 Thread Andy-Tatman
On Fri, 7 Apr 2023 12:22:03 GMT, Andy-Tatman wrote: > See https://bugs.java.com/bugdatabase/view_bug?bug_id=8305734 I realise this is a bit off-topic for this specific bug, but perhaps relevant for the specification: The size() function can already start to overflow with much smaller indi

Re: RFR: 8305734: BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set

2023-04-21 Thread Andy-Tatman
On Fri, 14 Apr 2023 15:53:41 GMT, Alan Bateman wrote: >> @AlanBateman >> It is a known issue that size() may return a negative integer, see >> [JDK-8230557](https://bugs.openjdk.org/browse/JDK-8230557), and the accepted >> workaround is to interpret the returned integer as an unsigned value an

Re: RFR: 8305734: BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set

2023-04-14 Thread Andy-Tatman
On Wed, 12 Apr 2023 06:46:39 GMT, Alan Bateman wrote: >> See https://bugs.java.com/bugdatabase/view_bug?bug_id=8305734 > > The BitSet API requires that the logical size fit in an int so I think you'll > end up changing the set methods to disallow an index of MAX_VALUE. > > Can you change the ti

RFR: 8305734: Fixes bug in get(int, int)

2023-04-11 Thread Andy-Tatman
See https://bugs.java.com/bugdatabase/view_bug?bug_id=8305734 - Commit messages: - Update src/java.base/share/classes/java/util/BitSet.java - Removed trailing whitespace - 8305734: Fixes bug in get(int, int) Changes: https://git.openjdk.org/jdk/pull/13388/files Webrev: https://we