Skip to content

Commit 8ba3b51

Browse files
dkropachevclaude
andcommitted
refactor: rename findRootCauseMessage to getCauseChainMessages
The method concatenates all messages in the cause chain, not just the root cause. The new name accurately describes the behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 82155bb commit 8ba3b51

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

integration-tests/src/test/java/com/datastax/oss/driver/core/clientroutes/ClientRoutesUnsupportedVersionIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public void should_not_activate_on_unsupported_version() throws Exception {
188188
+ "with a clear error message");
189189
} catch (Exception e) {
190190
// The session init should fail with a message telling the user exactly what's wrong.
191-
String message = findRootCauseMessage(e);
191+
String message = getCauseChainMessages(e);
192192
assertThat(message)
193193
.as(
194194
"Session init failure must mention CLIENT_ROUTES_CHANGE so the user knows "
@@ -203,8 +203,8 @@ public void should_not_activate_on_unsupported_version() throws Exception {
203203
}
204204
}
205205

206-
/** Walks the exception cause chain to find the root message. */
207-
private static String findRootCauseMessage(Throwable t) {
206+
/** Concatenates all messages in the exception cause chain. */
207+
private static String getCauseChainMessages(Throwable t) {
208208
StringBuilder sb = new StringBuilder();
209209
while (t != null) {
210210
if (t.getMessage() != null) {

0 commit comments

Comments
 (0)