Skip to content

Commit

Permalink
Merge pull request #395 from apache/Final_cleanup_prior_to_release
Browse files Browse the repository at this point in the history
Updated TestNG to 7.5. Removed unnecessary SuppressWarnings.  NO CODE
  • Loading branch information
leerho authored Apr 21, 2022
2 parents f1a69a0 + 198e144 commit 709d2ba
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/apache/datasketches/fdt/FdtSketch.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/apache/datasketches/kll/KllHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(..)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(..)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 709d2ba

Please sign in to comment.