github-advanced-security[bot] commented on code in PR #685:
URL: https://github.com/apache/datasketches-java/pull/685#discussion_r2392947617


##########
src/test/java/org/apache/datasketches/theta/UpdateSketchTest.java:
##########
@@ -236,7 +235,7 @@
   /**
    * @param s value to print
    */
-  static void println(String s) {
+  static void println(final String s) {

Review Comment:
   ## Useless parameter
   
   The parameter 's' is never used.
   
   [Show more 
details](https://github.com/apache/datasketches-java/security/code-scanning/897)



##########
src/test/java/org/apache/datasketches/theta/HeapAlphaSketchTest.java:
##########
@@ -670,21 +666,21 @@
 
   @Test
   public void checkFamily() {
-    UpdateSketch sketch = 
Sketches.updateSketchBuilder().setFamily(ALPHA).build();
+    UpdateSketch sketch = UpdateSketch.builder().setFamily(ALPHA).build();
     assertEquals(sketch.getFamily(), Family.ALPHA);
   }
 
   @SuppressWarnings("unused")
   @Test(expectedExceptions = SketchesArgumentException.class)
   public void corruptionLgNomLongs() {
     final int k = 512;
-    UpdateSketch sketch = Sketches.updateSketchBuilder().setNominalEntries(k)
+    UpdateSketch sketch = UpdateSketch.builder().setNominalEntries(k)
         .setFamily(ALPHA).build();
     for (int i = 0; i < k; i++) { sketch.update(i); }
     byte[] byteArr = sketch.toByteArray();
     MemorySegment wseg = MemorySegment.ofArray(byteArr);
     wseg.set(JAVA_BYTE, LG_NOM_LONGS_BYTE, (byte) 8); //corrupt LgNomLongs
-    UpdateSketch sk = Sketches.heapifyUpdateSketch(wseg);
+    UpdateSketch sk = UpdateSketch.heapify(wseg);

Review Comment:
   ## Unread local variable
   
   Variable 'UpdateSketch sk' is never read.
   
   [Show more 
details](https://github.com/apache/datasketches-java/security/code-scanning/898)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to