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

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new c21d197306 GH-38764: [Java] Clarify warning about 
`--add-opens=java.base/java.nio=ALL-UNNAMED` (#38765)
c21d197306 is described below

commit c21d197306e48c2868d7ad32cc9e41e844a4baf8
Author: Josh Soref <[email protected]>
AuthorDate: Mon Nov 20 10:09:55 2023 -0500

    GH-38764: [Java] Clarify warning about 
`--add-opens=java.base/java.nio=ALL-UNNAMED` (#38765)
    
    ### Rationale for this change
    
    When someone encounters this message, it's precisely because they did *not* 
include `--add-opens=java.base/java.nio=ALL-UNNAMED`, but in order for arrow to 
work, they will need to add it.
    
    #38764
    
    ### What changes are included in this PR?
    
    Changes `with` to `without`
    
    ### Are these changes tested?
    
    ### Are there any user-facing changes?
    
    The error message when arrow is run on a modern JVM will change from `with` 
to `without`:
    > java.lang.RuntimeException: Failed to initialize MemoryUtil. Was Java 
started without `--add-opens=java.base/java.nio=ALL-UNNAMED`? (See 
https://arrow.apache.org/docs/java/install.html)
    
    * Closes: #38764
    
    Authored-by: Josh Soref <[email protected]>
    Signed-off-by: David Li <[email protected]>
---
 .../src/main/java/org/apache/arrow/memory/util/MemoryUtil.java        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/java/memory/memory-core/src/main/java/org/apache/arrow/memory/util/MemoryUtil.java
 
b/java/memory/memory-core/src/main/java/org/apache/arrow/memory/util/MemoryUtil.java
index b83adf9271..cc615c5b38 100644
--- 
a/java/memory/memory-core/src/main/java/org/apache/arrow/memory/util/MemoryUtil.java
+++ 
b/java/memory/memory-core/src/main/java/org/apache/arrow/memory/util/MemoryUtil.java
@@ -141,8 +141,8 @@ public class MemoryUtil {
       // This exception will get swallowed, but it's necessary for the static 
analysis that ensures
       // the static fields above get initialized
       final RuntimeException failure = new RuntimeException(
-          "Failed to initialize MemoryUtil. Was Java started with " +
-              "`--add-opens=java.base/java.nio=ALL-UNNAMED`? " +
+          "Failed to initialize MemoryUtil. You must start Java with " +
+              "`--add-opens=java.base/java.nio=ALL-UNNAMED` " +
               "(See https://arrow.apache.org/docs/java/install.html)", e);
       failure.printStackTrace();
       throw failure;

Reply via email to