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

mblow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b75e8a19e [NO ISSUE][*DB][EXT] Update azure utils validation to 
accomodate Java 21
6b75e8a19e is described below

commit 6b75e8a19e0ffada792a333e8d7be96a1707a123
Author: Michael Blow <[email protected]>
AuthorDate: Sat Dec 21 11:16:52 2024 -0500

    [NO ISSUE][*DB][EXT] Update azure utils validation to accomodate Java 21
    
    In Java 21, the URL ctor does (additional) validation of the URL than
    was done previously- update the adapter setup logic to accommodate
    failures when setting a malformed URL on the client builder
    
    Ext-ref: MB-63101
    Change-Id: I31ef40ad04861b7d45f661bcc5550687272f4b8e
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19223
    Integration-Tests: Jenkins <[email protected]>
    Reviewed-by: Michael Blow <[email protected]>
    Reviewed-by: Ali Alsuliman <[email protected]>
    Tested-by: Jenkins <[email protected]>
---
 .../asterix/external/util/azure/blob_storage/AzureUtils.java | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git 
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/azure/blob_storage/AzureUtils.java
 
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/azure/blob_storage/AzureUtils.java
index 4860ed198d..fb594b9406 100644
--- 
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/azure/blob_storage/AzureUtils.java
+++ 
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/azure/blob_storage/AzureUtils.java
@@ -123,7 +123,11 @@ public class AzureUtils {
         if (endpoint == null) {
             throw new CompilationException(PARAMETERS_REQUIRED, 
ENDPOINT_FIELD_NAME);
         }
-        builder.endpoint(endpoint);
+        try {
+            builder.endpoint(endpoint);
+        } catch (Exception ex) {
+            throw new CompilationException(ErrorCode.EXTERNAL_SOURCE_ERROR, 
ex, getMessageOrToString(ex));
+        }
 
         // Shared Key
         if (accountName != null || accountKey != null) {
@@ -276,7 +280,11 @@ public class AzureUtils {
         if (endpoint == null) {
             throw new CompilationException(PARAMETERS_REQUIRED, 
ENDPOINT_FIELD_NAME);
         }
-        builder.endpoint(endpoint);
+        try {
+            builder.endpoint(endpoint);
+        } catch (Exception ex) {
+            throw new CompilationException(ErrorCode.EXTERNAL_SOURCE_ERROR, 
ex, getMessageOrToString(ex));
+        }
 
         // Shared Key
         if (accountName != null || accountKey != null) {

Reply via email to