>From Michael Blow <[email protected]>:
Michael Blow has uploaded this change for review. (
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19416 )
Change subject: [NO ISSUE][*DB][EXT] Update azure utils validation to
accommodate Java 21
......................................................................
[NO ISSUE][*DB][EXT] Update azure utils validation to accommodate 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
---
M
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/azure/blob_storage/AzureUtils.java
1 file changed, 24 insertions(+), 2 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/16/19416/1
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 0dc9ad2..13480fd 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
@@ -118,7 +118,11 @@
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) {
@@ -271,7 +275,11 @@
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) {
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19416
To unsubscribe, or for help writing mail filters, visit
https://asterix-gerrit.ics.uci.edu/settings
Gerrit-Project: asterixdb
Gerrit-Branch: morpheus
Gerrit-Change-Id: I31ef40ad04861b7d45f661bcc5550687272f4b8e
Gerrit-Change-Number: 19416
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Blow <[email protected]>
Gerrit-MessageType: newchange