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

leerho pushed a commit to branch frank_grimes_java-21-ffm
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git


The following commit(s) were added to refs/heads/frank_grimes_java-21-ffm by 
this push:
     new 5147a45  Update minor checkstyle fixes, re-arrange a few method 
signatures.
5147a45 is described below

commit 5147a45ef7d5bea24699c577de5c00b154cae787
Author: Lee Rhodes <[email protected]>
AuthorDate: Thu Nov 21 16:39:33 2024 -0800

    Update minor checkstyle fixes, re-arrange a few method signatures.
---
 .github/workflows/javadoc.yml                                |  7 ++++++-
 pom.xml                                                      |  1 -
 src/main/java/org/apache/datasketches/memory/Memory.java     |  2 +-
 .../java/org/apache/datasketches/memory/WritableMemory.java  | 12 ++++++------
 .../datasketches/memory/internal/WritableMemoryImpl.java     |  8 ++++----
 .../memory/internal/AllocateDirectWritableMapMemoryTest.java |  2 +-
 .../apache/datasketches/memory/internal/LeafImplTest.java    |  4 ++--
 .../datasketches/memory/internal/SpecificLeafTest.java       |  2 +-
 8 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml
index aba224a..c409c0f 100644
--- a/.github/workflows/javadoc.yml
+++ b/.github/workflows/javadoc.yml
@@ -22,11 +22,16 @@ jobs:
       - name: Echo Java Version
         run:  java -version
 
+      - name: Print Current workflow
+        run: >
+         cat .github/workflows/javadoc.yml
+
       - name: Generate JavaDoc
         run: mvn javadoc:javadoc
 
       - name: Deploy JavaDoc
-        uses: 
JamesIves/github-pages-deploy-action@5dc1d5a192aeb5ab5b7d5a77b7d36aea4a7f5c92
+        uses: JamesIves/[email protected]
+        # uses: 
JamesIves/github-pages-deploy-action@5dc1d5a192aeb5ab5b7d5a77b7d36aea4a7f5c92
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
           folder: target/reports/apidocs
diff --git a/pom.xml b/pom.xml
index d0507a0..ff6036f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -308,7 +308,6 @@ under the License.
             <useDefaultExcludes>true</useDefaultExcludes>
             <excludes>
               <!-- rat uses .gitignore for excludes by default -->
-<!--              <exclude>**/nb-configuration.xml</exclude>-->
               <exclude>**/*.yaml</exclude>
               <exclude>**/*.yml</exclude>
               <exclude>**/.*</exclude>
diff --git a/src/main/java/org/apache/datasketches/memory/Memory.java 
b/src/main/java/org/apache/datasketches/memory/Memory.java
index 6c7d5c8..fe0dfce 100644
--- a/src/main/java/org/apache/datasketches/memory/Memory.java
+++ b/src/main/java/org/apache/datasketches/memory/Memory.java
@@ -108,7 +108,7 @@ public interface Memory extends Resource {
       long fileOffsetBytes,
       long capacityBytes,
       ByteOrder byteOrder) throws IOException {
-    return WritableMemoryImpl.wrapMap(arena, file, fileOffsetBytes, 
capacityBytes, true, byteOrder);
+    return WritableMemoryImpl.wrapMap(file, fileOffsetBytes, capacityBytes, 
byteOrder, true, arena);
   }
 
   //NO ALLOCATE DIRECT, makes no sense
