Skip to content

Commit

Permalink
Merge pull request #534 from apache/fix_imports_and_finals
Browse files Browse the repository at this point in the history
Fix out-of-order imports and missing finals in PR 533.
  • Loading branch information
leerho authored Mar 27, 2024
2 parents 810f134 + 1257952 commit dd06874
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/apache/datasketches/theta/Union.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

package org.apache.datasketches.theta;

import java.nio.ByteBuffer;

import org.apache.datasketches.common.Family;
import org.apache.datasketches.memory.Memory;
import org.apache.datasketches.memory.WritableMemory;

import java.nio.ByteBuffer;

/**
* Compute the union of two or more theta sketches.
* A new instance represents an empty set.
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/apache/datasketches/theta/UnionImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
import static org.apache.datasketches.theta.SingleItemSketch.otherCheckForSingleItem;
import static org.apache.datasketches.thetacommon.QuickSelect.selectExcludingZeros;

import java.nio.ByteBuffer;

import org.apache.datasketches.common.Family;
import org.apache.datasketches.common.ResizeFactor;
import org.apache.datasketches.common.SketchesArgumentException;
Expand All @@ -47,8 +49,6 @@
import org.apache.datasketches.thetacommon.HashOperations;
import org.apache.datasketches.thetacommon.ThetaUtil;

import java.nio.ByteBuffer;

/**
* Shared code for the HeapUnion and DirectUnion implementations.
*
Expand Down Expand Up @@ -483,7 +483,7 @@ public void update(final byte[] data) {
}

@Override
public void update(ByteBuffer data) {
public void update(final ByteBuffer data) {
gadget_.update(data);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public UpdateReturnState update(final byte[] data) {
* @return
* <a href="{@docRoot}/resources/dictionary.html#updateReturnState">See Update Return State</a>
*/
public UpdateReturnState update(ByteBuffer buffer) {
public UpdateReturnState update(final ByteBuffer buffer) {
if (buffer == null || buffer.hasRemaining() == false) {
return RejectedNullOrEmpty;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

package org.apache.datasketches.tuple;

import java.nio.ByteBuffer;

import org.apache.datasketches.hash.MurmurHash3;
import org.apache.datasketches.memory.Memory;
import org.apache.datasketches.thetacommon.ThetaUtil;

import java.nio.ByteBuffer;

/**
* An extension of QuickSelectSketch&lt;S&gt;, which can be updated with many types of keys.
* Summary objects are created using a user-defined SummaryFactory class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@

package org.apache.datasketches.tuple.arrayofdoubles;

import java.nio.ByteBuffer;

import org.apache.datasketches.common.ResizeFactor;
import org.apache.datasketches.hash.MurmurHash3;
import org.apache.datasketches.memory.Memory;
import org.apache.datasketches.memory.WritableMemory;
import org.apache.datasketches.thetacommon.ThetaUtil;
import org.apache.datasketches.tuple.Util;

import java.nio.ByteBuffer;

/**
* The top level for updatable tuple sketches of type ArrayOfDoubles.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,17 @@
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;

import java.nio.ByteBuffer;

import org.apache.datasketches.common.Family;
import org.apache.datasketches.common.ResizeFactor;
import org.apache.datasketches.common.SketchesArgumentException;
import org.apache.datasketches.memory.DefaultMemoryRequestServer;
import org.apache.datasketches.memory.Memory;
import org.apache.datasketches.memory.MemoryRequestServer;
import org.apache.datasketches.memory.WritableMemory;
import org.apache.datasketches.thetacommon.ThetaUtil;
import org.testng.annotations.Test;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

/**
* @author Lee Rhodes
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,20 @@

import static org.testng.Assert.assertEquals;

import java.nio.ByteBuffer;

import org.apache.datasketches.common.ResizeFactor;
import org.apache.datasketches.common.SketchesArgumentException;
import org.apache.datasketches.memory.Memory;
import org.apache.datasketches.tuple.Sketch;
import org.apache.datasketches.tuple.TupleSketchIterator;
import org.apache.datasketches.tuple.Sketches;
import org.apache.datasketches.tuple.TupleSketchIterator;
import org.apache.datasketches.tuple.UpdatableSketch;
import org.apache.datasketches.tuple.UpdatableSketchBuilder;
import org.apache.datasketches.tuple.adouble.DoubleSummary.Mode;
import org.testng.Assert;
import org.testng.annotations.Test;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

public class AdoubleTest {
private final DoubleSummary.Mode mode = Mode.Sum;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@

package org.apache.datasketches.tuple.arrayofdoubles;

import java.nio.ByteBuffer;

import org.apache.datasketches.common.ResizeFactor;
import org.apache.datasketches.common.SketchesArgumentException;
import org.apache.datasketches.memory.Memory;
import org.apache.datasketches.memory.WritableMemory;
import org.testng.Assert;
import org.testng.annotations.Test;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

public class DirectArrayOfDoublesQuickSelectSketchTest {
@Test
public void isEmpty() {
Expand Down

0 comments on commit dd06874

Please sign in to comment.