Skip to content

Commit 4679521

Browse files
Fix SEPS fallback for empty connectionStringIndex (#214)
Treat blank connectionStringIndex as missing to enable default/single-entry fallback
1 parent b3edc8a commit 4679521

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ojdbc-provider-common/src/main/java/oracle/jdbc/provider/util/WalletUtils.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ private WalletUtils() {}
114114
* </p>
115115
* <ol>
116116
* <li>
117-
* <strong>If {@code connectionStringIndex} is {@code null}:</strong>
117+
* <strong>If {@code connectionStringIndex} is {@code null}, empty,
118+
* or blank:</strong>
118119
* <ul>
119120
* <li>
120121
* The method first attempts to retrieve credentials using the default
@@ -183,6 +184,11 @@ private WalletUtils() {}
183184
public static Credentials getCredentials(
184185
byte[] walletBytes, char[] walletPassword, String connectionStringIndex) {
185186

187+
// treat blank as missing
188+
if (connectionStringIndex != null && connectionStringIndex.trim().isEmpty()) {
189+
connectionStringIndex = null;
190+
}
191+
186192
OracleWallet wallet = new OracleWallet();
187193
try {
188194
wallet.setWalletArray(walletBytes, walletPassword);

0 commit comments

Comments
 (0)