Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix BitsArray upper boundary validate bug #8664

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

EvanMi
Copy link
Contributor

@EvanMi EvanMi commented Sep 8, 2024

fix BitsArray upper boundary validate bug

@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.79%. Comparing base (9b53c06) to head (a707599).
Report is 29 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #8664      +/-   ##
=============================================
+ Coverage      47.44%   48.79%   +1.34%     
- Complexity     11515    12654    +1139     
=============================================
  Files           1277     1282       +5     
  Lines          89442    96028    +6586     
  Branches       11502    13257    +1755     
=============================================
+ Hits           42436    46854    +4418     
- Misses         41801    43690    +1889     
- Partials        5205     5484     +279     
Flag Coverage Δ
48.79% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Test(expected = IllegalArgumentException.class)
public void testByteBoundaryOverflow() {
BitsArray bitsArray = BitsArray.create(16);
assertThat(bitsArray.byteLength() ).isEqualTo(2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里多了一个空格,style插件会报错

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的~已经处理

@EvanMi EvanMi requested a review from chi3316 September 10, 2024 01:07
@EvanMi
Copy link
Contributor Author

EvanMi commented Sep 24, 2024

@chi3316 为啥集成测试失败了~我在本地看是没问题的

@chi3316
Copy link
Contributor

chi3316 commented Sep 25, 2024

@chi3316 为啥集成测试失败了~我在本地看是没问题的

ci环境资源比较紧张,有时候会遇到一些测试偶发性失败的问题。可以试着改动几个空行再提交来重新触发一下ci

@@ -195,7 +195,7 @@ protected int position(int bitPos) {

protected void checkBytePosition(int bytePos, BitsArray bitsArray) {
checkInitialized(bitsArray);
if (bytePos > bitsArray.byteLength()) {
if (bytePos >= bitsArray.byteLength()) {
throw new IllegalArgumentException("BytePos is greater than " + bytes.length);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix error message

@EvanMi EvanMi requested a review from chi3316 September 27, 2024 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants