final Throwable throwable)
{
Object[] parmArray = params;
if (throwable instanceof FileSystemException)
{
final FileSystemException fse = (FileSystemException) throwable;
// Compare message code and params
assertEquals(code, fse.getCode());
assertEquals(params.length, fse.getInfo().length);
parmArray = new Object[params.length];
for (int i = 0; i < params.length; i++)
{
String value = String.valueOf(params[i]);
// mask passwords (VFS-169)
final Matcher urlMatcher = URL_PATTERN.matcher(value);
if (urlMatcher.find())
{
final Matcher pwdMatcher = PASSWORD_PATTERN.matcher(value);
value = pwdMatcher.replaceFirst(":***@");
}
assertEquals(value, fse.getInfo()[i]);
parmArray[i] = value;
}
}
// Compare formatted message