You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by le...@apache.org on 2021/04/19 17:29:25 UTC
[datasketches-java] branch minor_updates2 created (now b15b8a6)
This is an automated email from the ASF dual-hosted git repository.
leerho pushed a change to branch minor_updates2
in repository https://gitbox.apache.org/repos/asf/datasketches-java.git.
at b15b8a6 Fix warnings.
This branch includes the following new commits:
new b15b8a6 Fix warnings.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org
[datasketches-java] 01/01: Fix warnings.
Posted by le...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch minor_updates2
in repository https://gitbox.apache.org/repos/asf/datasketches-java.git
commit b15b8a62f04845b149cca125165d00421309a350
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Mon Apr 19 10:28:55 2021 -0700
Fix warnings.
---
.../java/org/apache/datasketches/hash/MurmurHash3v2.java | 1 +
.../apache/datasketches/sampling/VarOptItemsSamples.java | 14 +++++++-------
src/main/java/org/apache/datasketches/tuple/AnotB.java | 2 +-
.../java/org/apache/datasketches/tuple/Intersection.java | 2 +-
tools/SketchesCheckstyle.xml | 2 +-
5 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/src/main/java/org/apache/datasketches/hash/MurmurHash3v2.java b/src/main/java/org/apache/datasketches/hash/MurmurHash3v2.java
index a7f9700..1ad9f86 100644
--- a/src/main/java/org/apache/datasketches/hash/MurmurHash3v2.java
+++ b/src/main/java/org/apache/datasketches/hash/MurmurHash3v2.java
@@ -168,6 +168,7 @@ public final class MurmurHash3v2 {
* @param hashOut the size 2 long array for the resulting 128-bit hash
* @return the hash.
*/
+ @SuppressWarnings("restriction")
public static long[] hash(final Memory mem, final long offsetBytes, final long lengthBytes,
final long seed, final long[] hashOut) {
if ((mem == null) || (mem.getCapacity() == 0L)) {
diff --git a/src/main/java/org/apache/datasketches/sampling/VarOptItemsSamples.java b/src/main/java/org/apache/datasketches/sampling/VarOptItemsSamples.java
index 5fd2663..24614fe 100644
--- a/src/main/java/org/apache/datasketches/sampling/VarOptItemsSamples.java
+++ b/src/main/java/org/apache/datasketches/sampling/VarOptItemsSamples.java
@@ -48,11 +48,11 @@ import java.util.NoSuchElementException;
*/
public class VarOptItemsSamples<T> implements Iterable<VarOptItemsSamples<T>.WeightedSample> {
- private final VarOptItemsSketch<T> sketch_;
- private VarOptItemsSketch<T>.Result sampleLists;
- private final long n_;
- private final int h_;
- private final double rWeight_;
+ final VarOptItemsSketch<T> sketch_;
+ VarOptItemsSketch<T>.Result sampleLists;
+ final long n_;
+ final int h_;
+ final double rWeight_;
/**
* A convenience class to allow easy iterator access to a VarOpt sample.
@@ -61,12 +61,12 @@ public class VarOptItemsSamples<T> implements Iterable<VarOptItemsSamples<T>.Wei
private final int idx_;
private double adjustedWeight_;
- private WeightedSample(final int i) {
+ WeightedSample(final int i) {
idx_ = i;
adjustedWeight_ = Double.NaN;
}
- private WeightedSample(final int i, final double adjustedWeight) {
+ WeightedSample(final int i, final double adjustedWeight) {
idx_ = i;
adjustedWeight_ = adjustedWeight;
}
diff --git a/src/main/java/org/apache/datasketches/tuple/AnotB.java b/src/main/java/org/apache/datasketches/tuple/AnotB.java
index 31a83e2..a7fe752 100644
--- a/src/main/java/org/apache/datasketches/tuple/AnotB.java
+++ b/src/main/java/org/apache/datasketches/tuple/AnotB.java
@@ -319,7 +319,7 @@ public final class AnotB<S extends Summary> {
//restricted
- private static class DataArrays<S extends Summary> {
+ static class DataArrays<S extends Summary> {
long[] hashArr;
S[] summaryArr;
}
diff --git a/src/main/java/org/apache/datasketches/tuple/Intersection.java b/src/main/java/org/apache/datasketches/tuple/Intersection.java
index ea841c6..109a09b 100644
--- a/src/main/java/org/apache/datasketches/tuple/Intersection.java
+++ b/src/main/java/org/apache/datasketches/tuple/Intersection.java
@@ -304,7 +304,7 @@ public class Intersection<S extends Summary> {
firstCall_ = true;
}
- private static int getLgTableSize(final int count) {
+ static int getLgTableSize(final int count) {
final int tableSize = max(ceilingPowerOf2((int) ceil(count / 0.75)), 1 << MIN_LG_NOM_LONGS);
return Integer.numberOfTrailingZeros(tableSize);
}
diff --git a/tools/SketchesCheckstyle.xml b/tools/SketchesCheckstyle.xml
index a51083d..5a4c83a 100644
--- a/tools/SketchesCheckstyle.xml
+++ b/tools/SketchesCheckstyle.xml
@@ -39,7 +39,7 @@ under the License.
<property name="fileExtensions" value="java"/>
<module name="BeforeExecutionExclusionFileFilter">
- <property name="fileNamePattern" value="src/test/java/.+$"/>
+ <property name="fileNamePattern" value="src[\\/]test[\\/]java[\\/].+$|module\-info\.java.+$"/>
</module>
<module name="FileTabCharacter">
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org