diff --git a/src/main/java/org/apache/datasketches/memory/WritableMemory.java 
b/src/main/java/org/apache/datasketches/memory/WritableMemory.java
index e1c63bc..7b79041 100644
--- a/src/main/java/org/apache/datasketches/memory/WritableMemory.java
+++ b/src/main/java/org/apache/datasketches/memory/WritableMemory.java
@@ -82,7 +82,7 @@ public interface WritableMemory extends Memory {
    * required by the implementation.
    */
   static WritableMemory writableMap(File file) throws IOException {
-    return writableMap(Arena.ofConfined(), file, 0, file.length(), 
ByteOrder.nativeOrder());
+    return writableMap(file, 0, file.length(), ByteOrder.nativeOrder(), 
Arena.ofConfined());
   }
 
   /**
@@ -103,16 +103,16 @@ public interface WritableMemory extends Memory {
       long fileOffsetBytes,
       long capacityBytes,
       ByteOrder byteOrder) throws IOException {
-    return WritableMemoryImpl.wrapMap(Arena.ofConfined(), file, 
fileOffsetBytes, capacityBytes, false, byteOrder);
+    return WritableMemoryImpl.wrapMap(file, fileOffsetBytes, capacityBytes, 
byteOrder, false, Arena.ofConfined());
   }
 
   /**
    * Maps the specified portion of the given file into Memory for write 
operations.
-   * @param arena the given arena to map. It must be non-null.
    * @param file the given file to map. It must be non-null and writable.
    * @param fileOffsetBytes the position in the given file in bytes. It must 
not be negative.
    * @param capacityBytes the size of the mapped Memory.
    * @param byteOrder the given <i>ByteOrder</i>. It must be non-null.
+   * @param arena the given arena to map. It must be non-null.
    * @return a file-mapped WritableMemory.
    * @throws IllegalArgumentException if file is not readable or not writable.
    * @throws IOException if the specified path does not point to an existing 
file, or if some other I/O error occurs.
@@ -120,12 +120,12 @@ public interface WritableMemory extends Memory {
    * required by the implementation.
    */
   static WritableMemory writableMap(
-      Arena arena,
       File file,
       long fileOffsetBytes,
       long capacityBytes,
-      ByteOrder byteOrder) throws IOException {
-    return WritableMemoryImpl.wrapMap(arena, file, fileOffsetBytes, 
capacityBytes, false, byteOrder);
+      ByteOrder byteOrder,
+      Arena arena) throws IOException {
+    return WritableMemoryImpl.wrapMap(file, fileOffsetBytes, capacityBytes, 
byteOrder, false, arena);
   }
 
   //ALLOCATE DIRECT
diff --git 
a/src/main/java/org/apache/datasketches/memory/internal/WritableMemoryImpl.java 
b/src/main/java/org/apache/datasketches/memory/internal/WritableMemoryImpl.java
index 764acef..60a7d5a 100644
--- 
a/src/main/java/org/apache/datasketches/memory/internal/WritableMemoryImpl.java
+++ 
b/src/main/java/org/apache/datasketches/memory/internal/WritableMemoryImpl.java
@@ -136,26 +136,26 @@ public abstract class WritableMemoryImpl extends 
ResourceImpl implements Writabl
   /**
    * The implementation of <i>wrapMap</i> for <i>WritableMemory</i>.
    * This method is also used for read-only operations when localReadOnly is 
false.
-   * @param arena the given arena. It must be non-null.
    * @param file the given file to map. It must be non-null.
    * @param fileOffsetBytes the file starting offset in bytes. It must be &ge; 
0.
    * @param capacityBytes the capacity of the mapped memory. It must be &ge; 0.
    * It must be non-null.
    * Typically use <i>Arena.ofConfined()</i>.
    * Warning: specifying a <i>Arena.ofShared()</i> is not supported.
-   * @param localReadOnly true if read-only is being imposed locally, even if 
the given file is writable..
    * @param byteOrder the given <i>ByteOrder</i>. It must be non-null.
+   * @param localReadOnly true if read-only is being imposed locally, even if 
the given file is writable..
+   * @param arena the given arena. It must be non-null.
    * @return a <i>WritableMemory</i>
    * @throws IllegalArgumentException if file is not readable.
    * @throws IOException if mapping is not successful.
    */
   public static WritableMemory wrapMap(
-      final Arena arena,
       final File file,
       final long fileOffsetBytes,
       final long capacityBytes,
+      final ByteOrder byteOrder,
       final boolean localReadOnly,
-      final ByteOrder byteOrder)
+      final Arena arena)
           throws IllegalArgumentException, IOException {
     Objects.requireNonNull(arena, "Arena must be non-null.");
     Objects.requireNonNull(file, "File must be non-null.");
diff --git 
a/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
 
b/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
index fcc9a39..4d9f056 100644
--- 
a/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
+++ 
b/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
@@ -88,7 +88,7 @@ public class AllocateDirectWritableMapMemoryTest {
     WritableMemory dstMem = null;
     WritableMemory srcMem = null;
     try (Arena arena = Arena.ofConfined()) { //this scope manages two Memory 
objects
-      dstMem = WritableMemory.writableMap(arena, file, 0, numBytes, 
ByteOrder.nativeOrder());
+      dstMem = WritableMemory.writableMap(file, 0, numBytes, 
ByteOrder.nativeOrder(), arena);
       srcMem = WritableMemory.allocateDirect(arena, numBytes, 8, 
ByteOrder.nativeOrder(), memReqSvr);
 
       //load source with consecutive longs
diff --git 
a/src/test/java/org/apache/datasketches/memory/internal/LeafImplTest.java 
b/src/test/java/org/apache/datasketches/memory/internal/LeafImplTest.java
index 74708ad..88bbf41 100644
--- a/src/test/java/org/apache/datasketches/memory/internal/LeafImplTest.java
+++ b/src/test/java/org/apache/datasketches/memory/internal/LeafImplTest.java
@@ -120,14 +120,14 @@ public class LeafImplTest {
     file.deleteOnExit();  //comment out if you want to examine the file.
     // Off Heap, Native order, No ByteBuffer, No MemReqSvr
     try (Arena arena = Arena.ofConfined()) {
-      WritableMemory memNO = WritableMemory.writableMap(arena, file, off, cap, 
NBO);
+      WritableMemory memNO = WritableMemory.writableMap(file, off, cap, NBO, 
arena);
       memNO.putShort(0, (short) 1);
       assertTrue(memNO.isDirect());
       checkCombinations(memNO, off, cap, memNO.isDirect(), NBO, false, false);
     }
     // Off heap, Non Native order, No ByteBuffer, no MemReqSvr
     try (Arena arena = Arena.ofConfined()) {
-      WritableMemory memNNO = WritableMemory.writableMap(arena, file, off, 
cap, NNBO);
+      WritableMemory memNNO = WritableMemory.writableMap(file, off, cap, NNBO, 
arena);
       memNNO.putShort(0, (short) 1);
       assertTrue(memNNO.isDirect());
       checkCombinations(memNNO, off, cap, memNNO.isDirect(), NNBO, false, 
false);
diff --git 
a/src/test/java/org/apache/datasketches/memory/internal/SpecificLeafTest.java 
b/src/test/java/org/apache/datasketches/memory/internal/SpecificLeafTest.java
index 559071b..fa885e7 100644
--- 
a/src/test/java/org/apache/datasketches/memory/internal/SpecificLeafTest.java
+++ 
b/src/test/java/org/apache/datasketches/memory/internal/SpecificLeafTest.java
@@ -112,7 +112,7 @@ public class SpecificLeafTest {
 
     final long bytes = 128;
     try (Arena arena = Arena.ofConfined()) {
-      WritableMemory mem = WritableMemory.writableMap(arena, file, 0L, bytes, 
ByteOrder.nativeOrder());
+      WritableMemory mem = WritableMemory.writableMap(file, 0L, bytes, 
ByteOrder.nativeOrder(), arena);
       assertTrue(mem.isMapped());
       assertFalse(mem.isReadOnly());
       checkCrossLeafTypeIds(mem);


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

Reply via email to