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

2023-04-11 Thread Alan Bateman
On Fri, 7 Apr 2023 12:22:03 GMT, Andy-Tatman 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 title of the P

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

2023-04-11 Thread Chen Liang
On Fri, 7 Apr 2023 12:22:03 GMT, Andy-Tatman wrote: > See https://bugs.java.com/bugdatabase/view_bug?bug_id=8305734 I think what Alan suggested in JBS is better: explicitly reject setting Integer.MAX_VALUE bit so that `len` will never return negative. - PR Comment: https://git.ope

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

2023-04-11 Thread ExE Boss
On Fri, 7 Apr 2023 12:22:03 GMT, Andy-Tatman wrote: > See https://bugs.java.com/bugdatabase/view_bug?bug_id=8305734 src/java.base/share/classes/java/util/BitSet.java line 653: > 651: > 652: int len = length(); > 653: if ( len < 0 ) Suggestion: if (len < 0) --

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