Skip to content

Commit

Permalink
Whitesource fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalkin committed Jan 30, 2024
1 parent 30fab5a commit 426eb33
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ public ArrayList<T> getSample() {
return null;

ArrayList<T> result = new ArrayList<>(resultSize);
for (T item : data_)
result.add(item);
if (data_ != null)
result.addAll(data_);

if (includePartial)
result.add(partialItem_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ private void internalMerge(EbppsItemsSketch<T> other) {
* Provides a human-readable summary of the sketch
* @return a summary of information in the sketch
*/
public String toString() {
@Override
public String toString() {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ static <T> void checkIfEqual(EbppsItemsSketch<T> sk1, EbppsItemsSketch<T> sk2) {
}
// nothing to test if one is null and the other isn't
} else {
// sk1.getC() >= 1.0 and sk2.getC() >= 1.0 (they're equal per above)
// so the samples shouldn't be null
assertTrue(sample1 != null && sample2 != null);
final int len = Math.min(sample1.size(), sample2.size());
for (int i = 0; i < len; ++i) {
assertEquals(sample1.get(i), sample2.get(i));
Expand Down Expand Up @@ -187,7 +190,6 @@ public void serializeDeserializeString() {
Memory mem = Memory.wrap(bytes);
EbppsItemsSketch<String> sk_heapify = EbppsItemsSketch.heapify(mem, new ArrayOfStringsSerDe());
checkIfEqual(sk, sk_heapify);
// TODO: deserialize too few bytes

// add uniform items
for (int i = 0; i < k; ++i)
Expand Down

0 comments on commit 426eb33

Please sign in to comment.