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 2020/06/14 23:19:04 UTC

[incubator-datasketches-java] branch Cleanup created (now 6d33511)

This is an automated email from the ASF dual-hosted git repository.

leerho pushed a change to branch Cleanup
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-java.git.


      at 6d33511  Cleanup:

This branch includes the following new commits:

     new 6d33511  Cleanup:

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


[incubator-datasketches-java] 01/01: Cleanup:

Posted by le...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

leerho pushed a commit to branch Cleanup
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-java.git

commit 6d33511f1b059ab5db83e0bfdb10d0c4fbc49c20
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Sun Jun 14 16:17:10 2020 -0700

    Cleanup:
    
    Added SuppressWarnings("deprecation")  TO:
    AdoubleAnotBTest
      .threeMethodsWithTheta()
      .anotBNullEmptyCombinations()
    AdoubleIntersectionTest
      .intersectionExactMode()
    IntegerSketchTest
      .aNotBTest()
    
    ArrayOfStringsSketchTest
      orgnaize imports
    
      Add SW(deprecation) TO:
        checkSketch
    
      Remove empty line at 60
    
    FindBugsExcludeFilter
      Move <FindBugsFilter... to below license header
    
    Sketch
      add comment //This haandles #4 above to line 673
---
 src/main/java/org/apache/datasketches/theta/Sketch.java              | 2 +-
 .../java/org/apache/datasketches/tuple/adouble/AdoubleAnotBTest.java | 2 ++
 .../apache/datasketches/tuple/adouble/AdoubleIntersectionTest.java   | 1 +
 .../org/apache/datasketches/tuple/aninteger/IntegerSketchTest.java   | 3 ++-
 .../apache/datasketches/tuple/strings/ArrayOfStringsSketchTest.java  | 5 ++---
 tools/FindBugsExcludeFilter.xml                                      | 3 +--
 6 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/apache/datasketches/theta/Sketch.java b/src/main/java/org/apache/datasketches/theta/Sketch.java
