File tree Expand file tree Collapse file tree
src/main/java/com/microsoft/sqlserver/jdbc Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313import java .net .UnknownHostException ;
1414import java .text .DecimalFormat ;
1515import java .text .MessageFormat ;
16- import java .util .List ;
17- import java .util .ArrayList ;
1816import java .util .Date ;
1917import java .util .Locale ;
2018import java .util .Properties ;
@@ -1046,23 +1044,6 @@ static char[] bytesToChars(byte[] bytes) {
10461044 }
10471045 return chars ;
10481046 }
1049-
1050- /**
1051- * @param throwable
1052- * The exception to find root cause for.
1053- *
1054- * @return The root cause of the exception, otherwise null if null throwable input
1055- */
1056- static Throwable getRootCause (Throwable throwable ) {
1057- final List <Throwable > list = new ArrayList <>();
1058-
1059- while (throwable != null && !list .contains (throwable )) {
1060- list .add (throwable );
1061- throwable = throwable .getCause ();
1062- }
1063-
1064- return list .isEmpty () ? null : list .get (list .size () - 1 );
1065- }
10661047}
10671048
10681049
You can’t perform that action at this time.
0 commit comments