Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Issue 11098065: Fix bug in ByteArray.subByteArray implementation for omitted length. (Closed)

Created:
8 years, 2 months ago by Lasse Reichstein Nielsen
Modified:
8 years, 2 months ago
Reviewers:
karlklose
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix bug in ByteArray.subByteArray implementation for omitted length. If length is omitted, it defaulted to the length of the byte array, even if the start was greater than zero. It now subtracts the start from the length to get "the length of the rest of the byte array". Committed: https://code.google.com/p/dart/source/detail?r=13522

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -3 lines) Patch
M lib/scalarlist/byte_arrays.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/lib/byte_array.dart View 1 chunk +4 lines, -1 line 1 comment Download
M tests/standalone/byte_array_test.dart View 1 chunk +37 lines, -0 lines 1 comment Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein Nielsen
8 years, 2 months ago (2012-10-11 08:03:28 UTC) #1
karlklose
LGTM with one comment. http://codereview.chromium.org/11098065/diff/1/runtime/lib/byte_array.dart File runtime/lib/byte_array.dart (right): http://codereview.chromium.org/11098065/diff/1/runtime/lib/byte_array.dart#newcode1517 runtime/lib/byte_array.dart:1517: if (length === null) { ...
8 years, 2 months ago (2012-10-11 08:18:18 UTC) #2
Lasse Reichstein Nielsen
8 years, 2 months ago (2012-10-11 08:25:17 UTC) #3
All good ideas for changing the behavior of the method, but I don't want to do
that in a bug-fix CL.
I'll add a TODO to reconsider the signature of the method (the start argument
should not be optional, and it should look more like String.substring).

Powered by Google App Engine
This is Rietveld 408576698