index 8acfdaf..7e7be3a 100644
--- a/src/main/java/org/apache/datasketches/theta/Sketch.java
+++ b/src/main/java/org/apache/datasketches/theta/Sketch.java
@@ -634,7 +634,7 @@ public abstract class Sketch {
    * @param curCount the given curCount
    * @param thetaLong the given thetaLong
    * @return thetaLong
-   */
+   */ //This handles #4 above
   static final long correctThetaOnCompact(final boolean empty, final int curCount,
       final long thetaLong) {
     return (empty && (curCount == 0) && (thetaLong < Long.MAX_VALUE)) ? Long.MAX_VALUE : thetaLong;
diff --git a/src/test/java/org/apache/datasketches/tuple/adouble/AdoubleAnotBTest.java b/src/test/java/org/apache/datasketches/tuple/adouble/AdoubleAnotBTest.java
index d113ed1..229558e 100644
--- a/src/test/java/org/apache/datasketches/tuple/adouble/AdoubleAnotBTest.java
+++ b/src/test/java/org/apache/datasketches/tuple/adouble/AdoubleAnotBTest.java
@@ -44,6 +44,7 @@ public class AdoubleAnotBTest {
   private final DoubleSummary.Mode mode = Mode.Sum;
   private final Results results = new Results();
 
+  @SuppressWarnings("deprecation")
   private static void threeMethodsWithTheta(
       final AnotB<DoubleSummary> aNotB,
       final Sketch<DoubleSummary> skA,
@@ -147,6 +148,7 @@ public class AdoubleAnotBTest {
 
   /*****************************************/
 
+  @SuppressWarnings("deprecation")
   @Test
   public void aNotBNullEmptyCombinations() {
     AnotB<DoubleSummary> aNotB = new AnotB<>();
diff --git a/src/test/java/org/apache/datasketches/tuple/adouble/AdoubleIntersectionTest.java b/src/test/java/org/apache/datasketches/tuple/adouble/AdoubleIntersectionTest.java
index 25359ca..4dc75f7 100644
--- a/src/test/java/org/apache/datasketches/tuple/adouble/AdoubleIntersectionTest.java
+++ b/src/test/java/org/apache/datasketches/tuple/adouble/AdoubleIntersectionTest.java
@@ -82,6 +82,7 @@ public class AdoubleIntersectionTest {
     Assert.assertEquals(result.getUpperBound(1), 0.0);
   }
 
+  @SuppressWarnings("deprecation")
   @Test
   public void intersectionExactMode() {
     UpdatableSketch<Double, DoubleSummary> sketch1 =
diff --git a/src/test/java/org/apache/datasketches/tuple/aninteger/IntegerSketchTest.java b/src/test/java/org/apache/datasketches/tuple/aninteger/IntegerSketchTest.java
index 217b066..5cd7b98 100644
--- a/src/test/java/org/apache/datasketches/tuple/aninteger/IntegerSketchTest.java
+++ b/src/test/java/org/apache/datasketches/tuple/aninteger/IntegerSketchTest.java
@@ -70,6 +70,7 @@ public class IntegerSketchTest {
     assertEquals(csk.getEstimate(), K * 1.0, K * .03);
   }
 
+  @SuppressWarnings("deprecation")
   @Test
   public void aNotBTest() {
     int lgK = 4;
@@ -82,7 +83,7 @@ public class IntegerSketchTest {
       a1Sk1.update(i, 1);
     }
     anotb.update(a1Sk1, a1Sk2);
-    CompactSketch<IntegerSummary> cSk = anotb.getResult();
+    anotb.getResult();
   }
 
   @Test
diff --git a/src/test/java/org/apache/datasketches/tuple/strings/ArrayOfStringsSketchTest.java b/src/test/java/org/apache/datasketches/tuple/strings/ArrayOfStringsSketchTest.java
index 908079f..43b4034 100644
--- a/src/test/java/org/apache/datasketches/tuple/strings/ArrayOfStringsSketchTest.java
+++ b/src/test/java/org/apache/datasketches/tuple/strings/ArrayOfStringsSketchTest.java
@@ -22,14 +22,13 @@ package org.apache.datasketches.tuple.strings;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
 
-import org.testng.annotations.Test;
-
 import org.apache.datasketches.memory.WritableMemory;
 import org.apache.datasketches.tuple.AnotB;
 import org.apache.datasketches.tuple.CompactSketch;
 import org.apache.datasketches.tuple.Intersection;
 import org.apache.datasketches.tuple.SketchIterator;
 import org.apache.datasketches.tuple.Union;
+import org.testng.annotations.Test;
 
 /**
  * @author Lee Rhodes
@@ -38,6 +37,7 @@ import org.apache.datasketches.tuple.Union;
 public class ArrayOfStringsSketchTest {
   private static final String LS = System.getProperty("line.separator");
 
+  @SuppressWarnings("deprecation")
   @Test
   public void checkSketch() {
     ArrayOfStringsSketch sketch1 = new ArrayOfStringsSketch();
@@ -57,7 +57,6 @@ public class ArrayOfStringsSketchTest {
     String[] strArr3 = {"g", "h" };
     sketch2.update(strArr3, strArr3);
 
-
     Union<ArrayOfStringsSummary> union = new Union<>(new ArrayOfStringsSummarySetOperations());
     union.update(sketch1);
     union.update(sketch2);
diff --git a/tools/FindBugsExcludeFilter.xml b/tools/FindBugsExcludeFilter.xml
index f090992..ee747b6 100644
--- a/tools/FindBugsExcludeFilter.xml
+++ b/tools/FindBugsExcludeFilter.xml
@@ -1,5 +1,3 @@
-<FindBugsFilter> <!-- sketches-core -->
-
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
@@ -18,6 +16,7 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
+<FindBugsFilter> <!-- sketches-core -->
 
   <!-- Too many false positives to be useful.  I could not make it happy :( -->
   <Match>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org