Skip to content
Permalink
Browse files
Merge pull request #395 from apache/Final_cleanup_prior_to_release
Updated TestNG to 7.5. Removed unnecessary SuppressWarnings.  NO CODE
  • Loading branch information
leerho committed Apr 21, 2022
2 parents f1a69a0 + 198e144 commit 709d2ba5ecb5b583b6af98b2fbf511730913cee0
Showing 11 changed files with 3 additions and 16 deletions.
@@ -88,7 +88,7 @@ under the License.
<!-- END:UNIQUE FOR THIS JAVA COMPONENT -->

<!-- Test -->
<testng.version>7.4.0</testng.version>
<testng.version>7.5</testng.version>

<!-- System-wide properties -->
<maven.version>3.5.0</maven.version>
@@ -93,7 +93,6 @@ public FdtSketch(final FdtSketch sketch) {
/**
* @return a deep copy of this sketch
*/
@SuppressWarnings("unchecked")
@Override
public FdtSketch copy() {
return new FdtSketch(this);
@@ -622,7 +622,6 @@ static byte[] fastSingleItemCompactByteArray(final KllSketch mine) {
return byteArr;
}

@SuppressWarnings("null")
static String toStringImpl(final KllSketch mine, final boolean withLevels, final boolean withData) {
final boolean doubleType = (mine.sketchType == DOUBLES_SKETCH);
final int k = mine.getK();
@@ -760,7 +759,6 @@ static int ubOnNumLevels(final long n) {
* at the bottom. Only numLevels, the levels array and the items array are affected.
* @param mine the current sketch
*/
@SuppressWarnings("null")
private static void addEmptyTopLevelToCompletelyFullSketch(final KllSketch mine) {
final int[] myCurLevelsArr = mine.getLevelsArray();
final int myCurNumLevels = mine.getNumLevels();
@@ -614,7 +614,6 @@ public void checkReverseMergeKllDoubleSketch() {
}

@Test
@SuppressWarnings("unused")
public void checkWritableWrapOfCompactForm() {
KllDoublesSketch sk = KllDoublesSketch.newHeapInstance(20);
for (int i = 1; i <= 21; i++ ) { sk.update(i); }
@@ -614,7 +614,6 @@ public void checkReverseMergeKllFloatsSketch() {
}

@Test
@SuppressWarnings("unused")
public void checkWritableWrapOfCompactForm() {
KllFloatsSketch sk = KllFloatsSketch.newHeapInstance(20);
for (int i = 1; i <= 21; i++ ) { sk.update(i); }
@@ -32,7 +32,6 @@
import org.apache.datasketches.memory.WritableMemory;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class KllDoublesSketchTest {
private static final double PMF_EPS_FOR_K_8 = 0.35; // PMF rank error (epsilon) for k=8
private static final double PMF_EPS_FOR_K_128 = 0.025; // PMF rank error (epsilon) for k=128
@@ -277,13 +276,11 @@ public void mergeMinAndMaxFromOther() {
assertEquals(sketch2.getMaxValue(), 1_000_000);
}

@SuppressWarnings("unused")
@Test(expectedExceptions = SketchesArgumentException.class)
public void kTooSmall() {
KllDoublesSketch.newHeapInstance(KllSketch.DEFAULT_M - 1);
}

@SuppressWarnings("unused")
@Test(expectedExceptions = SketchesArgumentException.class)
public void kTooLarge() {
KllDoublesSketch.newHeapInstance(KllSketch.MAX_K + 1);
@@ -37,7 +37,7 @@
//These results are for the version that delays the roll up until the next value comes in.
//The @Test annotations have to be enabled to use this class and a section in KllDoublesHelper also
//needs to be enabled.
@SuppressWarnings({ "javadoc", "unused" })
@SuppressWarnings("unused")
public class KllDoublesValidationTest {

//Used only with manual running of checkTestResults(..)
@@ -33,7 +33,6 @@
import org.apache.datasketches.memory.WritableMemory;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class KllFloatsSketchTest {
private static final double PMF_EPS_FOR_K_8 = 0.35; // PMF rank error (epsilon) for k=8
private static final double PMF_EPS_FOR_K_128 = 0.025; // PMF rank error (epsilon) for k=128
@@ -278,13 +277,11 @@ public void mergeMinAndMaxFromOther() {
assertEquals(sketch2.getMaxValue(), 1_000_000F);
}

@SuppressWarnings("unused")
@Test(expectedExceptions = SketchesArgumentException.class)
public void kTooSmall() {
KllFloatsSketch.newHeapInstance(KllSketch.DEFAULT_M - 1);
}

@SuppressWarnings("unused")
@Test(expectedExceptions = SketchesArgumentException.class)
public void kTooLarge() {
KllFloatsSketch.newHeapInstance(KllSketch.MAX_K + 1);
@@ -37,7 +37,7 @@
// These results are for the version that delays the roll up until the next value comes in.
// The @Test annotations have to be enabled to use this class and a section in KllFloatsHelper also
// needs to be enabled.
@SuppressWarnings({ "javadoc", "unused" })
@SuppressWarnings("unused")
public class KllFloatsValidationTest {

//Used only with manual running of checkTestResults(..)
@@ -35,7 +35,6 @@
/**
* @author Lee Rhodes
*/
@SuppressWarnings("javadoc")
public class MiscDoublesTest {
static final String LS = System.getProperty("line.separator");
private final MemoryRequestServer memReqSvr = new DefaultMemoryRequestServer();
@@ -35,7 +35,6 @@
/**
* @author Lee Rhodes
*/
@SuppressWarnings("javadoc")
public class MiscFloatsTest {
static final String LS = System.getProperty("line.separator");
private final MemoryRequestServer memReqSvr = new DefaultMemoryRequestServer();

0 comments on commit 709d2ba

Please sign in to comment.